Sandrine Pavoine
email: sandrine.pavoine@mnhn.fr

Carlo Ricotta

A simple translation from indices of species diversity to indices of phylogenetic diversity

Keywords: biodiversity, evenness, functional diversity, Hill numbers, phylogenetic diversity, redundancy

Measures of phylogenetic diversity have two main objectives: first disentangling the processes that drive species assemblages and second defining priorities of conservation while considering how much each species might contribute to biodiversity. A now widely used approach for measuring phylogenetic diversity consists in summing branch lengths on phylogenetic trees. Thanks to this approach, a change of perspective has been done since the 90s in the ecological literature: to measure biodiversity in sites, species in compositional indices have been replaced, often implicitly and sometimes explicitly, with phylogenetic units (units on the branch lengths of a phylogenetic tree). Here we highlight how any traditional index of species diversity, can be adapted, with this simple change of perspective, to measure phylogenetic diversity. We analyze other potentials of this simple family of indices: the ratio of phylogenetic diversity to the associated species diversity may offer a meaningful way to apprehend phylogenetic uniqueness in communities; and the phylogenetic diversity standardized by its maximum value may provide a meaningful way to apprehend phylogenetic evenness. Theoretically, the same approach could be applied to functional dendrograms to assess functional diversity, evenness and uniqueness. However this requires, somehow, to force functional data to adhere to a hierarchical structure of functional differences between species. As an illustration, we analyze phylogenetic and functional diversity in plant communities along a primary succession in Italy. Overall, this simple framework has a critical potential for future analyses of tree-based diversity as it benefits from myriads of previous researches on the measures of species diversity and species evenness.

Introduction

 [START_REF] Faith | Conservation evaluation and phylogenetic diversity[END_REF]measured phylogenetic diversity as the sum of branch lengths in a phylogenetic tree. His main objective was to introduce a new point of view in conservation studies, where the main measure of biodiversity at large scale was the number of species or "species richness". He proposed replacing species, as the basic units for conservation, by features of species, where feature means any distinct character state [START_REF] Faith | The cladistic basis for the Phylogenetic Diversity (PD) measure links evolutionary features to environmental gradients and supports broad applications of microbial ecology's "Phylogenetic Beta Diversity" framework[END_REF].

According to [START_REF] Faith | Conservation evaluation and phylogenetic diversity[END_REF], "the diversity of features represented by a subset of species provides option value in ensuring not only that one or more members of the subset can adapt to changing conditions, but also that society may be able to benefit (e.g. economically) from features of these species in response to future needs". His index, the sum of branch lengths in a phylogenetic tree, is thus a proxy for a richness in species' features. It relies on the assumption that the lengths of a branch in a phylogenetic tree is an indicator for a number of features that have arisen once in the hypothetical ancestral species represented along the branch.

Several published coefficients of biodiversity within sites (or communities, assemblages, stations, regions, samples, quadrats, plots, etc.) explicitly exploit the structure of a rooted tree with species as tips. The first index, by [START_REF] Faith | Conservation evaluation and phylogenetic diversity[END_REF] combined those trees with the presence of species in sites, to evaluate the phylogenetic diversity of sites. Other coefficients, as those developed by [START_REF] Allen | A new phylogenetic diversity measure generalizing the Shannon index and its application to phyllostomid bats[END_REF], Pavoine et al. (2009a) and [START_REF] Chao | Phylogenetic diversity measures based on Hill numbers[END_REF], also include species' abundances (or potentially any measure giving the importance of a species in a site, as for example the biomass or the percentage cover for plants). Among these coefficients, those developed by Pavoine et al. (2009a) and [START_REF] Chao | Phylogenetic diversity measures based on Hill numbers[END_REF] include a parameter to regulate the relative importance given to rare vs. abundant species.

