| Fast NJ-like algorithms to deal with incomplete distance matrices1Equipe Méthodes et Algorithmes pour la Bioinformatique, LIRMM, CNRS – Université Montpellier 2, 161 rue Ada, 34392 Montpellier Cedex 05, France 2Groupe Phylogénie Moléculaire, ISEM, CNRS – Université Montpellier 2, C.C. 064, 34095 Montpellier Cedex 05, France 3Equipe Bioinformatique Théorique, LSIIT, Université Louis Pasteur, Strasbourg 1, Pôle API, Boulevard Sébastien Brant, BP 10413, 67412 Illkirch Cedex, France
BMC Bioinformatics 2008, 9:166doi:10.1186/1471-2105-9-166 The electronic version of this article is the complete one and can be found online at: http://www.biomedcentral.com/1471-2105/9/166
©
2008 Criscuolo and Gascuel; licensee BioMed Central Ltd. AbstractBackgroundDistance-based phylogeny inference methods first estimate evolutionary distances between every pair of taxa, then build a tree from the so-obtained distance matrix. These methods are fast and fairly accurate. However, they hardly deal with incomplete distance matrices. Such matrices are frequent with recent multi-gene studies, when two species do not share any gene in analyzed data. The few existing algorithms to infer trees with satisfying accuracy from incomplete distance matrices have time complexity in O(n4) or more, where n is the number of taxa, which precludes large scale studies. Agglomerative distance algorithms (e.g. NJ [1,2]) are much faster, with time complexity in O(n3) which allows huge datasets and heavy bootstrap analyses to be dealt with. These algorithms proceed in three steps: (a) search for the taxon pair to be agglomerated, (b) estimate the lengths of the two so-created branches, (c) reduce the distance matrix and return to (a) until the tree is fully resolved. But available agglomerative algorithms cannot deal with incomplete matrices. ResultsWe propose an adaptation to incomplete matrices of three agglomerative algorithms, namely NJ, BIONJ [3] and MVR [4]. Our adaptation generalizes to incomplete matrices the taxon pair selection criterion of NJ (also used by BIONJ and MVR), and combines this generalized criterion with that of ADDTREE [5]. Steps (b) and (c) are also modified, but O(n3) time complexity is kept. The performance of these new algorithms is studied with large scale simulations, which mimic multi-gene phylogenomic datasets. Our new algorithms – named NJ*, BIONJ* and MVR* – infer phylogenetic trees that are as least as accurate as those inferred by other available methods, but with much faster running times. MVR* presents the best overall performance. This algorithm accounts for the variance of the pairwise evolutionary distance estimates, and is well suited for multi-gene studies where some distances are accurately estimated using numerous genes, whereas others are poorly estimated (or not estimated) due to the low number (absence) of sequenced genes being shared by both species. ConclusionOur distance-based agglomerative algorithms NJ*, BIONJ* and MVR* are fast and accurate, and should be quite useful for large scale phylogenomic studies. When combined with the SDM method [6] to estimate a distance matrix from multiple genes, they offer a relevant alternative to usual supertree techniques [7]. Binaries and all simulated data are downloadable from [8]. BackgroundPhylogeny inference methods can be classified into two main categories: character-based (e.g. maximum-parsimony or maximum-likelihood) and distance-based approaches. The latter have low running times which are quite useful (mandatory in some cases) to perform large-scale studies and bootstrap analyses. A number of computer simulations [9-17] have shown that distance methods are fairly accurate, though not as accurate as likelihood-based methods that are much more time consuming. Using any distance-based method first requires to estimate the pairwise evolutionary distances between every taxon pair. These distances are usually estimated from DNA, RNA or protein sequences, but can also be obtained from DNA-DNA hybridization experiments or, e.g., computed from morphological data (see [18] for a review on distance estimation from various data types). In the last few years, phylogenomic studies (i.e. phylogeny reconstruction from large gene collections [7]) have instigated to the development of fast tree-building techniques being able to infer trees from datasets comprising hundreds of genes and taxa. The low-level gene combination involves concatenating the different genes into a unique supermatrix of characters, and then analyzing this matrix with a standard tree building method. This approach was shown to perform poorly when combined with distance methods, due to inaccurate distance estimations from such large heterogeneous character matrix [6]. Better distance-based trees are obtained by extracting the phylogenetic information from each gene separately, and then combining resulting information sources into a unique distance supermatrix. The Average Consensus Supertree (ACS [19]) and Super Distance Matrix (SDM [6]) techniques input a collection of distance matrices being estimated from each gene separately (the so-called medium-level combination), or being equivalent to the gene trees (the high-level combination). These distance matrices are deformed, without modifying their topological message, and then averaged to obtain the distance supermatrix, which is finally analyzed using a distance-based tree building algorithm. Estimating the distance supermatrix is fast. However, missing entries may occur in distance supermatrices depending on the extent of taxon overlap within the source matrices. For example, with the two large data sets of Driskell et al. [20], which were collected from Swiss-Prot and Gen-Bank thanks to a computer program, the ratio of missing distances is ~19% and ~1.2%, respectively. These distances are missing because only a few genes are sequenced within each species, meaning that a number of species pairs do not share any sequenced gene in common and cannot be compared using available data. However, Driskell et al. showed that, despite the sparseness of data and the fact that only a small subset of these data is potentially phylogenetically informative, a topological signal still emerges, which provides useful insights into the tree of life (see [20] and below for details). Analogous findings were reported by a number of authors in various contexts [21-23], and tree building from sparse data has become topical, as can be seen from the flourishing literature on supertrees. However, tree building from incomplete distance matrices is NP-hard [24], and thus practical algorithms are heuristics. The indirect approach involves first estimating missing distances by applying an ultrametric [25], additive [26], decomposition-based [27], or quartet-based [28] completion algorithm. The TREX package [29] provides several implementations of such algorithms to be used before tree building using any standard method with the completed matrix. The direct approach involves using a weighted least-squares (WLS) algorithm and associating missing distances with null weight (i.e. infinite variance), which means that missing distances are simply discarded from WLS computations ([18], pp. 449). The FITCH algorithm [30] from the PHYLIP package [31] and the MWMODIF algorithm [32] from TREX implement this technique. A combination of both direct and indirect methods is provided by MW* [33] (also available in TREX); this algorithm first applies an ultrametric or additive completion algorithm (depending on the density of missing distances) and then infers a tree using MWMODIF, where weights are set to 1.0 for known distances, 0.5 for estimated distances, and 0.0 for missing distances (if any remain). All these (direct or indirect) algorithms have O(n4) time complexity or more, where n is the number of taxa. This limits their application to medium-sized datasets (say 200 taxa without bootstrapping, see below). Agglomerative algorithms are much faster and allow dealing with thousands of taxa, as soon as the distance matrix is complete. The most popular of them is the Neighbor-Joining (NJ) algorithm [1,2]. Starting from a star tree, agglomerative algorithms iteratively perform the three following steps, until the tree is completely resolved: (a) select a taxon pair xy that is agglomerated into a new node u; (b) estimate the length of the two so-created external branches ux and uy; (c) replace x and y by u in the distance matrix, and estimate the new distances between u and the not-yet-agglomerated taxa. Step (a) is more time consuming than the two other steps, because of testing all the O(n2) taxon pairs to select the optimal one. To this purpose, NJ optimizes a numerical criterion that is denoted as Qxy. This criterion admits several interpretations related to the Minimum Evolution principle [1,34], but also to the acentrality of the considered pair [35,36]. In this last interpretation (used here), Qxy measures how much the path joining x to y is far from the other taxa i ≠ x, y. The xy pair maximizing Qxy corresponds to the two taxa which are most distant from the other ones and is the best candidate for agglomeration. Another criterion, denoted as Nxy, is used by ADDTREE [5]; this second criterion is based on the four point condition [37,38] and counts the number of taxon quartets xyij where x and y are neighbors. When the distance matrix exactly corresponds to a tree (it is then said to be additive), Nxy indicates all pairs of sibling taxa in the tree, whereas Qxy indicates just one such taxon pair. We shall see that this property of Nxy is a great advantage when dealing with incomplete distance matrices. Indeed, Qxy is sometimes unusable whereas Nxy is still informative. Steps (b) and (c) essentially correspond to distance averaging, which requires O(n) run time. These three steps being repeated n - 2 times, agglomerative algorithms require O(n3) time when using the Qxy pair selection criterion, and O(n4) with Nxy [39]. Several refinements of the NJ algorithm have been proposed. BIONJ [3] minimizes the variances associated to the new distances being estimated during each reduction step (c). This way, BIONJ makes use at each iteration of reliable distance estimates to select the new taxon pairs to be agglomerated. To this aim, BIONJ uses a simple Poisson model of the variances and covariances of the distances being contained in the initial distance matrix. BIONJ was generalized into the Minimum Variance Reduction algorithm (MVR [4]), a WLS variant of which can deal with any distance variance model, but which does not account for the distance covariances. It has been shown using computer simulations that this variant (named WLS-MVR in [4] but referred here as MVR for simplicity) has similar accuracy as NJ when applied to distance matrices estimated from one-gene alignments [4]. WEIGHBOR [40] further refines BIONJ approach and uses an agglomeration criterion which accounts for the variances of evolutionary distances. All these algorithms require O(n3) time. Faster, sophisticated distance-based algorithms have been proposed in the last few years [41-46], some of them being clearly more accurate than NJ and BIONJ (e.g. FASTME [42] and STC [44], in O(n2 log(n)) and O(n2), respectively). In this paper, we propose an adaptation of the agglomerative scheme to quickly infer phylogenetic trees from incomplete distance matrices. We show that the Qxy criterion may be rewritten to express the mean acentrality of the xy taxon pair. In the same way, the Nxy criterion may be rewritten to express the mean number of taxon quartets where x and y are neighbors. By estimating these two means using all available (non-missing) distances, we define the two criteria Results and DiscussionSeveral computer simulations are presented in this section to assess the performance of NJ*, BIONJ* and MVR*. We first compare the agglomeration criteria Comparison of agglomeration criteriaOur approach is similar to Makarenkov and Lapointe's [33]. We analyze with various algorithms and criteria a distance matrix with randomly deleted entries. The distance matrix we use is additive, i.e. is obtained from a tree by computing the path length distance between every taxon pair. Let T denote this tree and (Tij) be the corresponding distance matrix, where Tij is the path-length (or patristic) distance between taxa i and j in T. When no entry is missing, such an additive matrix uniquely defines T, which is recovered by any consistent algorithms (as are all algorithms being tested here). When entries are missing in (Tij), recovering T becomes a difficult task (see above), and we measure how well the algorithms perform when given an increasing number of missing distances. Such data thus are not realistic from a biological stand point, as evolutionary distances estimated from sequences are not additive, but this is a simple and standard approach to compare algorithms and agglomeration criteria. We use for the correct tree T the phylogeny of 75 placental mammals from [6]. The percentage of missing entries is Pmiss = 1%, 5%, 10%, 20%, 30%. For each Pmiss value, 500 replicates are randomly generated. From each of these 5 × 500 incomplete additive distance matrices, a tree Each inferred tree
All curves in Figure 1 are decreasing; as expected, the correct tree T is better recovered (i.e. the mean dq value between Comparison of reconstruction algorithms with distance supermatricesWe re-use a simulation protocol that we have used previously to compare a number of tree-reconstruction methods in a phylogenomic context [6]. This protocol involves generating sequences and evolving them along trees, and is more realistic than the comparison described above. We first summarize this protocol, and then report the results that are obtained with the simulated datasets by FITCH, MW*, NJ*, BIONJ* and MVR*. To estimate the distance supermatrix that is the input of these algorithms, we use the SDM method ([6], see also Methods) which computes a supermatrix that summarizes the topological signal being contained in a collection Simulations are as follows (see [6] for more details). Starting from a randomly generated tree T with n = 48 taxa, evolution of k genes is simulated, with k = 2, 4, ..., 20. For each of the k genes, some taxa are randomly deleted. Two deletion probabilities are used: 25% to preserve high overlap between the different taxon sets, and 75% to induce low overlap. From these k partially deleted gene alignments, k distance matrices are estimated to compose the collection CΔ of source matrices. The SDM method is then run with CΔ to obtain a distance supermatrix corresponding to a medium-level combination of the k partially deleted genes. To study the high-level combination, a phylogenetic tree is inferred by PhyML [17] from each of the k partially deleted genes; then, the path length distance between each taxon pair for each of the k phylogenies is computed, to form the collection CT of k additive distance matrices that are equivalent to the k PhyML trees. Finally, SDM is applied to CT to obtain a distance supermatrix corresponding to a high-level gene combination. This simulation protocol is repeated 500 times for each value of k and each deletion proportion. We obtain this way (10 gene collection sizes × 500 collections × 2 overlap conditions × 2 gene combination levels) = 20,000 distance supermatrices, which are denoted as ( FITCH and MW* are run with default options. In accordance with Figure 1, s is set to 15 for NJ*, BIONJ* and MVR*. With BIONJ*, Vij variances (associated with Table 1. Topological accuracy with medium-level distance supermatrices Table 2. Topological accuracy with high-level distance supermatrices In the medium-level gene combination, NJ* and MW* are outperformed by other algorithms. With a 25% deletion rate, BIONJ* has best topological accuracy, followed by FITCH. However, the sign-test indicates that the difference between these two algorithms is moderately significant as the p-value is lower than 0.05 for only five k values (= 6, 8, 12, 16, and 18). With a 75% deletion rate, FITCH is best, but again the sign-test shows that FITCH, BIONJ* and MVR* are broadly equivalent. With high-level combination distance supermatrices, NJ* and MW* still tend to be outperformed by other algorithms. BIONJ* is in between, and the best mean dq values are observed with MVR* which is followed by FITCH. The sign-test broadly confirms the significance of this observation, though the accuracy difference between MVR* and FITCH is relatively low. Altogether, these experiments show that MVR* is at least as accurate as FITCH, that BIONJ* has similar performance, while NJ* and MW* are behind these three algorithms. Comparing these findings with the results from (see Figure 2 in [6]), we see that (in the high-level framework, Table 2) MVR* is more accurate than the standard Matrix Representation with Parsimony method (MRP, [51,52]), in most cases; e.g. with k = 10, MVR* has mean dq values of 0.0171 and 0.0663, for 25% and 75% deletion rate, respectively, while mean dq values of MRP equal 0.0175 and 0.1152. MVR* (combined with SDM) outperforms MRP with sparse information (75% deletion rate and/or low number of genes), while both approaches are nearly equivalent when the information is abundant (25% deletion rate). An explanation [53] of this finding could be that the distance approach not only uses the topology of the source trees (as MRP) but also their branch lengths. Distance-based supertrees thus contain more information than MRP supertrees, which makes a noticeable difference when the information is sparse, but does not impact much the results with abundant information (see also following simulation results). Results with simulations based on Driskell et al. [20] datasetThis section aims to measure the accuracy of the different tree building algorithms when applied to simulated datasets being more realistic than those commonly used in a phylogenomic perspective. Most notably, uniformly random gene deletion (used in previous section, following [54]) is not fully realistic because some genes (e.g. cytochrome b) are sequenced for most species, while some other genes are rarely sequenced (or rare among living species). It follows that the gene presence/absence pattern is different with real datasets to this being induced by uniformly random gene deletion (see [20,55-57] for illustrative examples). To this purpose, we use the character supermatrix from Driskell et al. [20], which comprises 69 green plant species and 254 genes, and was built via an automated exploration process of GenBank. This matrix contains a total number of 2777 sequences and has 87% missing characters, which are unequally distributed among taxa. Only 3 taxa have more than 50% genes, whereas 42 have 10% genes or less. In the same way, a few genes are present in most taxa (e.g., the 2 most sequenced genes belong to 59 taxa), whereas other genes are rare (e.g. 121 genes are present in at most 5 taxa). However, these k = 254 genes are complementary and the SDM distance supermatrix only contains ~1.2% missing entries. This low proportion of missing entries is favorable to tree reconstruction, but still requires an algorithm able to deal with incomplete matrices. We use a simulation protocol analogous to that described above [6]. The only difference is the deletion procedure, with random deletion replaced by the gene presence/absence pattern of (see Figure 2B in [20]). We generate 100 datasets this way with n = 69 taxa and k = 254 genes. From these 100 datasets, we infer 100 distance matrix collections CΔ and 100 tree collections CT. Each of these 2 × 100 collections is dealt with by SDM, to obtain a distance supermatrix ( Table 3. Topological accuracy with datasets generated from Driskell et al. [20] NJ*, BIONJ* and MVR* do not show any significant difference when used with s = 15 and s = max (as assessed by the sign-test, all p-values are much larger than 0.05, results not shown). This confirms the results of the previous experiments to compare our various agglomeration criteria. NJ* has the worst accuracy, especially in the high-level combination framework. MW*, FITCH and BIONJ* show similar performance, while MVR* is best among distance approaches in the two gene combination levels. Moreover, the difference between MVR* and FITCH is highly significant (sign-test p-value ≈ 0.0). In the high-level framework, MVR* tends to be better than MRP, although the information is quite abundant (254 genes, ~1.2% of missing distances); however, the difference is not significant with 100 replicates (sign-test p-value ≈ 0.2). The results among distance methods are explained by the fact that MVR* uses fairly accurate estimates ( Run time comparisonRun times with various dataset sizes have been measured on a PC Pentium IV 1.8 GHz (1 Gb RAM) and are displayed in Table 4. We do not report the run times of NJ* and BIONJ*, as they are nearly the same as those of MVR*. In fact, NJ* and BIONJ* are ~2% faster than MVR*, because they are simpler, but these simplifications does not concern the heavy O(n3) parts of the algorithms (see Methods). We also report the run times of SDM [6], which are in the same range as the fastest tree building algorithms, except with Driskell et al. [20]-like datasets, where SDM has to summarize a large number (254) of source matrices, but where the number of taxa (69) is relatively low. In this case, the run time of SDM is analogous to that of FITCH and MW* and remains quite handy (~5 minutes per dataset). Table 4. Run times As expected from their mere principle, the run times of the various tree building algorithms are not much affected by the proportion of missing distances, which is induced by the taxon deletion rate (25% or 75%) and the number of source matrices (k). The only apparent exceptions correspond to k = 2 and 75% deletion rate, where all algorithms seem to be quite fast; but in this case the distance supermatrices are of low size (~20, ~42 and ~85 for n equal to 48, 96 and 192, respectively), which explains this finding. Indeed, in this case it occurs frequently that some taxa have no gene (among 2) in common with any of the other taxa, and such taxa cannot be analyzed as all their distances to the other taxa are missing. With 25% taxon deletion proportion, n = 48 and k = 10, run times of ~3 hours and ~5 hours are required by FITCH and MW*, respectively, to build the 500 trees corresponding to all gene collections in any given gene combination level. The same task, which induces calculations similar to bootstrapping, is achieved in ~30 seconds by any of our agglomerative algorithms. The difference between the agglomerative algorithms and the others increases when the number of taxa increases, as expected given that their time complexity are O(sn3) (i.e. O(n3) as s is kept constant) and O(n4) or more, respectively. With 192 taxa, FITCH and MW* require more than 3 hours to build a single tree, while the agglomerative algorithms require less than 1 minute; this run time makes easy to perform a bootstrap study with our algorithms, but pretty much impossible with FITCH or MW*. With even larger datasets (say, above 500 taxa) neither FITCH nor MW* can be used to build a single tree, while our algorithms still run in a few minutes. ConclusionThanks to the ever increasing flow of sequence data, phylogenomic analyses and supertree buildings are more and more frequently used to draw the evolutionary tree of living species. Larger and larger datasets are processed, requiring sophisticated approaches and algorithms. In this context, distance-based methods are quite useful, as they are both very fast and fairly accurate. New techniques, such as SDM [6], allow quickly estimating distance supermatrices that summarize the topological signal being contained in a collection of source distance matrices or gene trees. However, these supermatrices may be incomplete due to low taxon coverage in the selected genes. In this (common) case, fast distance-based tree building algorithms such as NJ, BIONJ, FASTME or STC are no longer applicable. This paper presents an adaptation to incomplete distance matrices of several agglomerative algorithms, namely NJ, BIONJ and MVR. We show that the formulae forming the basis of these algorithms can be rewritten to account for missing distances. Moreover, the same holds for the quartet-based pair selection criterion of ADDTREE. Combining both NJ and ADDTREE generalized pair selection criteria, we obtain fast and accurate algorithms that require O(n3) run times, where n is the number of taxa, i.e. run times that are similar to NJ's. These three novel algorithms, named NJ*, BIONJ* and MVR*, show (in our simulations) topological accuracy similar or higher to that of FITCH and MW*, which are much more time consuming. MVR* appears to be best, followed by BIONJ*. In a phylogenomic context, MVR* accounts for (and benefits from, regarding other algorithms) the fact that gene distribution among species is very heterogeneous, which implies that some distances are accurately estimated (using numerous genes) while some others are poorly estimated (with few genes). Combined with the SDM method [6] to estimate distance supermatrices, MVR* and BIONJ* are relevant alternatives to standard supertree techniques [7], as MRP [51,52]. JAVA implementations of these algorithms are available in PhyD* software and downloadable from [8]. All our datasets are also available from this URL. Several research directions would deserve to be explored. The variances and covariances of the distance estimates in the distance supermatrix could be accounted for in a more complete and accurate way, e.g. in the line of WEIGHBOR [40] for the pair selection criterion, or using the generalized least-squares version of MVR [4]. There is a clear need for a pair selection criterion being able to point out xy taxon pairs, even when the corresponding Δxy distance is missing. Theoretical results highlighting the cases where our algorithms will succeed (or fail) in recovering the correct tree, would likely help to improve these algorithms or design new ones. Adapting to missing distances very fast algorithms [41-46] could be promising. Finally, dealing with missing distances is likely required in other (non phylogenomic) applications of phylogenetic trees, and in related problems, as phylogenetic network inference [60]. MethodsExisting agglomerative algorithms are defined by criteria and formulae which all can be rewritten as distance averages. These algorithms (e.g. NJ [1,2], BIONJ [3] and MVR [4]) are generalized to incomplete distance matrices by estimating these averages using available distances, when some of those are missing. In the following, we first define notation and present a generic agglomerative scheme that covers all the algorithms being discussed here. Then, we describe for each of the three agglomeration steps (pair selection, branch length estimation, and matrix reduction), how NJ is generalized into NJ* to deal with missing distances. NJ* is further refined by BIONJ* that incorporates a first simple estimation of the variance associated to each evolutionary distance. Finally, a second, more accurate estimation of this variance is used by MVR* that generalizes the weighted least-squares (WLS) version of the MVR [4] approach. NotationLet Ln = {1,2, ..., n} be the set of all taxa numbered from 1 to n, and (Δij) a distance matrix, where Δij corresponds to the evolutionary distance between taxa i, j ∈ Ln, and Δii = 0, ∀i ∈ Ln. Distance-based algorithms build a tree T (also denoted as Agglomerative algorithms with complete distance matricesA number of existing agglomerative algorithms to deal with complete matrices can be summarized using the following scheme [4]: • Input Ln = {1,2, ..., n} and (Δij); • r = n; • While r > 2, do: (a) Select the xy pair to be merged into u by optimizing an agglomeration criterion; (b) Estimate the branch lengths Txu and Tyu: (c) Reduce the distance matrix (Δij) for all i ≠ x, y: Δui = λi (Δxi - Txu) + (1 - λi)(Δyi - Tyu) with λi ∈ [0,1](2) (d) r = r - 1; • Output T. Step (a) in this generic scheme searches for the taxon pair xy to be merged by optimizing an agglomeration criterion. NJ, BIONJ and MVR select the pair which maximizes [1,2]: Let (Δij) be additive [61], i.e. be defined as the path-length distance between taxa in a phylogenetic tree T with positive branch lengths; then, maximizing Qxy over all taxon pairs selects a cherry of T, i.e. a pair of taxa being separated by a unique internal node in T. In other words, Qxy is consistent [36]. However, it is easily shown (using counter-examples) that the second best taxon pair (based on Qxy values) is not necessarily a cherry of T. Conversely, the ADDTREE [5] pair selection criterion implies that all cherries of T have highest criterion value. The ADDTREE criterion counts the number of times where the xy pair is a cherry in all taxon quartets xyij: where H(t) = 1 if t ≥ 0, and H(t) = 0 if t < 0. This criterion has integer values ranging from 0 to (n - 2)(n - 3)/2, and this maximum value is reached for all cherries (but for the cherries only) with additive distance matrices. Careful implementation [39] of ADDTREE allows for O(n4) run time. NJ, BIONJ and MVR are much faster. They first compute all Rz sums in Equation (3), and then compute in O(1) the Qxy value of each xy pair. Each agglomeration stage thus requires O(r2) time (branch-length estimation and matrix reduction are achieved in O(r)), and the whole algorithm is in O(n3). Moreover, Qxy can be seen as a continuous version of Nxy [62]. After xy pair selection, x and y are connected to the new node u, and the lengths of xu and yu branches are estimated using Equation (1). Assuming that (Δij) is additive and corresponds to tree T, we have Txu = (Δxy + Δxi - Δyi)/2, ∀i ≠ x, y. Equation (1) averages these elementary estimators using various (wi) weightings. With NJ, the average is equally-weighted and we have wi = w = 1/(2(r - 2)). We shall see that MVR uses different wi weights. Finally (step (c)), (Δij) is reduced by replacing x and y with the new node u, and by computing all Δui distances, ∀i ≠ x, y. When (Δij) is additive and corresponds to tree T, we have Δui = Δxi - Txu = Δyi - Tyu. Equation (2) averages these two elementary estimators. NJ uses equal weights (λi = 1 - λi = 1/2) while BIONJ and MVR adjust λi in order to minimize the variance of Δui and to have reliable distance estimates during all agglomeration stages. For this purpose, BIONJ and MVR use (approximate) models for the variances and covariances of the distance estimates in (Δij). NJ*: generalizing NJ to incomplete distance matricesWhen (Δij) is incomplete (missing entries are denoted as ∅), the criteria and equations above do not apply. We shall see in this section how they are generalized to define the NJ* algorithm, which keeps NJ's O(n3) time complexity and is nearly equivalent to NJ with complete matrices. (a) Agglomeration criterionLet which can be rewritten as: The sum in Equation (5) relates to terms representing how distant is the path joining x to y from other taxa i ≠ x, y (Δxi + Δyi - Δxy equals twice the distance between u and i), whereas the first term expresses the additional distance induced by Δxy. It has been shown [63,64] that the relative weight of these two factors is unique, due to consistency requirement, and which applies to incomplete distance matrices, and is identical to Other solutions are possible to extend Equation (5), e.g. preserving Δxy/(r - 2) term rather than transforming it into Δxy/( Maximizing • After step (a), for all i, j ∈ Lr - {x, y} we remove from • After step (c), we compute • for all i, j ∈ Lr - {u}, we add Δui and Δuj to Each of these three updating routines requires O(r2) time, just as pair selection using criterion (6), meaning that using However, as discussed earlier, a limitation of criterion
which expresses the mean number of quartets where the xy pair corresponds to a cherry. However, selecting pairs using where Miss(z) = {i ∈ Lr, ≠ z : Δiz = ∅ } corresponds to missing entries for taxon z. Pair selection criteria (b) Branch length estimationEquation (1) is easily rewritten using non-missing entries only: NJ uses the same weight wi for every taxon i. The same holds for NJ*, that is, wi = w = 1/(2(| (c) Matrix reductionEquation (2) averages two elementary estimators, and with NJ this average is equally weighted. With missing distances it may occur that one of these two estimators is not applicable (e.g. when Δxi ≠ ∅), that both are applicable, or that none is applicable. Thus, in NJ* Equation (2) becomes: where λi = λ = 1/2. In the second and third cases, entries missing in the previous matrix are now present in the new, reduced matrix. We have seen that criterion (10) tends to maximize the number of such entries, in order to fill as fast as possible the missing distances in the running matrix. Just as branch length estimation (12), matrix reduction (13) requires O(r) time at each stage and does not impact total time complexity. Thus, NJ* requires O(n3) run times, when s is kept constant. BIONJ*: improving the reduction step, a first simple solutionBIONJ* uses the same pair selection criteria as NJ*, and adapts to missing distances BIONJ reduction procedure. BIONJ uses the degree of freedom corresponding to the λi parameter in Equation (2), in order to minimize the variance of the new Δui estimates in step (c). For this purpose, BIONJ assumes a simple Poisson model of the variances in the original (Δij) matrix, stating that the variance Vij of Δij is proportional to Δij. BIONJ also accounts for the covariances in (Δij) (see [3] for more details). It uses a single λ parameter for every xy pair, which does not depend on i and is given by Again, this equation may be seen as an average and can be rewritten using available entries only as: The reduction step (c) is achieved by BIONJ* as defined by Equation (13), but using so-defined λ* (instead of 1/2) when Δxi ≠ ∅ and Δyi ≠ ∅. Moreover, BIONJ starts with variance matrix (Vij) = (Δij) and reduces this matrix at each stage using λ value from Equation (14) and equation: Vui = λVxi + (1-λ)Vyi - λ(1 - λ)Vxy. BIONJ* combines this formula with Equation (13) and (15) to reduce the variance matrix, that is: Computing λ* using Equation (15) and achieving matrix reductions (13) and (16) requires O(r) run times. Thus, BIONJ* has O(n3) time complexity (when s is kept constant, else O(sn3)). MVR*: improving BIONJ* using variances dedicated to distance supermatricesThe BIONJ variance model is well suited for one-gene studies where distance estimations all use the same number of sites (at least when gaps are removed). With phylogenomic studies, some distances are computed using a large number of genes, and thus are reliable, while other distances are based on a few genes and are poorly estimated. Moreover, some distances may be missing due to the absence of common genes between the two species being compared. Altogether, this implies that the BIONJ and BIONJ* variance model can be improved to better fit phylogenomic requirements. This section describes the MVR* algorithm that is intended to this purpose. Steps (b) and (c) in the generic scheme are based on wi and λi parameters, respectively. The MVR algorithm [4] generalizes the BIONJ approach and uses these degrees of freedom in order to minimize the variance of the new estimates Tux, Tuy and Δui. The main difference from BIONJ is that MVR is able to deal with any variance-covariance model of the δij distance estimates, while BIONJ is restricted to the Poisson model. The MVR variant that we use here only considers the variances and neglects the covariances, thus assuming a weighted least-squares model (it was called MVR-WLS in [4], but is named MVR here for simplicity). Thus, MVR inputs a distance matrix (Δij) and the corresponding (Vij) variance matrix. We shall see in the next section how (Vij) is calculated to deal with phylogenomic data, and describe now the way MVR and MVR* use and update these matrices all along the agglomeration procedure. MVR uses Qxy pair selection criterion (3), just as NJ and BIONJ, while MVR* uses the same criteria and selection procedure as NJ* and BIONJ*. In MVR step (b), i.e. branch length estimation, wi weights in Equation (1) depend on i and are given by: MVR* uses Equation (12) (instead of Equation (1)) to deal with missing entries, and adapts above Equation (17) by replacing Lr by In MVR step (c), i.e. matrix reduction, a different λi parameter is associated in Equation (2) to each taxon i ≠ x, y using: This value puts more weight and confidence on (Δxi - Txu) when the associated variance Vxi is low, compared to Vyi. Equation (18) is also used by MVR*, but combined with Equation (13) to deal with missing distances. Finally, MVR (just like BIONJ) reduces the variance matrix at each agglomeration stage. To this purpose, MVR uses the following equation: This equation is also used by MVR* in combination with Equation (16). All the computations described above (except pair selection) require O(r) run times at each agglomeration stage, and thus MVR* has O(n3) time complexity, just as do NJ* and BIONJ*. Estimating the variances associated to distance supermatricesDistance supermatrices are computed [6,19] from source matrices which are first rescaled, and then averaged. SDM [6] inputs a collection C = Neglecting the variance of the deformation factors, we obtain a simple expression of the variance of where Several studies have shown that the variance Vij associated with the evolutionary distance Δij (estimated from a single gene) is approximately equal to Authors' contributionsAC designed and implemented the algorithms and experiments, performed the computations that are shown here, and wrote the manuscript. OG supervised these works, participated in the design of algorithms and experiments, and wrote the manuscript. AcknowledgementsSincere thanks to Vincent Berry, Richard Desper, Emmanuel J.P. Douzery and two anonymous referees for their suggestions and comments. This research was supported by SUPERTREE project of ACI-IMPBIO. Part of the work was carried out when OG participated to the Phylogenetics programme at Isaac Newton Institute for Mathematical Sciences, Cambridge, UK. References
|



on Google Scholar







author email
corresponding author email


Figure 1.










