A common methodological practice emerges from these developments. Indeed, one way of developing a new field of research is to transpose approaches developed from a previous field to the new one (e.g. [START_REF] Faith | The cladistic basis for the Phylogenetic Diversity (PD) measure links evolutionary features to environmental gradients and supports broad applications of microbial ecology's "Phylogenetic Beta Diversity" framework[END_REF]. Three concepts have long dominated the research for biodiversity metrics: species richness, evenness, and diversity (e.g. [START_REF] Magurran | Conceptual aspects of the quantification of the extent of biological diversity[END_REF]). As shown above, species richness counts the number of species in a site. Species evenness deals with how abundant species are and, more precisely, it evaluates whether species' abundances are even or whether some species dominate by their high abundance (a widespread profile observed in ecological communities). Species diversity indices more generally measure species richness combined with species evenness.

Following [START_REF] Faith | Biodiversity and evolutionary history: useful extensions of the PD phylogenetic diversity assessment framework[END_REF] and [START_REF] Pavoine | A guide through a family of phylogenetic dissimilarity measures among sites[END_REF], here we show that several approaches now used to measure phylogenetic diversity within sites are actually strongly rooted on these more traditional species-centered approaches. From a methodological point of view, these approaches replace, in all traditional coefficients, species by units of the branch lengths of a phylogenetic tree. We thus show how traditional measures of species diversity in a site, can be transposed to measure the phylogenetic diversity in a site. In addition, we discuss the possibility of applying similar approaches to functional diversity. Our objective here is to highlight the simplicity and at the same time the potential and limits of this family of indices.

Methods

Principle

The principle is the same as that considered in [START_REF] Pavoine | A guide through a family of phylogenetic dissimilarity measures among sites[END_REF] for dissimilarity indices. Here it is applied to measure tree-based diversity. Consider a rooted tree T with S species as tips and K branches. A i is the abundance of species i; t k is the set of species descending from branch k; t T is the whole set of species (tips of the tree); b T is the set of branches in the tree T; L k is the length of branch k; a k is the sum of abundances for all species descending from branch k (

k ki it aA    ). Let   T i it AA  
be the set of species abundances. The principle of the change of perspective consists in replacing species in diversity coefficients by units of branch lengths in phylogenetic trees. A branch k of a tree with a length equal to L k will be considered to have L k units. Each unit on this branch has an abundance value equal to a k . The sum of abundances for all units supported by the branch is thus L k a k . To ease the writing below, we use the word "feature" to designate these branch units.

Theoretically, these notations and the reasoning below can be applied to any rooted tree with arbitrary or estimated branch lengths and species as tips. For example, ten years after [START_REF] Faith | Conservation evaluation and phylogenetic diversity[END_REF], [START_REF] Petchey | Functional diversity (FD), species richness and community composition[END_REF] suggested summing branch lengths on functional dendrograms instead of phylogenetic trees to obtain an index of functional diversity. They developed this measure as "an amalgam of the diversity caused by species richness, number of functional groups, community composition, and species identity", useful for example to connect diversity with ecosystem functioning. This approach, however, is not unanimously accepted (see e.g., [START_REF] Poos | Functional-diversity indices can be driven by methodological choices and species richness[END_REF][START_REF] Pavoine | A guide through a family of phylogenetic dissimilarity measures among sites[END_REF]. Functional dendrograms can be obtained by first calculating functional dissimilarities between species (e.g. Pavoine et al., 2009b) and then using a clustering approach to obtain a tree from these dissimilarities (e.g. [START_REF] Mouchet | Towards a consensus for calculating dendrogram-based functional diversity indices[END_REF]. They are thus sensitive to the methodology used to define a tree hierarchy from functional dissimilarities between species [START_REF] Podani | How should a dendrogram-based measure of functional diversity function? A rejoinder to Petchey and Gaston[END_REF][START_REF] Mouchet | Towards a consensus for calculating dendrogram-based functional diversity indices[END_REF].

Richness

As far as we know, the first index of this general family was thus developed by [START_REF] Faith | Conservation evaluation and phylogenetic diversity[END_REF] as

T k kb PD L   
, considering a phylogenetic tree. PD stands for "Phylogenetic Diversity". It is an index of feature richness as it counts the number of units on the branch lengths of a tree, a branch length being assimilated to a richness in features. Then, [START_REF] Petchey | Functional diversity (FD), species richness and community composition[END_REF] adapted this for a functional tree, leading to

T k kb FD L   
, where FD stands for "Functional Diversity". In the framework developed in the present paper, we thus rename their indices fric, for feature richness.

Diversity indices

Considering species abundances and the notations given above, branch k supports L k features each of which has an abundance equal to a k and a relative abundance equal to

/ T k l l lb a L a   . For / T k l l lb a L a  
to always be lower than, or equal to, unity, we impose a weak restriction on the definition of branch lengths: the sum of branch lengths on the path between a species and the root of the tree must be at least equal to 1. A stronger restriction would be that each branch must support at least one unit, that is to say, L k ≥ 1 for all T kb  ; but this stronger restriction is actually not necessary here (see Appendix A). One can easily rescale the branches of any tree to respect such restrictions by multiplying them by a constant.

We will show below that not all indices need even the weak restriction but that having it ensures that any diversity index defined on the relative abundance of some entities can be

applied to the values / T k l l lb a L a   for features.
For instance, a measure of feature diversity using the [START_REF] Shannon | A mathematical theory of communication[END_REF] index would be:

  , log T TT kk Shannon k kb l l l l l b l b aa fdiv T A L L a L a           Eq. (1)
and a measure of feature diversity using the Gini-Simpson index [START_REF] Gini | Variabilita e mutabilita[END_REF][START_REF] Simpson | Measurement of diversity[END_REF] would be:

  2 ,1 T T k GS k kb ll lb a fdiv T A L La           Eq. (2)
In both measures, the relative abundance of features along the tree substitutes the classical species abundances, which are usually adopted for measuring diversity.

Parametric diversity indices

In parametric diversity indices, the entities used for calculating diversity are weighted by a parameter, here q, that regulates the relative importance given to rare compared to abundant entities. Applied to species, if q = 0, parametric indices are disproportionately sensitive to the rare species; then if q increases, they are more and more sensitive to the abundant species compared to the rare species. Applied to features, if q = 0, parametric indices are disproportionately sensitive to the rare features; then if q increases, they are more and more sensitive to the abundant features compared to the rare features.

Although other parametric indices exist (e.g. [START_REF] Behara | Generalized Gamma-Entropy[END_REF] and could be applied to features, we concentrate here on parametric generalizations of fric, fdiv GS and fdiv Shannon (Table 1). For example, a generalization can be obtained using the HCDT entropy [START_REF] Havrda | Quantification method of classification processes: concept of structural alpha-entropy[END_REF]Daróczy, 1970;[START_REF] Tsallis | Possible generalization of Boltzmann-Gibbs statistics[END_REF]:

    , 1 / 1 T T q q k HCDT k ll kb lb a fdiv T A L q La                  Eq. (3)
Applying the framework to Hill effective numbers [START_REF] Hill | Diversity and evenness: a unifying notation and its consequences[END_REF]) leads to [START_REF] Chao | Phylogenetic diversity measures based on Hill numbers[END_REF] index, developed in the context of phylogenetic diversity and named q PD (q≥0, q≠1) [START_REF] Faith | Biodiversity and evolutionary history: useful extensions of the PD phylogenetic diversity assessment framework[END_REF]. q PD provides an effective number of features: the number of features with even abundance a theoretical community should have to obtain the same value of HCDT diversity as that of the real community (see Appendix A for an example). To include q PD fully into the framework developed in the present paper, we rename it here as the q fdiv Hill index. Its formula is:

    1 1 , T T q q q k Hill k ll kb lb a fdiv T A L La                 Eq. (4)
Another generalization of fric, fdiv GS and fdiv Shannon , the Rényi's entropy [START_REF] Rényi | On measures of entropy and information[END_REF], could also be applied to feature abundances, leading to

  1 , log 1 T T q q k Rényi k ll kb lb a fdiv T A L q La                
Eq. ( 5)

The fact that these parametric indices are generalizations of fric, fdiv GS and fdiv Shannon is shown in Table 2.

These three parametric indices are linked. However, they have different properties. For example, if one multiplies the branch length of the tree by a constant, say N, leading to a new tree T N , then, all these indices are increasing functions of N. However, although q fdiv Hill is simply multiplied by N, the new value for q fdiv HCDT is

    1 , 1 / 1 T T q qq k HCDT N k ll kb lb a fdiv T A N L q La                   Eq. (6)
and that for q fdiv Rényi is

  1 , log log 1 T T q q k Rényi N k ll kb lb a fdiv T A L N q La                
Eq. ( 7)

An important consequence of this is that if the weak restriction on branch lengths was not applied, q fdiv HCDT and q fdiv Rényi could have negative values, while q fdiv Hill would still be nonnegative and meaningful (see details in Appendix A).

q fdiv Hill , q fdiv HCDT and q fdiv Rényi are non-increasing functions of q [START_REF] Nayak | On diversity measures based on entropy functions[END_REF]proposition 2.4; see also Leinster and Cobbold, 2012). The curve q→diversity has often been called a diversity profile, especially in the context of the Hill numbers (e.g. Leinster and Cobbold, 2012). The diversity profiles of these three parametric indices ( q fdiv Hill , q fdiv HCDT and q fdiv Rényi ) are consistent as, for a fixed q, they order communities similarly from the least to the most diverse [START_REF] Nayak | On diversity measures based on entropy functions[END_REF]. With any of these indices, the slope of the diversity profile reflects the unevenness of the relative abundances of evolutionary units. The more uneven the distribution of relative abundances, the more steeply the curve should decline (e.g. [START_REF] Hill | Diversity and evenness: a unifying notation and its consequences[END_REF]. The indices are, however, unequal in the degree of steepness of the diversity profile.

For example, for fixed tree and abundance distribution, if q<1, q fdiv Rényi ≤ q fdiv HCDT , while if q>1, q fdiv Rényi ≥ q fdiv HCDT [START_REF] Nayak | On diversity measures based on entropy functions[END_REF]. The two indices merge for q=1 where they converge towards fdiv Shannon . This implies that, for fixed tree and abundance distribution, the diversity profile obtained with q fdiv HCDT will always be steeper than the diversity profile obtained with q fdiv Rényi . Also, q fdiv Rényi =log( q fdiv Hill ); given the well-known properties of the logarithm function and given that q fdiv Hill takes values at least equal to 1, q fdiv Hill would thus lead to diversity profiles that are also steeper than those obtained with q fdiv Rényi .

Evenness indices

Indices of species evenness measure how evenly abundance is distributed among species.

Developing an index of feature evenness would thus mean measuring how evenly abundance is distributed among features. Before exploring feature evenness, we first recall a traditional way of measuring species evenness. Species diversity indices are maximized when species have even abundances. Dividing species diversity indices by their maximum could thus theoretically indicate how much abundance is evenly distributed among species. For example, [START_REF] Pielou | The measurement of diversity in different types of biological collections[END_REF] proposed the Rényi entropy divided by its maximum as a measure of species evenness; and [START_REF] Taillie | Species equitability: a comparative approach[END_REF] the Hill numbers divided by their maximum [START_REF] Ricotta | On the information-theoretical meaning of Hill's parametric evenness[END_REF]. There are however two limits of this simple evenness approach.

The first limit is that many species evenness indices obtained as the ratio of a diversity index by its maximum actually depend on species richness (e.g. [START_REF] Sheldon | Equitability indices: dependence on the species count[END_REF]). An important property for an evenness index is thus that its value should not change under replication [START_REF] Hill | Diversity and evenness: a unifying notation and its consequences[END_REF]: replicating the composition of a community N times should give a super-community with the same evenness as the original community. Among the parametric indices discussed above, only the Hill index satisfies this property (as shown in Appendix B; see also [START_REF] Ricotta | On the information-theoretical meaning of Hill's parametric evenness[END_REF].

The second limit is that although the maximum of the Hill numbers and of the Rényi's entropy are constant, irrespective of the parameter q, the maximum of HCDT depends on q.

This dependence affects the interpretability of the ratio of HCDT to its maximum as a measure of evenness. Indeed, if q controls the importance given to rarity (for low values of q)

vs. commonness (for high values of q), a parametric evenness index defined as the ratio of a diversity index to its maximum, should decrease with q. When, q=0, all parametric indices are unaffected by abundance data; the evenness in that case should be maximum and equal to 1.

When q tends to infinity, the highest abundance is the most influential in the diversity index.

The evenness, in that case, should tend to the minimum. Therefore, parametric evenness should decrease with q. The Hill numbers divided by their maximum and the Rényi's entropy divided by its maximum both respect this property (Appendix A). However, the HCDT entropy divided by its maximum displays non-monotonous variations (Appendix C). As q tends to infinity, the ratio of HCDT entropy to its maximum value tends to 1 (Appendix A).

This wrongly suggests high abundance evenness if we consider that evenness varies between 0 and 1.

Measures of evenness could also be approached by using other indices developed independently of a diversity index as [START_REF] Smith | A consumer's guide to evenness measures[END_REF] E var evenness index (see also [START_REF] Magurran | Conceptual aspects of the quantification of the extent of biological diversity[END_REF]). However, a third limit of the evenness approach appears when this concept is applied to features rather than species: provided at least one branch on any tree T is shared by at least two species, then the abundance of branch units cannot be even. For example, consider two species i and j having the same abundance a. Then any feature (branch unit) on the terminal branches that support the two species will be associated with an abundance of a, but the features on the shared branches would be associated to a minimum of 2a (Fig. 1).

Considering this third limit, we propose in Table 3 indices of feature evenness defined as the observed feature diversity divided by the value feature diversity would have if species had same abundance and were independent (species are connected to the root of the phylogenetic tree but do not share branches; e.g. Fig. 2a,b). Trees are said ultrametric if the sum of branch lengths on the shortest path from tip to root is constant. In case of nonultrametric trees, we can consider another scenario to obtain coefficients of feature evenness.

In this second scenario, the diversity is divided by the value it would have if species had same abundance, were independent, and at maximum distance to the root of the tree (this maximum is at least equal to the maximum observed distance; e.g. Fig. 2a,c). Let h i be the distance (sum of branch lengths) between species i and the root of the tree. Then, using solution 1, leads for example to the evenness indices listed in Table 3. Using the second solution, the formulas are unchanged but

T i it h   is equal to S × max(h i ) or S x H,
where S is the number of species and H is the maximum possible height of the tree. For ultrametric trees, the two scenarios are equivalent.

Considering the three identified limits to a simple transfer from measuring species evenness to measuring feature evenness, the index q feve Hill in Table 3 could thus be a good candidate for measuring feature evenness.

Uniqueness/Redundancy indices

Consider a general context where diversity is measured as a function of the abundance of some entities. Here we considered two types of entities: first species and second branch units on a tree with species as tips. A diversity measure is said 'Schur-concave' if it increases when abundance is transferred from an entity to another strictly less abundant entity (Dalton's (1920) principle of transfers; [START_REF] Patil | Diversity as a concept and its measurement[END_REF]. The HCDT index is Schur-concave if and only if its parameter q is non-negative [START_REF] Patil | Diversity as a concept and its measurement[END_REF]. This implies that the richness, the Shannon index and the Gini-Simpson index are all Schur-concave. The Rényi entropy and the Hill index are also Schur-concave for all non-negative values of q (Nayak, 1985, proposition 2.6). The framework, below, is close, but not equal to that developed by [START_REF] Ricotta | Measuring the functional redundancy of biological communities: a quantitative guide[END_REF].

Consider a tree, T. Consider the associated star-shaped tree, T star , which has the same species as tips, and the same distances (sum of branch lengths) between species and the root of the tree as in T. Compared to T, T star does not have branches shared by species. For a fixed distribution of species abundance, the ratio of any Schur-concave diversity index applied to T versus T star is an index of uniqueness (see details in Appendix A). Its values lies between 0 and 1. It is low if species are redundant, being closely related. It is high if species are original or unique, sharing no branches on the tree. Examples of uniqueness indices are given in Table 4. These rely on the richness, Shannon, Gini-Simpson, Hill, Rényi and HCDT indices.

However, a limit of q funi HCDT (Table 4), the uniqueness index based on the HCDT entropy, is that it always tends to 1 when q tends to infinity. Inspired by evenness indices, a reasonable property that could thus be required for uniqueness indices is thus as follows:

replicating the composition of a community N times as illustrated in Fig. 3 should give a super-community with the same uniqueness as the original community. As for evenness indices, the species and their abundance are replicated N times. As for their associated tree, the tree is also replicated N times and the N resulting trees are connected by their root (see the example in Fig. 3). Only the uniqueness index derived from the Hill numbers (in Table 4) fulfils this replication principle (as shown in Appendix B and illustrated in Fig. 3).

At this stage, we thus end up with a set of parametric diversity, evenness, and uniqueness indices that exploit the shape of a phylogenetic tree and that differ in their mathematical properties, with consequences on their relative biological interest. Among these indices, those derived from the Hill numbers counts the highest number of essential, useful properties (Table 5, see also Appendix D for illustrative examples).

Data analysis

We analyzed phylogenetic and functional diversity of plant communities along a primary succession on the foreland of the Rutor glacier in Italy [START_REF] Caccianiga | The functional basis of a primary succession resolved by CSR classification[END_REF]. The data set comprises 59 plots divided into three succession stages based on the age of the moraine deposits: 17 early-successional plots, 32 mid-successional plots and 10 late-successional plots. Plant species abundances were measured with a five-point ordinal scale transformed to ranks [START_REF] Caccianiga | The functional basis of a primary succession resolved by CSR classification[END_REF]; see also [START_REF] Ricotta | Measuring the functional redundancy of biological communities: a quantitative guide[END_REF]. As in [START_REF] Ricotta | Measuring the functional redundancy of biological communities: a quantitative guide[END_REF], we used [START_REF] Grime | Vegetation classification by reference to strategies[END_REF][START_REF] Grime | Plant Strategies, Vegetation Processes and Ecosystem Properties[END_REF] to classify plant species as competitors (C), stress tolerators (S) and ruderals (R) by means of fuzzy-coded values in the range 0-100, such that C+S+R = 100; and we obtained functional dissimilarities between species by applying the Marczewski-Steinhaus (MS) coefficient of dissimilarity to the functional species classification (C, S, R). More details on the data set are given in [START_REF] Caccianiga | The functional basis of a primary succession resolved by CSR classification[END_REF]. We obtained a functional tree for the species of the study area by applying the unweighted pair group method with arithmetic mean (UPGMA) to the functional dissimilarities between species. We considered the phylogenetic tree developed by [START_REF] Durka | Daphne: a dated phylogeny of a large European flora for phylogenetically informed ecological analyses[END_REF] pruned to retain only the species observed in the Rutor glacier data set.

Using different mathematical formulas, [START_REF] Ricotta | Measuring the functional redundancy of biological communities: a quantitative guide[END_REF] analyzed the same data set to evaluate functional uniqueness and [START_REF] Ricotta | A new method for quantifying the phylogenetic redundancy of biological communities[END_REF] the same data set to evaluate phylogenetic uniqueness. These studies concluded for a decline in phylogenetic and functional uniqueness along the primary succession, from the early stage, through the mid stage to the late stage. We re-analyzed these data using indices in Tables 1, 2, 3 and4 and then focusing on q div Hill , q eve Hill (species indices), q fdiv Hill , q feve Hill , and q funi Hill (feature indices). [START_REF] Ricotta | A new method for quantifying the phylogenetic redundancy of biological communities[END_REF] developed an index of phylogenetic diversity close to our q funi HCDT index. [START_REF] Ricotta | Measuring the functional redundancy of biological communities: a quantitative guide[END_REF] based their approach instead on Rao's quadratic entropy (Q, [START_REF] Rao | Diversity and dissimilarity coefficients: a unified approach[END_REF], an extension of the Gini-Simpson index (=div GS = 2 div HCDT , see Table 1) where they included functional information on species. Consider that we draw at random two individuals from a community. The Gini-Simpson index is the probability that the two individuals belong to different species, while Rao index in that case is the expected amount of functional difference between the two individuals. If functional differences between species are bounded between 0 and 1, then the maximum possible value for Rao index over all possible functional differences (fixing species abundance) is the value taken by the Gini-Simpson index. [START_REF] Ricotta | Measuring the functional redundancy of biological communities: a quantitative guide[END_REF] 2016) approach with our new perspective, we thus re-calculated their results considering the following modified version of their index of functional uniqueness:

    1/ 1 1 * 1/ 1 1 GS GS Q div U div Q     Eq. ( 8
)
where Q is applied to the functional distances between species directly obtained with the Marczewski-Steinhaus coefficient. As in [START_REF] Ricotta | Measuring the functional redundancy of biological communities: a quantitative guide[END_REF], the U* index of functional uniqueness does not require the definition of a functional tree. We thus compared this dissimilarity-based approach with the framework developed here that demand to take the risk of distorting trait data by transforming dissimilarities into a functional dendrogram.

Results

We synthesize results obtained on q div Hill , q eve Hill (species indices) and q fdiv Hill , q feve Hill , and q funi Hill (feature indices) in Figures 4 and5 and give detailed results for all indices in Appendix C. Regarding diversity, as in [START_REF] Ricotta | Measuring the functional redundancy of biological communities: a quantitative guide[END_REF][START_REF] Ricotta | A new method for quantifying the phylogenetic redundancy of biological communities[END_REF], we observed reversed U-shaped variations in species diversity, whatever the index used, with the mid-successional stage having the highest species diversity (Fig. 5, Table 6, Appendix C). With q>1, as in [START_REF] Ricotta | Measuring the functional redundancy of biological communities: a quantitative guide[END_REF][START_REF] Ricotta | A new method for quantifying the phylogenetic redundancy of biological communities[END_REF], we observed a decrease in phylogenetic and functional diversity from early and mid successional stages to the last stage (Fig. 4, Appendix C). With q=0

(presence-absence data), values of phylogenetic and functional diversity were, on average, more similar between the successional stages (Fig. 4, Appendix C).

As regards uniqueness, using Rényi and HCDT indices with q=1,2 for functional data or q=2 for phylogenetic data, our results were similar as those obtained by [START_REF] Ricotta | Measuring the functional redundancy of biological communities: a quantitative guide[END_REF][START_REF] Ricotta | A new method for quantifying the phylogenetic redundancy of biological communities[END_REF]: a decrease in uniqueness along the succession from the early stage to the late stage (Appendix C). Using these indices with other values for q, and using Hill numbers, our results were, however, different from those obtained by [START_REF] Ricotta | Measuring the functional redundancy of biological communities: a quantitative guide[END_REF][START_REF] Ricotta | A new method for quantifying the phylogenetic redundancy of biological communities[END_REF] species patterns, like phylogenetic patterns, did not remain significant, however, after we applied the correction for multiple tests.

Using Rao's quadratic entropy framework expressed in terms of equivalent number of species, we obtained a significant decrease in functional diversity from the early stage to the late stage and a decrease in functional uniqueness from the early to the mid stage, the functional uniqueness of the late stage being not significantly different from both the early and mid stages (Table 6).

Discussion

The framework developed here first considered replacing species in diversity indices by branch units on phylogenetic trees with species as tips. This approach is simple and can be applied to any species diversity index developed so far. In the literature, some have alternatively developed new indices without reference to traditional species diversity indices (e.g. [START_REF] Webb | Phylogenies and community ecology[END_REF]. Others applied traditional indices of diversity to the abundances of branch units normalized by the total abundance of all species in a site. Contrary to the indices developed in the Methods section, these alternative indices are still centered on the species as the target unit to measure diversity, even if they consider the evolutionary differences between these species. Pioneering this alternative approach, [START_REF] Allen | A new phylogenetic diversity measure generalizing the Shannon index and its application to phyllostomid bats[END_REF]

 

Eq. ( 9) Pavoine et al. (2009a) generalized Allen index thanks to the HCDT index, in the particular case of ultrametric trees. More generally, whatever the tree shape, their index could be written as follows:

  ( , ) / 1 T T TT q ll lb k qk ii kb i t i t La a I T A L q AA                    Eq. (10)
If the tree is ultrametric, then the ratio of features' abundance to species' abundance (

/ TT l l i l b i t L a A  
) is simply equal to the height of the tree and I 0 is independent of abundance data as it is equal to Faith phylogenetic diversity minus the height of the tree. If the tree is not ultrametric, however, I q depends on the ratio of features' to species' abundance even if q=0. If species have similar abundances (E=(e ... e ... e)), and if they are completely distinct (star-shaped tree T star , with h i the length of the branch from species i to the root of the tree), then

  1 1 , 1 T q i it q star h S I T E Sq         
Eq. ( 11)

/ T i it hS  
is the average contribution of each species to feature richness in the star-shaped

tree.     1 1 / 1 q Sq 
 is the maximum value of the HCDT index applied to species. Chao et al.

(2010) also generalized Allen index but using instead the Hill index, which led to:

    1 1 , T T TT q q i it q k k l l i kb l b i t A a D T A L L a A                   Eq. (12)
As for I q , when applied to non-ultrametric trees, q D always depends on species' and features'

abundance as   0 ,/ T T T k i l l k b i t l b D T A L A L a       
. If species have similar abundances and if they are completely distinct (star-shaped tree), then q D is equal to the number of species (S).

In contrast, its equivalent in the framework developed here, i.e., q fdiv Hill , would be equal to the number of features in the star-shaped tree (sum of branch lengths= T i it h   ). These two closely related frameworks, which both extend traditional species indices to phylogenetic diversity, are thus competing: the former with each feature's abundance normalized by the summed abundance of all features and the latter with each feature's abundance normalized by the summed abundance of all species. A main difference between these two alternative approaches is that the former, used in our present framework, completely shifts the focus of a study from species to features. By contrast, the alternative indices, corresponding to the latter approach, are still centred on species richness, and how much each species contributes to feature diversity. Choosing between the two approaches thus depends of which unit is of most interest: species or feature.

Among the feature-centered indices we explored, our reasoning led us to select the Hill numbers because they fulfill the replication principle, a property which [START_REF] Hill | Diversity and evenness: a unifying notation and its consequences[END_REF] discovered as critical to the development of evenness indices. [START_REF] Hill | Diversity and evenness: a unifying notation and its consequences[END_REF] developed a first version of the replication principle in the context of evenness indices applied to species abundances: "Consider a species-abundance relation having the property that each species is matched by a "double" of the same abundance. [...] Intuitively, this has the same evenness as the corresponding species-abundance relation in which each species and its "double" are combined to form one super-species". Hill demonstrated that an evenness index defined as the ratio two Hill numbers with different values of parameter q satisfies this property. More generally, if the species has more than one "double" in a reference community, say if it is replicated N times, the diversity of the reference community is N times that of the community where a species and its replicated species are combined. This property corresponds to the weakest version of the replication principle: if N samples share no species but have the same number of species with same distribution of abundance, then the diversity of the merged samples is N times that of one of the individual samples. Others used a stronger version of the replication principle satisfied by the Hill numbers: if N samples share no species but are equally large and equally diverse, then the diversity of the merged samples is N times that of one of the individual samples (see e.g. Chao et al., 2010, Leinster andCobbold, 2012, andreferences therein).

Several definitions of a generalized replication principle have been elaborated in the literature in the context of phylogenetic and functional diversity (see Botta-Dukat, 2018, for a review). Compared to these previous definitions, in the present paper, we used a generalized version of the weak replication principle rather than the strong version: if the species of a community and their abundance are replicated N times and if the associated tree with species as tips is also replicated N times (the N resulting trees being connected by their root), then the diversity of resulting super-community must be N times that of the original community. The uniqueness and evenness indices developed in our framework being ratios of diversity indices, the feature uniqueness and evenness in a community do not change by replication if the diversity index used fulfills this replication principle. This property strongly restricted the possible mathematical formulas to the Hill family.

The replication principle was useful in the development of feature evenness and feature uniqueness indices using the shift from species to features. In [START_REF] Ricotta | Measuring the functional redundancy of biological communities: a quantitative guide[END_REF], we used the Gini-Simpson index and its generalization to functional diversity (using Rao's quadratic entropy) to calculate functional uniqueness from functional dissimilarity matrices.

As underlined in the Method section, the Gini-Simpson index is the special case of the HCDT entropy with q=2. In [START_REF] Ricotta | A new method for quantifying the phylogenetic redundancy of biological communities[END_REF], we considered another framework also based on the HCDT entropy to calculate phylogenetic uniqueness from phylogenetic trees. Our results show that using an approach based on the Hill index applied to phylogenetic trees, functional trees, or functional dissimilarities modified our evaluation of the change in functional and phylogenetic uniqueness along the primary succession in Italy. With the frameworks based on HCDT or Rényi entropy, we observed a decrease in both phylogenetic (as in [START_REF] Ricotta | A new method for quantifying the phylogenetic redundancy of biological communities[END_REF] and functional (as in [START_REF] Ricotta | Measuring the functional redundancy of biological communities: a quantitative guide[END_REF] uniqueness along the primary gradient. By contrast, with the present framework using the Hill index, we observed U-shaped variations with the highest levels of uniqueness at the early stage, the lowest at the mid-stage and from intermediate to high levels at the late stage. Considering corrections for multiple test, only functional patterns remained significant along the successional gradient, which may indicate that species traits are critically important in determining their positions along the gradient.

Nonetheless, our results on functional patterns may be partly affected by the use of a functional dendrogram. Using Rao's quadratic entropy framework expressed in terms of equivalent number of species (Q*=1/(1-Q)), we observed similar U-shaped variations in functional uniqueness. Yet, we obtained a significant decrease in functional diversity from the early stage to the late stage. In contrast, using Hill numbers and the framework developed here ( q fdiv Hill ), expressed in terms of equivalent number of features, we obtained a significant decrease in functional diversity from the early/mid stages to the late stage: functional diversity was not significantly different between the early and mid-successional stages. This difference, obtained by the use of q fdiv Hill rather than Q*, could be due to a difference in viewpoint: equivalent number of species for Rao's framework (Q*) and equivalent number of features for the present framework ( q fdiv Hill ).

However, the functional tree we used is ultrametric. [START_REF] Chao | Phylogenetic diversity measures based on Hill numbers[END_REF] underlined that, with ultrametric trees, phylogenetic diversity can be expressed in terms of equivalent number of species by using the mean phylogenetic diversity index, q D= q fdiv Hill /H, where H is the height of the tree (from tips to root). As H is a positive constant, patterns in q D along the succession are expected to be similar as those obtained with q fdiv Hill . This difference we observed in our results could also be due to the use of different mathematical formulas to measure diversity: Rao' quadratic entropy versus Hill numbers. However, [START_REF] Chao | Phylogenetic diversity measures based on Hill numbers[END_REF] also demonstrated that when q=2 and dissimilarities between species are calculated as the sum of branch lengths on the path that connect the two species in the tree, then 2 fdiv Hill =H/(1-Q/H). As H is a constant, 2 fdiv Hill and Q* are both increasing functions of Q and their patterns along the succession should thus be similar. The difference we observed in our results can thus be attributed to the use of a functional dendrogram in 2 fdiv Hill , while we applied Q* directly on the functional dissimilarities between species.

Using another clustering approach (e.g. [START_REF] Mouchet | Towards a consensus for calculating dendrogram-based functional diversity indices[END_REF], we might have obtained more similar results between the two approaches. However, this simple study shows the potential impact of methodological choices on our interpretation of diversity patterns.

Obtaining a functional dendrogram adds a methodological step in the measurement of functional diversity. Contrary to phylogenetic data, this methodological step is not supported by the biological meaning gained by representing data in a tree shape. Indeed, cladograms aims to depict the tree of life and are thus not artificial. It is legitimate to require that the shared evolutionary history of sister taxa contribute only once to phylogenetic diversity [START_REF] Faith | Conservation evaluation and phylogenetic diversity[END_REF]May, 1994). Since a dissimilarity matrix does not contain information on shared evolutionary history, tree-based diversity indices must be used to satisfy this requirement.

However, when one aims to compare functional and phylogenetic diversity patterns, an also legitimate temptation is to use the phylogenetic diversity index most appropriate to phylogenetic data and a different index to measure functional diversity more appropriate for functional data. The problem in that case is that the obtained results could be obscured by artifacts due to the use of different mathematical formulas [START_REF] Pavoine | Correlations between phylogenetic and functional diversity: mathematical artefacts or true ecological and evolutionary processes?[END_REF]. More research on the comparative analysis of phylogenetic and functional patterns in ecology are thus needed.

Overall, our results emphasize that the biological conclusions of a study are critically dependent on the formula used to measure diversity, evenness and uniqueness. This is an obvious consequence of our attempt to reduce multidimensional concepts, such as diversity, evenness and uniqueness into single one-dimensional variation. It is well known for example that different diversity indices, even the Shannon and the Gini-Simpson indices, can rank communities differently (e.g., [START_REF] Patil | Diversity as a concept and its measurement[END_REF]. Even with the Hill numbers, using diversity profiles as defined above, the profiles of distinct communities can cross. This means that, for example, up to a certain value of q, a community C 1 may be perceived as more diverse than C 2 , while for higher values of q it is perceived as less diverse than C 2 (Leinster and Cobbold, 2012).

Our results also highlight the potential and limits of this general family of indices where species are replaced by features in diversity indices. We looked deeply at some properties of these indices, especially at the interpretability of ratios between diversity indices tackling notions of evenness and uniqueness. These results show that speaking generally of 'diversity', 'evenness' or 'uniqueness' is probably not enough. We have to go deeper inside the meaning of the different measures. For example, the diversity calculated with Rao's quadratic entropy is an expected distance between species pairs. In our framework, a diversity measure might be an entropy (e.g. Shannon entropy) and/or a probability (e.g. Gini-Simpson index) associated to features. The Hill numbers associated to Rao's quadratic entropy may have a different interpretation from the Hill numbers associated to features, if Rao's quadratic entropy is applied directly to a functional dissimilarity matrix, without the need to obtain a functional tree. A myriad of species diversity indices have already been developed in the literature. The consideration of functional and phylogenetic data opens the way to even more numerous indices of functional and phylogenetic diversity. A detailed interpretation of the very meaning of these metrics, in reference to traditional species diversity indices, is thus of great importance for understanding what the indices are actually measuring and for their sound biological interpretation.

Table 1

From species to feature diversity indices.

Original Index

Species diversity* Feature diversity* , the relative abundance of species i. † q tending to 1 leads to the Shannon index.

Richness ric = card(t T ) T k kb fric L    Shannon   log T Shannon i i it div P P      log T Shannon k k k kb fdiv L p p    Gini-Simpson   2 1 T GS i it div P      2 1 T GS k k kb fdiv L p    HCDT, q ≠ 1 †     1 / 1 T q q HCDT i it div P q              1 / 1 T q q HCDT k k kb fdiv L p q          Hill, q ≠ 1     1 1 T q q q Hill i it div P             1 1 T q q q Hill k k kb fdiv L p         Hill, q → 1   1 exp log T Hill i i it div P P         1 exp log T Hill k k k kb fdiv L p p       Rényi, q ≠ 1 †   1 log 1 T q q Rényi i it div P q           1 log 1 T q q Rényi k k kb fdiv L p q      

Table 2

Links between parametric indices of feature diversity and the richness, Gini-Simpson and Shannon indices applied to feature abundance. Index q = 0 q → 1 q = 2 HCDT 0 fdiv HCDT = fric -1 1 fdiv HCDT = fdiv Shannon 2 fdiv HCDT = fdiv GS Hill 0 fdiv Hill = fric 1 fdiv Hill = exp(fdiv Shannon ) 2 fdiv Hill =1 / (1 -fdiv GS ) Rényi 0 fdiv Rényi = log(fric) 1 fdiv Rényi = fdiv Shannon 2 fdiv Rényi = -log(1-fdiv GS )

Table 3 From species evenness to potential feature evenness indices analyzed in the paper.

Original Index Species evenness Feature evenness* , the relative abundance of species i. † q tending to 1 leads to the Shannon index.

Shannon     log log T i i it Shannon PP eve S         log log T T k k k kb Shannon i it L p p feve h       Gini-Simpson   2 1 1 1 T i it GS P eve S           2 1 1 1 T T kk kb GS i it Lp feve h         HCDT, q ≠ 1 †   1 1 1 T q i it q HCDT q P eve S           1 1 1 T T q kk kb q HCDT q i it Lp feve h         Hill, q ≠ 1     1 1 T q q i it q Hill P eve S            1 1 T T q q kk kb q Hill i it Lp feve h          Hill, q → 1   1 exp log T ii it Hill PP eve S          1 exp log T T k k k kb Hill i it L p p feve h          Rényi, q ≠ 1 †   1 log 1 log( ) T q i it q Rényi P q eve S          1 log 1 log( ) T T q kk kb q Rényi i it Lp q feve h          *Most

Table 4

Potential feature uniqueness indices analyzed in the paper.

Original Index Feature uniqueness*

Richness T T k kb richness i it L funi h      Shannon     log log T T k k k kb Shannon i i i it L p p funi h w w      Gini-Simpson     2 2 1 1 T T kk kb GS ii it Lp funi hw        HCDT, q ≠ 1 †     1 1 T T q kk kb q HCDT q ii it Lp funi hw                Hill, q ≠ 1       1 1 T T q q kk kb q Hill q ii it Lp funi hw             Hill, q → 1     1 exp log exp log T T k k k kb Hill i i i it L p p funi h w w            Rényi, q ≠ 1 †     log log T T q kk kb q Rényi q ii it Lp funi hw           
*Most notations are similar as those used in the main text. However, to simplify the equations, we use

/ T k k l l lb p a L a   
, the relative abundance of any feature (unit) on branch k, and

/ T i i j j jt w A h A   
, the relative abundance of any feature on the branch that sustain species i in the star-shaped tree. † q tending to 1 leads to the Shannon index. * "Y", for "Yes", indicates that an index has the property, "N", for "No", that it does not.

Proofs can be found in the main text and illustrative examples in Appendix D. † being increased when abundance is transferred from a feature to another strictly less abundant feature

Q*=1/(1-Q) 1.764 a (0.114) 1.613 b (0.069) 1.475 c (0.062) U*=(1-div GS )/(1-Q)
0.187 a (0.064) 0.133 b (0.030) 0.159 (0.047)

Fig. 1. Illustration of the fact that, provided at least one branch on any tree T is shared by at least two species, then the abundance of branch units cannot be even. Here species (tips of the tree) are given equal abundance, a. The abundance associated with a branch is indicated below this branch. It varies from a, to 3a.

Single-column figure

Fig. 2. Illustration of a theoretical tree (a) modified so that species are independent with no shared branches (the distance from tip to root is unchanged) (b), or independent and maximally dissimilar (the distance from tip to root is elongated so that all species are equally distant from the root node; broken lines indicate how much the branches were elongated) (c).

In (c) the new height of the tree may be equal to the maximum distance from tip to root observed in the original tree (solution 1) or higher (solution 2). Here we used the Hill numbers with q = 0, q = 1 and q = 2 as indicated on the graphs. "E" stands for the earlysuccessional stage, "M" for the mid-successional stage and "L" for the late-successional stage.

Single-column figure

For each index, box plots associated with different letters differed significantly in their median (P < 0.05; pairwise comparisons by Wilcoxon test). Italic letters indicate individually significant tests, whereas bold letters indicate that the test was also significant after P was controlled for false discovery rate using [START_REF] Benjamini | The control of the false discovery rate in multiple testing under dependency[END_REF] approach. Removing italic letters thus indicates which tests remained significant after the correction for multiple tests. Here we used the Hill numbers with q = 0, q = 1 and q = 2 as indicated on the graphs. "E" stands for the early-successional stage, "M" for the midsuccessional stage and "L" for the late-successional stage. As in Figure 4, for each index, box plots associated with different letters differed significantly in their median (P > 0.05; pairwise comparisons by Wilcoxon test corrected for potential ties). We used italic letters to indicate individually significant tests; none of the tests was significant after P was controlled for false discovery rate using [START_REF] Benjamini | The control of the false discovery rate in multiple testing under dependency[END_REF] approach. We consider here the same notations as in the main text.

2-column figure

1. If the smallest sum of branch lengths between a species and the root of the tree is at least equal to 1, then

/ T k k k kb a L a  
is always lower than or equal to unity.

Let C(i, Root) be the set of branches on the shortest path from a species to the root of the tree.

  ( , )

kk

T T k T ii i t i t k k k k i ik k b k b i t i t k C i Root AA a L a L A AL            (eq. A.1) Let ( , ) ik k C i Root hL   
be the smallest sum of branch lengths between a species i and the root of the tree. If h i ≥1, then eq. A.1 is ≤1.

2. If the weak restriction on branch lengths was not applied, q fdiv HCDT and q fdiv Rényi could have negative values, while q fdiv Hill would still be nonnegative and meaningful

As an example, consider a theoretical case study of a star-shaped phylogeny T star with S species as tips and branch lengths all equal to H: Consider also that the species have even abundance, say equal to 1: abundance distribution E=(1 ... 1). In that case,

      1 , 1 / 1 q q HCDT star fdiv T E S H q            , log q Rényi star fdiv T E S H 
If for example, H=0.01, S=2, and q=2, then, q fdiv HCDT =-49 and q fdiv Rényi =-3.91. As for q fdiv Hill , multiplying all branch lengths of a tree by a constant leads to q fdiv Hill multiplied by this constant.

q fdiv Hill provides an effective number of features

Consider a real community where species are related according to a defined rooted phylogenetic tree, with the notations used in the main text (T is the tree, k is a branch of the tree, L k the length of branch k, b T the set of branches on the phylogeny, a k the abundance associated with branch k, A the set of species' abundances, q a parameter). Consider a theoretical community where species have even abundance and are independently related to a theoretical ancestor (star-shaped phylogenetic tree, T star ). Let e be the abundance of any of these species and E the distribution of abundance of all branches (each branch is also associated with an abundance of e). Let D be the number of features in the star-shaped phylogeny (D = sum of branch lengths on the star-shaped phylogeny). If the phylogenetic diversity of the communities is measured by q fdiv HCDT , then the phylogenetic diversity of the real community would be

    , 1 / 1 T T q q k HCDT k ll kb lb a fdiv T A L q La                 
and that of the theoretical community would be

      1 , 1 / 1 1 / 1 q qq HCDT star e fdiv T E D q D q De                 For   , q HCDT fdiv T A to be equal to   , q HCDT star fdiv T E , then D must be equal to   1 1 , T T q q q k k Hill ll kb lb a D L fdiv T A La                
The star-shaped phylogeny may have different shapes and different numbers of species, provided the number of features (sum of branch lengths) is D and the features have equal abundances. For example, let's consider the data set in Fig. 3a of the main text. The number of features in this data set is 0 fdiv Hill =11.300. The value of 2 fdiv Hill for this data set is 6.909. This means that a community with 6.909 features with even abundances would have the same value of 2 fdiv HCDT as that of the community described in Fig. 3a. There are multiple ways of having D features with even abundances, including those displayed below where each tips is considered to have an abundance of e:

4. When q → +∞, q feve Hill and q feve Renyi tend to their minimum while q feve HCDT tends to 1.

We consider here species with positive abundance and their phylogenetic connections. Species with zero abundance are discarded (see e.g. Leinster and Cobbold 2012). When q → +∞, the Hill index applied to species tends to 1 divided by the highest relative abundance of a species [START_REF] Hill | Diversity and evenness: a unifying notation and its consequences[END_REF]. q div Hill thus tends to 1 divided by the highest relative abundance of a species and q eve Hill (species evenness: ratio of q div Hill to its maximum) tends to 1 divided by the product of the highest relative abundance and the richness (S = number of species). The minimum value for the richness times the highest relative abundance is 1. Indeed, if a community has only 1 species its relative abundance is 1; if a community has 2 species, the minimum relative abundance of the most abundant species is 0.5; more generally, if a community has S species, the minimum relative abundance of the most abundant species is 1/S. Whatever the number of species in the community, the maximum relative abundance of the most abundant species tends to 1. The evenness of a community with one species only is 1. As soon as the community contains more than 1 species and the abundances are not all equal, when q → +∞, q eve Hill takes thus values bounded in ]1/S; 1[.

Extending the notion of species evenness to that of feature evenness, we developed index q feve Hill :

  1 1 T T T q q k k kb ll lb q Hill i it a L La feve h                  
where h i is the distance from species i to the root of the tree (as in the main text T is the tree, k is a branch of the tree, L k the length of branch k, b T the set of branches on the phylogeny, t T the set of tips (species), a k the abundance associated with branch k, q a parameter). The numerator of q feve Hill is q fdiv Hill . It can be re-written has: . According to the known limits of the generalized mean (Hardy et al., 1952, p. 15),

    11 1 11 T TT TT qq qq ll lb k k k k k b k b k l l l l l b l b La a L a L a L a L a                                                 
min T T ll lb q Hill k b q k La fdiv a          
When q → +∞, q fdiv Hill thus tends to 1 divided by the highest relative abundance of a feature. If all features have even abundance, then q feve Hill =1. Otherwise, when q → +∞, q feve Hill takes thus values bounded in ]1/

T i it h   ; 1[.
By definition, q feve Renyi tends to the ratio of the logarithm of 1 divided by the highest relative abundance to the logarithm of the maximum feature richness. Applying the same reasoning as above shows that, if all features have even abundance, then q feve Hill =1, otherwise, when q → +∞, q feve Renyi can take values bounded in ]0; 1[. Indeed, max 1 ln( ) ln( )

T p q Renyi q i it feve h    
where p max is the relative abundance of the most abundant feature. For a given value of S, the minimum possible value for p max is 1/ However, when q → +∞, q feve HCDT tends to 1. Indeed,

        1 11 1 1 1 TT T T T qq k k k k k b k b q HCDT qq i it i it i it L p L p feve h h h                                          
Both the numerator and the denominator of q feve HCDT tend to 1 if q → +∞, given that a q tends to 0 if q → +∞ and 0≤a<1.

The same reasoning holds if

T i it h  
is replaced, in the above equations, with S×H as also proposed in the main text (H is the maximum possible height of the tree).

5.

The ratio of any Schur-concave diversity index applied to branch units of a tree to the same index applied to the tree modified so that species are independent lies between 0 and 1.

Consider a (phylogenetic) tree and the notations used in the main text. t k is the set of species that descend from branch k. The length of this branch is L k . The framework considered in this paper assumes that there are L k theoretical features (or branch units) that have a relative abundance of

T k T k l l i l l l b i t l b a L a A L a       
. If the species were maximally dissimilar then there would have been not one branch to sustain all these species but one branch for each of these descending species in t k . Instead of having L k features of relative abundance Consider five species, named A, B, C, D and E, and their abundances nA, nB, nC, nD, and nE, respectively. Consider that the five species can be placed at the tips of the following tree, which describes their similarities:

Let H be the height of the tree. We indicated above the abundance associated with each branch of the tree (equal to the summed abundance of its descending species). Because the tree is ultrametric, the total abundance of the features is H*(nA+nB+nC+nD+nE). We now reorganize the way the tree is displayed to simplify the demonstration. This reorganization does not change the topology nor the branch lengths:

If the species were maximally dissimilar; they would have emerged from the root of the tree, lying thus on the tips of a star-shaped tree, as in the following graph:

The star-shaped tree above has 5×H features or branch units, while the original tree had less (3.5×H) features because some were shared between two or more species. We represent below, on the original tree, the additional 1.5×H features using black broken lines and indicate that their abundance is zero.

Measuring diversity from the star-shaped tree compared to measuring it from the original tree, with the framework developed in the main text, corresponds to transferring part of the abundance of the original features to these zero abundance features, as shown below:

According to Dalton's (1920)

    1 / 1 T T q q i HCDT i it it A div A q A                      1 1 T T q q q i Hill i it it A div A A                   1 log 1 T T q q i Rényi i it it A div A q A                
Corresponding evenness indices could thus be (ratio of the diversity indices to their maximum):

  1 1 / 1 T T q qq i HCDT i it it A eve A S A                         1 1 1 T T q q q i Hill i it it A eve A S A                   11 log log( ) 1 T T q q i Rényi i it it A eve A Sq A                
Consider that we replicate the species composition N times. This will lead to N × S species. Let A N be the new distribution of abundance for the N × S species. The following equations show that only for the Hill index, the evenness of A is equal to the evenness of A N :

    1 1 / 1 T T q q q i HCDT N i it it A eve A N NS NA                         1 1 1 / 1 T T q q qq i HCDT N i it it A eve A N NS A                            11 11 1 11 TT TT qq qq qq ii Hill N ii i t i t i t i t AA eve A N N NS NS N A A                                                        11 1 11 1 1 TT TT q qq qq q qq ii Hill N Hill ii i t i t i t i t AA N eve A eve A NS S N A A                                                     1 1 1 1 1 log log log( ) 1 log( ) 1 TT TT qq qq ii Rényi N ii i t i t i t i t AA eve A N N NS q NS q N A A                                                  1 1 1 1 log( ) log 1 log log( ) log( ) log( ) T T T T q q i i it q it q q i Rényi N i it it A N A A eve A N NS N S A                                               

Uniqueness indices

Consider a rooted tree T with S species as tips and K branches. Let t T be the set of species and A={A i } iϵtT their distribution of abundance. As in the main text, t k is the set of species descending from branch k; b T is the set of branches in the tree T; L k is the length of branch k; a k is the sum of abundances for all species descending from branch k (

k ki it aA    ).
Consider that the species and their abundance are replicated N times, leading to the distribution of abundance named A N . Consider that their associated tree is also replicated N times and the N resulting trees are connected by their root (see the example in Fig. 3 of the main text), leading to a new tree named T N . Then the parametric uniqueness indices given in Table 4 of the main text are modified as follows:

      1/ , 1/ T T T T q k k k k kb kb q HCDT N N q i i i i it it N L a N L a funi T A N h A N h A                              1 1 1/ ,, 1/ T T T T q q k k k k kb kb q q HCDT N N HCDT q q i i i i it it N L a L a funi T A funi T A N h A h A                                11 11 1 1 // ( , ) // TT TT TT TT qq qq q k k k k k k k k k b k b k b k b q Hill N N qq q i i i i i i i i i t i t i t i t N L a N L a N L a L a funi T A N h A N h A N h A h A                                                         1 1 / ( , ) ( , ) / T T T T q q k k k k kb kb qq Hill N N Hill q i i i i it it L a L a funi T A funi T A h A h A                    log / ( , ) log / TT TT q k k k k k b k b q Rényi q i i i i i t i t L a L a funi T A h A h A                    1 1 log / log / ( , ) log / log / T T T T T T T T qq q k k k k k k k k k b k b k b k b q Rényi N N qq q i i i i i i i i i t i t i t i t N L a N L a N L a L a funi T A N h A N h A N h A h A                                                      log / (1 ) log( ) ( , ) ( , ) log /
(1 ) log( ) In the graphs below, blue is for the early successional stage, black for the mid successional stage and red for the late successional stage Property D5: q fdiv Hill and q fdiv Rényi are not dependent of q at their maximum, while q fdiv HCDT is.

TT TT q k k k k k b k b qq Rényi N N Rényi q i i i i i t i t L a L a q N funi T A funi T A h A h A q N    
  2 1 1 T T T T T T T T T T jj ii ij i t j t i t j t k k k k k t k t k t k t R i jt k kt AA AA N d N N N A N A N A N A U A N NA                             2 1 1 1 1 T T T T T T j i ij i t j t k k k t k t R i jt k kt A A N d N N A A U A N A                          2 1 T T T T T T j i ij i t j t k k k t k t R i jt k kt A A d N A A U A N A                          Our modified uniqueness index is T T TT TT i jt k kt j i ij i t j t kk k t k t A A U A A d AA                Its value for the replicated community is 2 * 1 1 1 1 T T T T T T i jt k kt R j i ij i t j t k k k t k t A N A U A A N d N N A A                          2 * 1 1 1 T T T T T T i jt k kt R j i ij i t j t k k k t k t A N A U A A d N N A A                        2 * * 1 T T T T T T i jt k kt R j i ij i t j t k k k t k t A A U U A A d A A                         1 "A
We modified the data set given in Property D6: q fdiv Hill is an effective number of features while q fdiv Rényi and q fdiv HCDT are not

We illustrate below this property for index q fdiv Hill . Here the tree is like a star with each species connected directly to the root. The length of each branch will be equal to the fifth of the value taken by q fdiv Hill . (red line). The two graphs are equal because q fdiv Hill is an effective number of features. By definition, q fdiv Rényi is the log of an effective number of features. q fdiv HCDT can take values lower than 1 and is not expressed as an effective number of features.

Property D7: q fdiv Hill is multiplied by N if the composition of a community is replicated N times as in Fig. 3 while q fdiv Rényi and q fdiv HCDT are not

We provide below diversity profiles for Fig. 3b Properties E1 and U1: the q feve and q funi indices discussed in the main text are constrained to a 0-1 range for convenience

We provide illustrations of this property for evenness in Property E2: q feve Hill and q feve Rényi reflect the evenness in the abundances of features, while q feve HCDT doesn't Fig. D.17 illustrates this statement as the profile curve for q feve HCDT has a U-shape instead of decreasing with q.

Property U2: q feve Hill and q feve Rényi always increase with the amount of differences between species and reach their maximum only when species are maximally dissimilar, while q feve HCDT doesn't Properties E4 and U3: q feve Hill and q funi Hill are not changed if the composition of a community is replicated N times as in Fig. 3, while q feve Rényi , q funi Rényi , q feve HCDT and q funi HCDT are

We provide illustrations of these properties below:

  thus considered that the ratio of Rao index to Gini-Simpson index (U=Q/div GS ) is a measure of functional uniqueness. As special cases of the HCDT entropy and its extensions, Rao and Gini-Simpson indices are sensitive to replication in species abundance and patterns of difference: replicating N times the composition of a community as in Fig. 3, Gini-Simpson and Rao's values are not multiplied by N. However, consider transformed versions of these indices driving them as part of the Hill framework: 2 div Hill =1/(1-div GS ) for the transformed Gini-Simpson index and Q*=1/(1-Q) for the transformed Rao index. These transformed versions of the Gini-Simpson and Rao indices fulfil the replication principle: replicating N times the composition of a community as in Fig. 3, the values taken by these transformed indices are multiplied by N (Appendix B). To compare Ricotta et al. (

  : we observed U-shaped variations with a decrease in functional uniqueness from the early successional stage to the mid-successional stage, and intermediate values in the late stage, often not significantly different from both the early and mid stages (Fig. 4; Appendix C). We observed similar trends in values of functional and phylogenetic evenness and U-shaped variations in species evenness (Figs. 4, 5; Appendix C). Contrary to functional patterns,

*

  Most notations are similar as those used in the main text. However, to simplify the equations

  notations are similar as those used in the main text. However, to simplify the equations

  by N if the composition of a community is replicated N times as in Fig.3N Y N D8. Multiplied by λ if the branch lengths are multiplied by λ (λ the evenness in the abundances of features (considering the amount of features the tree would have if species had not shared any branch since the root of the tree) with the amount of differences between species and is maximum when species are maximally dissimilar (sharing no branches on the tree, and being at a maximum distance from the root of the tree) if the composition of a community is replicated N times as in Fig.3N Y N

Fig. 3 .

 3 Fig. 3. Example of replicated data set with a theoretical tree and abundance data: (a) original

Fig. 4 .

 4 Fig. 4. Box plots for feature indices applied to the three successional stages identified on the

Fig. 5 .

 5 Fig. 5. Box plots for species indices applied to the three successional stages identified on the

  Figure 1

  which shows that q fdiv Hill is the weighted generalized mean of values /

  High values for p max can be expressed as 1-ε, with ε close to zero. For high values of p max ,

  have been n k =card(t k ) branches of length L k . The L k features which would support species i would have a relative abundance of 1920) principle of transfers, this transfer of abundance from a single branch to several branches with zero abundances increases Schur-concave diversity indices. □ An example is given below:

  principle of transfers, this transfer of abundance from features with positive abundance to features with zero abundance increases feature-based Schurconcave diversity indices.1 "A simple translation from indices of species diversity to indices of phylogenetic diversity" abundance. Consider that there are S species (card(t T )=S). Then, if applied to species, the parametric indices used in the main text are

  simple translation from indices of species diversity to indices of phylogenetic diversity" by Sandrine Pavoine & Carlo Ricotta Appendix C. Additional figures on the analysis of the case study.

Fig. C- 1 .

 1 Fig. C-1. Species diversity profile for each of the 59 plots-Note that here the scale changes from a graph to another.

Fig. C- 2 .

 2 Fig. C-2. Species evenness profile for each of the 59 plots -Note that here the scale changes from a graph to another.

Fig. C- 3 .

 3 Fig. C-3. Functional feature diversity profile for each of the 59 plots. -Note that here the scale changes from a graph to another.

Fig. C- 4 .

 4 Fig. C-4. Functional feature evenness profile for each of the 59 plots -Note that here the scale changes from a graph to another.

Fig. C- 5 .

 5 Fig. C-5. Functional feature uniqueness profile for each of the 59 plots -Note that here the scale changes from a graph to another.

Fig. C- 6 .

 6 Fig. C-6. Phylogenetic feature diversity profile for each of the 59 plots -Note that here the scale changes from a graph to another.

Fig. C- 7 .

 7 Fig. C-7. Phylogenetic feature evenness profile for each of the 59 plots -Note that here the scale changes from a graph to another.

Fig. C- 8 .

 8 Fig. C-8. Phylogenetic feature uniqueness profile for each of the 59 plots -Note that here the scale changes from a graph to another.

Fig. C- 9 .

 9 Fig. C-9. Functional data, Renyi index, div=diversity, eve=evenness, uni=uniqueness. Here we used the same scale for a given category of indices (e.g. uniqueness) but different values for q. In the next figure, the scales are different.

Fig. C- 10 .

 10 Fig. C-10. Same legend as Fig. C-9, but the scales here are different from a panel to another.The trends observed are a decrease in functional diversity, evenness and uniqueness from early successional stage to late successional stage with q=1 and q=2 and U-shaped variations with q=0.

Fig. C- 11 .

 11 Fig. C-11. Functional data, HCDT index, div=diversity, eve=evenness, uni=uniqueness

Fig. C- 13 .

 13 Fig. C-13. Phylogenetic data, Renyi index, div=diversity, eve=evenness, uni=uniqueness

Fig. C- 15 .

 15 Fig. C-15. Phylogenetic data, HCDT index, div=diversity, eve=evenness, uni=uniqueness

Fig. C- 19 .

 19 Fig. C-19. Species abundance data, HCDT index, div=diversity, eve=evenness

Fig. D. 8 .

 8 Fig. D.8. Theoretical data set modified from Fig. D.1. Here branch lengths have been multiplied by 10. The values of the q fdiv indices are modified by this change in branch lengths as shown in Figs. D.9 ad D.10.

Fig. D. 9 .

 9 Fig. D.9. q fdiv indices applied to the data sets given in Fig. D.1 (black line) and D.8 (red line)

  Fig. D.11. Theoretical data set modified from Fig. D.1 so that all species are independent and have equal abundance.The q fdiv values obtained with this modified data set are given in Fig.D.12.

Fig. D. 12

 12 Fig. D.12. q fdiv indices applied to the data sets given in D.11.

Fig. D. 13 .

 13 Fig. D.13. Theoretical data set modified from Fig. D.1.Here the tree is like a star with each species connected directly to the root. The length of each branch will be equal to the fifth of the value taken by q fdiv Hill .

Fig. D. 14

 14 Fig. D.14. q fdiv Hill index applied to the data sets given in Fig. D.1 (black line) and Fig. D.13(red line). The two graphs are equal because q fdiv Hill is an effective number of features. By definition, q fdiv Rényi is the log of an effective number of features. q fdiv HCDT can take values lower than 1 and is not expressed as an effective number of features.

  (Fig. D.15) and the ratio of the diversity profiles for Fig. D.1 to the diversity profiles for Fig. 3b (Fig. D.16).

Fig. D. 15

 15 Fig. D.15. q fdiv indices applied to the data sets given in Fig. D.1 (black line) and Fig. 3b (red line)

  Fig. D.17 and for uniqueness in Fig. D.18.

Fig. D. 17

 17 Fig. D.17. q eve profiles in two extreme cases: for the blue curve, we provided an abundance of 400 to species C in Fig. D.1. as an example of low evenness; for the red curve, we considered the data set in Fig. D.11 as an example of maximum evenness.

Fig. D. 18

 18 Fig. D.18. q uni profiles in two extreme cases: species are very similar (blue curve based on the data set in Fig. D.19) or very dissimilar (blue curve based on the data set in Fig. D.20).

Fig. D. 19 .

 19 Fig. D.19. Theoretical data set modified from Fig. D.1 so that species are all very similar (related).

Fig. D. 20 .

 20 Fig. D.20. Theoretical data set modified from Fig. D.1 so that species are all very dissimilar (unrelated).

Fig

  Fig. D.18 illustrates this statement as q feve HCDT rapidly reaches its maximum when applied to the data set in Fig. D.20 although species in this data set are very similar.

Fig. D. 21 .

 21 Fig. D.21. Ratio, for each q feve index, of its value for the replicated data set (Fig. 3b) to its value for the original data set (Fig. D.1)

Table 5

 5 Properties fulfilled by the parametric indices of feature diversity, evenness and uniqueness

	Property*

Table 6

 6 Tests for differences, between successional stages (early, mid and late), in the level of species diversity, functional diversity and functional uniqueness. The tests use the quadratic entropy (Q) framework with the Gini-Simpson index (div GS ) as a special case, both transformed as equivalent numbers of species. We provide mean (s.d.) value taken by each index in each successional stage. Mean values associated with different letters were significantly different (P < 0.05; pairwise comparisons by Wilcoxon test). Italic letters indicate individually significant tests, whereas bold letters indicate that the test remained significant after P was controlled for false discovery rate using[START_REF] Benjamini | The control of the false discovery rate in multiple testing under dependency[END_REF] approach.

		Early	Mid	Late
	2 div Hill = 1/(1-div GS )	10.514 a (3.676)	12.768 b (2.897)	10.152 a (3.565)

  =0.748, 2 funi Hill =0.751). With the Rényi and HCDT indices, the uniqueness of the original data is different from that of the replicated data. For example, with the original data, 0 funi HCDT =0.735, 1 funi HCDT =0.870, 2 funi HCDT =0.951; but with the replicated data, 0 funi HCDT =0.749, 1 funi HCDT =0.913, 2 funi HCDT =0.985. With the original data, 0 funi Rényi =0.889, 1 funi Rényi =0.870, 2 funi Rényi =0.861; but with the replicated data, 0 funi Rényi =0.923, 1 funi Rényi =0.913, 2 funi Rényi =0.909.

	1.5-column figure

  Let d ij be the dissimilarity between species i and j, bounded between 0 and 1. The ratio of Rao index to Simpson index has the following formula:

					        
	U		TT i t j t    TT j i kk k t k t A A AA 	d	ij
			1		T jt     T i k kt A A     	2

Consider that the species and their abundance are replicated N times. Consider that the replicated species are maximally dissimilar: if s', s'', s''' are replicated species of s, then d ss' =d ss'' =d ss''' =1. The ratio of Rao index to Simpson index for this replicated community is:

*

Acknowledgements

We thank the referees for their positive and useful comments. Funding: This research did not receive any specific grant from funding agencies in the public, commercial, or not-for-profit sectors.

1

Data Accessibility

All data are publicly available: abundance and trait data from Ricotta et al. (2016, Appendix B); phylogenetic tree from [START_REF] Durka | Daphne: a dated phylogeny of a large European flora for phylogenetically informed ecological analyses[END_REF]; R scripts from package adiv [START_REF] Pavoine | adiv: Analysis of Diversity. R package version 1[END_REF] and Appendixes E and F.

Appendixes A-F. Supplementary data

Supplementary data associated with this article can be found, in the online version, at [...] Properties D1 and E3: the q fdiv indices discussed in the main text, and q feve Hill and q feve Rényi are non-increasing functions of q, while q feve HCDT can increase with q Examples can be found in Appendix C in connection with our case study on plant diversity on the foreland of the Rutor glacier in Italy.

We provide also in Property D4 [the q fdiv indices discussed in the main text are dependent of the measurement unit of branch length] and Property D8 [ q fdiv Hill is multiplied by λ if the branch lengths are multiplied by λ (λ > 0) while q fdiv Rényi and q fdiv HCDT are not]

We modified the data set given in

Appendix E. R scripts

We provide in Appendix F the R scripts of four functions named evoeveparam, plot.evoeveparam, evouniparam, plot.evouniparam + an internal function named .checkphyloarg. Updated versions of these functions will be integrated, after the publication of our paper, in the R package adiv [START_REF] Pavoine | adiv: Analysis of Diversity. R package version 1[END_REF]. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License http://www.gnu.org/licenses/.

Disclaimer: users of this code are cautioned that, while due care has been taken and it is believed accurate, it has not been rigorously tested and its use and results are solely the responsibilities of the user.

D.1. Functions evoeveparam and plot.evoeveparam

Function "evoeveparam" calculates evenness in the abundance of features (branch units on a phylogenetic [or functional] tree) using parametric indices q feve HCDT , q feve Hill , q feve Renyi . Function "plot.evoeveparam" plots the results of function "evoeveparam".

usage:

evoeveparam(phyl, comm, method = c("hill", "HCDT", "renyi"), q = 2, option = 1:3, H = NULL, tol = 1e-8) plot.evoeveparam(x, legend = TRUE, legendposi = "topright", type="b", col = if(is.numeric(x)) NULL else sample(colors(distinct = TRUE), nrow(x$eve)), lty = if(is.numeric(x)) NULL else rep(1, nrow(x$eve)), pch = if(is.numeric(x)) NULL else 1:nrow(x$eve), ...) function(x, legend = TRUE, legendposi = "topright", type="b", col = if(is.numeric(x)) NULL else sample(colors(distinct = TRUE), nrow(x$eve)), lty = if(is.numeric(x)) NULL else rep(1, nrow(x$eve)), pch = if(is.numeric(x)) NULL else rep(19, nrow(x$eve)), ...)

dependence: adiv, ape, phylobase arguments:  phyl: an object inheriting the class "phylo" (see package ape), "phylo4" (see package phylobase), or "hclust".  comm: a data frame or a matrix typically with communities as rows, species as columns and an index of abundance as entries. Species should be labeled as in the tree (object phyl) where they are the tips.  method: a character with one of the following codes: "hill" (for q feve Hill ), "HCDT" (for q feve HCDT ), or "renyi" (for q feve Renyi ). If several value are given, only the first one is considered.

 q: a vector with nonnegative value(s) for parameter "q" of functions q feve HCDT , q feve Hill , and q feve Renyi .  option: an integer (either 1, 2 or 3). If 1, the (Hill, HCDT or Renyi) diversity index is divided by the value it would have if species had same abundance and were independent, if 2, the diversity is divided by the value it would have if species had same abundance, were independent, and at the maximum observed distance from tip to root, if 3, the diversity is divided by the value it would have if species had same abundance, were independent, and at a distance equal to H from the root of the tree.

Options 1 and 2 are equivalent in case of an ultrametric tree.  H: a numeric; H must be higher than the largest observed distance from tip to root.  tol: numeric tolerance threshold: values between -"tol" and "tol" are considered equal to zero.  x: an object of class "evoeveparam" obtained with function "evoeveparam".  legend: a logical. If TRUE a legend is given with the colour, the type of line (etc.) used to define the evenness curve of each community.  legendposi: a character that gives the position of the legend to be passed to function "legend" of the base of R.  type: a character to be passed to the graphic parameter "type" of functions "plot" and "lines" used to draw the evenness curve of each community.  col: vector of colours to be passed to the graphic parameter "col" of functions "plot" and "lines" to define the colour of the evenness curve of each community.  lty: vector of type of line (plain, broken etc.) to be passed to the graphic parameter "lty" of functions "plot" and "lines" used to draw the evenness curve of each community.  pch: type of point (open circle, close circle, square etc.) to be passed to the graphic parameter "pch" of functions "plot" and "lines" used to draw the evenness level of each community.  ...: other parameters can be added and passed to the functions "plot" and "lines" used to draw the graphic.

value If only one value of q is given, the function "evoeveparam" returns a vector with communities' evenness values.

If more than one value of q is given, a list of two objects is returned:  q: the vector of values for q;  eve: a data frame with the evenness of each community calculated for all values of q.

The function "plot.evoeveparam" returns a graphic.

example: library(adiv) library(ape) library(phylobase) data(batcomm) phy <-read.tree(text=batcomm$tre) ab <-batcomm$ab[, phy$tip.label] plot(evoeveparam(phy, ab)) plot(evoeveparam(phy, ab, q=seq(0, 10, length=20)))

D.2. Functions evouniparam and plot.evouniparam

Function "evouniparam" calculates feature uniqueness (features = branch units on a phylogenetic [or functional] tree) using parametric indices q funi HCDT , q funi Hill , q funi Renyi . Function "plot.evouniparam" plots the results of function "evouniparam".

usage:

evouniparam(phyl, comm, method = c("hill", "HCDT", "renyi"), q = 2, tol = 1e-08) plot.evouniparam(x, legend = TRUE, legendposi = "topright", type="b", col = if(is.numeric(x)) NULL else sample(colors

dependence: adiv, ape, phytools, phylobase arguments:  phyl: an object inheriting the class "phylo" (see package ape), "phylo4" (see package phylobase), or "hclust".  comm: a data frame or a matrix typically with communities as rows, species as columns and an index of abundance as entries. Species should be labeled as in the tree (object phyl) where they are the tips.  method: a character with one of the following codes: "hill" (for q funi Hill ), "HCDT" (for q funi HCDT ), or "renyi" (for q funi Renyi ). If several value are given, only the first one is considered.  q: a vector with nonnegative value(s) for parameter "q" of functions q funi Hill , q funi HCDT , or q funi Renyi .  tol: numeric tolerance threshold: values between -"tol" and "tol" are considered equal to zero.  x: an object of class "evouniparam" obtained with function "evouniparam".  legend: a logical. If TRUE a legend is given with the colour, the type of line (etc.) used to define the uniqueness curve of each community.  legendposi: a character that gives the position of the legend to be passed to function "legend" of the base of R.  type: a character to be passed to the graphic parameter "type" of functions "plot" and "lines" used to draw the uniqueness curve of each community.  col: vector of colours to be passed to the graphic parameter "col" of functions "plot" and "lines" to define the colour of the uniqueness curve of each community.  lty: vector of type of line (plain, broken etc.) to be passed to the graphic parameter "lty" of functions "plot" and "lines" used to draw the uniqueness curve of each community.  pch: type of point (open circle, close circle, square etc.) to be passed to the graphic parameter "pch" of functions "plot" and "lines" used to draw the uniqueness level of each community.  ...: other parameters can be added and passed to the functions "plot" and "lines" used to draw the graphic.

value

If only one value of q is given, the function "evouniparam" returns a vector with communities' uniqueness values.

If more than one value of q is given, a list of two objects is returned:  q: the vector of values for q;  uni: a data frame with the uniqueness of each community calculated for all values of q.

The function "plot.evouniparam" returns a graphic.

example: library(adiv) library(ape) library(phytools) library(phylobase) data(batcomm) phy <-read.tree(text=batcomm$tre) ab <-batcomm$ab[, phy$tip.label] plot(evouniparam(phy, ab)) plot(evouniparam(phy, ab, q=seq(0, 10, length=20)))

Pavoine, S., 2018. adiv: Analysis of Diversity. R package, version 1.2. https://CRAN.Rproject.org/package=adiv evoeveparam <function(phyl, comm, method = c("hill", "HCDT", "renyi"), q = 2, option = 1:3, H = NULL, tol = 1e-8){ tre <-.checkphyloarg(phyl) PHYTEST <-tre$phyl.phylo A <-write.tree(PHYTEST) if(!substr(A, nchar(A)-1, nchar(A))==");") PHYTEST <-read.tree(text=paste0("(", substr(A,1,nchar(A)-1), ");")) tre4 <-as(PHYTEST, "phylo4") m <-comm method <-method[1] option <-option [1] if(!option%in%(1:3)) stop("Unavailable option") if(!method%in%c("HCDT", "hill", "renyi")) stop("Unavailable method") if(!(is.numeric(q) | is.integer(q))) stop("Incorrect definition for q") if(any(q < -tol)) stop("q must be nonnegative") if(is.null(colnames(m))) stop("m must have names for column") if(any m<0)) stop("m should contain nonnegative values") if(any(rowSums(m)==0)) stop("empty communities should be discarded") if(any(!colnames(m)%in%tipLabels(tre4))) stop("m contains tip names that are not available in phyl") if(!hasEdgeLength(tre4)){ treape <-as(tre4, "phylo") tre4 <-as(compute.brlen(treape, 1), "phylo4") } if(!isRooted(tre4)){ treape <-as(tre4, "phylo") treape$root.edge <-0 tre4 <-as(treape, "phylo4") } if(!hasNodeLabels(tre4)) nodeLabels(tre4) <-names(nodeLabels(tre4)) else{ e <-nodeLabels(tre4) e[is.na(e)] <-names(e[is.na(e)]) nodeLabels(tre4) <-e } reduceTree <-function(tree){ C <-vcv(tree, model = "Brownian") if(min(diag(C))<1){ warning("The phylogenetic tree was re-scaled so that the shortest distance from tip to root is equal to 1") tree$edge.length <-tree$edge.length/min(diag(C)) } return(tree) } if(method!="hill") tre4 <-as(reduceTree(as(tre4, "phylo")), "phylo4") a <-edgeLength(tre4) b <-a[getEdge(tre4, rootNode(tre4))] if(is.na(b)){ ab <-a ab[getEdge(tre4, rootNode(tre4))] <-0 edgeLength(tre4) <-ab } tre4 <-subset(tre4, tips.exclude=tipLabels(tre4)[!tipLabels(tre4)%in%colnames(m)]) des <-lapply(as.vector(nodeLabels(tre4)), function(x) names(descendants(tre4, x, type="tips"))) des <-lapply(des, function(x) x[x%in%colnames(m)]) fun <-function(namestips){ return(rowSums(m[, namestips])) } abundancesnodes <-cbind.data.frame(lapply(des, fun)) mBabtot <-cbind(abundancesnodes, m) colnames(mBabtot) <-c(nodeLabels(tre4), colnames(m)) branchlengths <-getEdge(tre4, colnames(mBabtot), missing = "OK") branchlengths <-edgeLength(tre4) [branchlengths] if(any(is.na(branchlengths))) stop("the lengths of some branches are missing in the phylogenetic tree; note that lengths of zero are allowed") tab1 <-mBabtot tab2 <-(t(t(mBabtot)*branchlengths)) composition <-as.data.frame(sweep(tab1, 1, rowSums(tab2), "/")) tre.phylo <-as(tre4, "phylo") V <-diag(vcv(tre.phylo, model = "Brownian")) names(V) <-tre.phylo$tip.label mV <-m[, names(

warning("Parameter H, a numeric, must be specified if option = 3; option 2 was used here") CC <-apply(mV, 1, function(

resi <-(1-sum(b*y^q))/(q-1) } return(resi) } res <-sapply(as.data.frame(t(x)), funHCDT, q) return(res) } hill <-function(x, q){ funhill <-function(y, q) { b <-branchlengths[y>0] y <-y[y>0] if(abs(q-1) < tol){ resi <-exp(-sum(b*y*log(y))) } else{ resi <-(sum(b*y^q))^(1/(1-q)) } return(resi) } res <-sapply(as.data.frame(t(x)), funhill, q) return(res) } renyi <-function(x, q){ funrenyi <-function(y, q) { b <-branchlengths[y>0] y <-y[y>0] if(abs(q-1) < tol){ resi <--sum(b*y*log(y)) } else{ resi <-log((sum(b*y^q))^(1/(1-q))) } return(resi) } res <-sapply(as.data.frame(t(x)), funrenyi, q) return(res) } funq <-function(q){ if(method == "HCDT"){ T <-HCDT(composition, q) if(abs(q-1) < tol){ vres <-T/log(CC) } else{ vres <-T/(1-CC^(1-q))*(q-1) } vres[T < tol] <-0 return(vres) } if(method == "hill"){ vres <-hill(composition, q)/CC return(vres) } if(method == "renyi"){ R <-renyi(composition, q) vres <-R/log(CC) vres[R < tol] <-0 return(vres) } } if(length(q)==1){ v <-funq(q) class(v) <-"evoeveparam" return(v) } if ( length(q) > 1){ calcul1 <-sapply(q, funq) tab1 <-cbind.data.frame(calcul1) listtotale <-list() listtotale$q <-q listtotale$eve <-tab1 class(listtotale) <-"evoeveparam" return(listtotale) } } evouniparam <function(phyl, comm, method = c("hill", "HCDT", "renyi"), q = 2, tol = 1e-8){ tre <-.checkphyloarg(phyl) phyl1 <-tre$phyl.phylo A <-write.tree(phyl1) if(!substr(A, nchar(A)-1, nchar(A))==");") phyl1 <-read.tree(text=paste0("(", substr(A,1,nchar(A)-1), ");")) method <-method[1] if(method=="HCDT") method <-"tsallis" reduceTree <-function(tree){ C <-vcv(tree, model = "Brownian") if(min(diag(C))<1){ warning("The phylogenetic tree was re-scaled so that the shortest distance from tip to root is equal to 1") tree$edge.length <-tree$edge.length/min(diag(C)) } return(tree) } if(method!="hill") phyl1 <-reduceTree(phyl1) hi <-diag(vcv(phyl1, model = "Brownian")) phylstar <-starTree(phyl1$tip.label, hi) if(length(q)==1){ vnum <-evodivparam(phyl1, comm, method, q, tol) vden <-evodivparam(phylstar, comm, method, q, tol) v <-vnum/vden v[vnum < tol] <-0 class(v) <-"evouniparam" return(v) } if ( length(q) > 1){ tabnum <-evodivparam(phyl1, comm, method, q, tol)$div tabden <-evodivparam(phylstar, comm, method, q, tol)$div tab1 <-as.matrix(tabnum)/as.matrix(tabden) tab1[as.matrix(tabnum) < tol] <-0 listtotale <-list() listtotale$q <-q listtotale$uni <-as.data.frame(tab1) class(listtotale) <-"evouniparam" return(listtotale) } } plot.evoeveparam <function(x, legend = TRUE, legendposi = "topright", type="b", col = if(is.numeric(x)) NULL else sample(colors(distinct = TRUE), nrow(x$eve)), lty = if(is.numeric(x)) NULL else rep(1, nrow(x$eve)), pch = if(is.numeric(x)) NULL else rep(19, nrow(x$eve)), ...) { if(is.numeric(x)){ y <-as.vector(x) names(y) <-names(x) dotchart(y, xlab = "Evenness", ..

, ylim = c(min(x$eve), max(x$eve)), pch = pch[1], , ylab="Evenness", xlab="q", ...) for(i in 1:nrow(x$eve)){ lines(x$q, x$eve if(inherits(phyl,"phylo4d"))

phyl <-extractTree(phyl) if(inherits(phyl,"phylo4"))

phyl.phylo <-as(phyl,"phylo") if(inherits(phyl,"phylo")){ phyl.phylo <-phyl phyl <-as(phyl.phylo,"phylo4") } if(inherits(phyl, "hclust")){ phyl.phylo <-as.phylo(phyl) phyl <-as(phyl.phylo,"phylo4") } if(!exists("phyl.phylo")) stop("unconvenient phyl: must be a hclust, phylo, phylog, phylo4 or phylo4d object") if(!isRooted(phyl)){ phyl.phylo$root.edge <-0 phyl <-as(phyl.phylo, "phylo4") } phyl <-reorder(phyl) phyl.phylo <-as(phyl, "phylo") res <-list(phyl = phyl, phyl.phylo = phyl.phylo) }