 Research
 Open Access
 Published:
Consistency of the NeighborNet Algorithm
Algorithms for Molecular Biology volume 2, Article number: 8 (2007)
Abstract
Background
NeighborNet is a novel method for phylogenetic analysis that is currently being widely used in areas such as virology, bacteriology, and plant evolution. Given an input distance matrix, NeighborNet produces a phylogenetic network, a generalization of an evolutionary or phylogenetic tree which allows the graphical representation of conflicting phylogenetic signals.
Results
In general, any network construction method should not depict more conflict than is found in the data, and, when the data is fitted well by a tree, the method should return a network that is close to this tree. In this paper we provide a formal proof that NeighborNet satisfies both of these requirements so that, in particular, NeighborNet is statistically consistent on circular distances.
1 Background
Phylogenetics is concerned with the construction and analysis of evolutionary or phylogenetic trees and networks to understand the evolution of species, populations and individuals [1]. NeighborNet is a phylogenetic analysis and data representation method introduced in [2]. It is loosely based on the popular NeighborJoining (NJ) method of Saitou and Nei [3], but with one fundamental difference: whereas NJ constructs phylogenetic trees, NeighborNet constructs phylogenetic networks. The method is widely used, in areas such as virology [4], bacteriology [5], plant evolution [6] and even linguistics [7].
Evolutionary processes such as hybridization between species, lateral transfer of genes, recombination within a population, and convergent evolution can all lead to evolutionary histories that are distinctly non treelike. Moreover, even when the underlying evolution is treelike, the presence of conflicting or ambiguous signal can make a single tree representation inappropriate. In these situations, phylogenetic network methods can be particularly useful (see e.g. [8]).
Phylogenetic networks are a generalization of phylogenetic trees (see Figure 1 for a typical example of a phylogenetic network). In case there are many conflicting phylogenetic signals supported by the data, NeighborNet can represent this conflict graphically. In particular a single network can represent several trees simultaneously, indicate whether or not the data is substantially treelike, and give evidence for possible reticulation or hybridization events. Evolutionary hypotheses suggested by the network can be tested directly using more detailed phylogenetic analyses and specialized biochemical methods (e.g. DNA fingerprinting or chromosome painting).
For any network construction method, it is vital that the network does not depict more conflict than is found in the data and that, if there are conflicting signals, then these should be represented by the network. At the same time, when the data is fitted well by a tree, the method should return a network that is close to being a tree. This is essential not just to avoid false inferences, but for the application of networks in statistical tests of the extent to which the data is treelike [9].
In this paper we provide a proof that these properties all hold for NeighborNet. Formally, we prove that if the input to NeighborNet is a circular distance function (distance matrix) [10], then the method returns a network that exactly represents the distance. Circular distance functions are more general than additive (patristic) distances on trees and, thus, as a corollary, if NeighborNet is given an additive distance it will return the corresponding tree. In this sense, NeighborNet is a statistically consistent method.
The paper is structured as follows: In Section 2 we introduce some basic notation, and in Section 3 we review the NeighborNet algorithm. In Section 4 we prove that NeighborNet is consistent (Theorem 4.1).
2 Preliminaries
In this section we present some notation that will be needed to describe the NeighborNet algorithm. We will assume some basic facts concerning phylogenetic trees, more details concerning which may be found in [11].
Throughout this paper, X will denote a finite set with cardinality n. A split S = {A, B} (of X) is a bipartition of X. We let Ϭ = Ϭ(X) = {{A, X\A}∅ ⊂ A ⊂ X} denote the set of all splits of X, and call any nonempty subset of Ϭ(X) a split system. A split weight function on X is a map ω: Ϭ(X) → ℝ_{≥0}. We let Ϭ_{ ω }denote the set {S ∈ Ϭω(S) > 0}, the support of ω.
Let Θ = x_{1}, ..., x_{ n }be an ordering of X. A split S = {A, B} is compatible with Θ if there exist i, j ∈ {1, ..., n}, i ≤ j, such that A = {x_{ i }, ..., x_{ j }} or B = {x_{ i }, ..., x_{ j }}. Note that if a split is compatible with an ordering Θ it is also compatible with its reversal x_{ n }, ..., x_{2}, x_{1} and with ordering x_{2}, ..., x_{ n }, x_{1}. We let Ϭ_{Θ} denote the set of those splits in Ϭ(X) which are compatible with ordering Θ. A split system Ϭ' is compatible with Θ if Ϭ' ⊆ Ϭ_{Θ}. In addition a split system Ϭ' ⊆ Ϭ(X) is circular if there exists an ordering Θ of X such that Ϭ' is compatible with Θ. Note that any split system corresponding to a phylogenetic tree is circular [[11], Ch. 3], and so circular split systems can be regarded as a generalization of split systems induced by phylogenetic trees. A split weight function ω is called circular if the split system Ϭ_{ ω }is circular. A distance function on X is a map d: X × X → ℝ_{≥0} such that for all x, y ∈ X both d(x, x) = 0 and d(x, y) = d(y, x) hold. Note that any split weight function ω on X induces a distance function d_{ ω }on X as follows: For a split S = {A, B} ∈ Ϭ(X) define the distance function or split metric d_{ S }by
and put
for all x, y ∈ X. A distance function d is called circular if there exits a circular split weight function ω such that d = d_{ ω }. An ordering Θ of X is said to be compatible with d if there exists ω such that d = d_{ ω }and Ϭ_{ ω }⊆ Ϭ_{Θ.} Note that the representation of a circular distance function d is unique, i.e., if d = ${d}_{{\omega}_{1}}$ and d = ${d}_{{\omega}_{2}}$ for circular split weight functions ω_{1} and ω_{2} then ω_{1} = ω_{2} holds [10].
Circular distances were introduced in [10] and have been further studied in, for example, [12] and [13]. Just as any treelike distance function on X can be uniquely represented by a phylogenetic tree [[11], ch. 7], any circular distance function d can be represented by a planar phylogenetic network such as the one pictured in Figure 1[14]. The program SplitsTree [9] allows the automatic generation of such a network for d by computing a circular split weight function ω with d = d_{ ω }.
3 Description of the NeighborNet algorithm
In this section we present a detailed description of the NeighborNet algorithm, as implemented in the current version of SplitsTree [9]. The NeighborNet algorithm was originally described in [2], where the reader may find a more informal description for how it works. For the convenience of the reader we will use the same notation as in [2] where possible.
In Figure 2 we present pseudocode for the NeighborNet algorithm. The aim of the algorithm is, for a given input distance function d, to compute a circular split weight function ω so that the distance function d_{ ω }gives a good approximation to d. The resulting distance function d_{ ω }can then be represented by a planar phylogenetic network as indicated in the last section.
To this end, NEIGHBORNET first computes an ordering Θ of X, and then applies a nonnegative leastsquares procedure to find a best fit for d within the set of distance functions {d_{ ϕ }ϕ:Ϭ(X) → ℝ_{≥0}, Ϭ_{ ϕ }⊆ Ϭ_{Θ}}. More details concerning the leastsquares procedure may be found in [2]: Here we will concentrate on the description of the key computation for finding an ordering Θ of X, which is detailed in the procedure FINDORDERING.
An (ordered) cluster is a nonempty finite set C together with an ordering Θ_{ C }= c_{1}, ..., c_{ k }of the elements in C, k = C. Two elements a, b ∈ C are called neighbors if there exists i ∈ {1, ..., k  1} such that a = c_{ i }and b = c_{i+1}, or b = c_{ i }and a = c_{i+1}. The input of the procedure FINDORDERING consists of a set $\u212d$ of mutually disjoint clusters, together with a distance function d on the set $Y={\cup}_{C\in \u212d}C$. The ordering Θ = y_{1}, ..., y_{ n }of Y that is returned by FINDORDERING must be compatible with the collection $\u212d$ of ordered clusters, that is, for every cluster C ∈ $\u212d$ there must exist i, j ∈ {1, ..., n}, i ≤ j, with the property that Θ_{ C }= y_{ i }, ..., y_{ j }or Θ_{ C }= y_{ j }, ..., y_{ i }.
The procedure FINDORDERING calls itself recursively. Apart from the base case (line 5 of Figure 2), where the recursion bottoms out, two different cases are considered – the reduction and selection cases (lines 7–15 and lines 17–22 of Figure 2, respectively). In the reduction case a cluster C ∈ $\u212d$ with k = C ≥ 3 is replaced by a smaller cluster C'. In particular, in lines 7–11 we let Θ_{ C }= c_{1}, ..., c_{ k }be the ordering of C with c_{1} = x, c_{2} = y, c_{3} = z, and put C' = (C\{x, y, z}) ∪ {u, v} and Θ_{C'}= u, v, c_{4}, ..., c_{ k }, where u and v are two new elements not contained in Y. Then, in lines 12–14, we define a distance function d' on the set Y' = (Y\{x, y, z}) ∪ {u, v} using the formulae:
where α, β and γ are positive real numbers satisfying α + β + γ = 1 (note that these formulae slightly differ from the ones given in [2] in which there is a typographical error). In the current implementation of NeighborNet the values α = β = γ = 1/3 are used.
When FINDORDERING is recursively called with the new collection ${\u212d}^{\prime}$ of clusters and distance function d' it returns an ordering ${\Theta}^{\prime}={{y}^{\prime}}_{1},\mathrm{...},{{y}^{\prime}}_{n1}$ of Y' that is compatible with ${\u212d}^{\prime}$. Thus, there exists i ∈ {1, ..., n  2} such that either u = ${{y}^{\prime}}_{i}$ and v = ${{y}^{\prime}}_{i+1}$ or v = ${{y}^{\prime}}_{i}$ and u = ${{y}^{\prime}}_{i+1}$. The resulting ordering Θ of Y is then defined (in line 14) as follows:
This completes the description of the reduction case.
We now describe the selection case. Note that in view of line 6 this case only applies if every cluster in $\u212d$ contains at most two elements. In lines 17–18, two clusters C_{1}, C_{2} ∈ $\u212d$ are selected and replaced by the single cluster C' = C_{1} ∪ C_{2}. The clusters C_{1} and C_{2} are selected as follows: We define a distance function $\overline{d}$ on the set of clusters $\u212d$ by
and select C_{1}, C_{2} ∈ $\u212d$, C_{1} ≠ C_{2} that minimize the quantity
where m is the number of clusters in $\u212d$. The function Q that is used to select pairs of clusters is called the Qcriterion. Note that this is a direct generalization of the selection criterion used in the NJ algorithm [2]. However, using only this criterion yields a method that is not consistent as illustrated in Figure 3. So, once the clusters C_{1} and C_{2} have been selected we use a second criterion to determine an ordering Θ_{C'}in line 19 for the new cluster C'. In particular, for every x ∈ C_{1} ∪ C_{2} we define
put $\widehat{m}$ = m + C_{1} + C_{2}  2, and select x_{1} ∈ C_{1} and x_{2} ∈ C_{2} that minimize the quantity
[d](x_{1}, x_{2}) = (
 2)d(x_{1}, x_{2})  R(x_{1})  R(x_{2}).
We then choose an ordering Θ_{C'}in which x_{1} and x_{2} are neighbors and for which every two elements that were neighbors in C_{1} or C_{2} remain neighbors. This completes the description of the selection case, and hence the description of the procedure FINDORDERING.
4 NeighborNet is consistent
In this section we prove the consistency of NeighborNet:
Theorem 4.1 If d: X × X → ℝ_{≥0} is a circular distance function, then the output of the NeighborNet algorithm is a circular split weight function ω: Ϭ(X) → ℝ_{≥0} with the property that d = d_{ ω }.
The key part of the NeighborNet algorithm is the procedure FINDORDERING. We will show that, for a circular distance function d = d_{ ω }on X, the call FINDORDERING({{x}x ∈ X}, d) will produce an ordering Θ of X that is compatible with d. The nonnegative least squares procedure finds the distance function in {d_{ ϕ }ϕ: Ϭ(X) → ℝ_{≥0}, Ϭ_{ ϕ }⊆ Ϭ_{Θ}} that is closest to d. As this set of distance functions includes d_{ ω }, the least squares procedure returns exactly d = d_{ ω }, proving the theorem.
We focus, then, on the proof that FINDORDERING behaves as required:
Theorem 4.2 Let d: Y × Y → ℝ_{≥0} be a distance function that is induced by a circular split weight function ω: Ϭ(Y) → ℝ_{≥0}. In addition, let $\u212d$ be a collection of mutually disjoint clusters with the property that Y = $Y={\cup}_{C\in \u212d}C$, and assume there exists an ordering of Y that is compatible with ω and with $\u212d$. Then FINDORDERING($\u212d$, d) will compute an ordering that is compatible with the collection of clusters $\u212d$ and with the split weight function ω.
We present the proof of this result in the remainder of this section. Suppose that the algorithm FINDORDERING is called with input $\u212d$ and d and that there exists an ordering that is compatible with $\u212d$ and d. Let $Y={\cup}_{C\in \u212d}C$. We prove Theorem 4.2 by induction, first on Y, the cardinality of Y, and then on $\u212d$, the number of clusters in $\u212d$.
The base case of the induction is Y ≤ 3. In this case the set of splits Ϭ_{Θ} equals Ϭ(Y) for every ordering of Y. In particular, any ordering of Y that is compatible with $\u212d$ is also compatible with ω.
We now assume that Y > 3 and make the following induction hypothesis:
If there exists an ordering compatible with distance function d' and ordered clusters ${\u212d}^{\prime}$, where either ${\cup}_{C\in {\u212d}^{\prime}}C$ < Y, or ${\cup}_{C\in {\u212d}^{\prime}}C$ = Y and ${\u212d}^{\prime}$ < $\u212d$, then FINDORDERING(${\u212d}^{\prime}$, d') will return an ordering compatible with ${\u212d}^{\prime}$ and d'.
There are two cases to consider. In the first case, $\u212d$ contains some cluster C with C ≥ 3. In the second case, $\u212d$ contains only clusters C with C ≤ 2.
4.1 Case 1: The reduction case
Suppose that there is C ∈ $\u212d$ with C ≥ 3. This is the reduction case in the description of the algorithm. The procedure FINDORDERING constructs a new set of clusters ${\u212d}^{\prime}$ (in line 11) and a new distance function d' (in line 12). We first show that, if there is an ordering compatible with $\u212d$ and d, then there is also an ordering compatible with ${\u212d}^{\prime}$ and d'.
Proposition 4.3 If ${\u212d}^{\prime}$ and d' are constructed according to lines 7–12 of the procedure FINDORDERING then there exists an ordering compatible with ${\u212d}^{\prime}$ and d'.
Proof: Suppose that $\tilde{\Theta}$ = y_{1}, ..., y_{ n }is an ordering of Y that is compatible with $\u212d$ and d, where, without loss of generality, we have Θ_{ C }= y_{1}, ..., y_{ k }. Let ${\tilde{\Theta}}^{\prime}$ = u, v, y_{4}, ..., y_{ n }= z_{1}, ..., z_{n1}, which is an ordering of Y' = ${\cup}_{C\in {\u212d}^{\prime}}C$. We claim that the ordering ${\tilde{\Theta}}^{\prime}$ is compatible with the collection ${\u212d}^{\prime}$ and with the distance function d'.
Since $\u212d$ is compatible with $\tilde{\Theta}$ it is straightforward to check that ${\u212d}^{\prime}$ is compatible with ${\tilde{\Theta}}^{\prime}$. Hence, we only need to show that ${\tilde{\Theta}}^{\prime}$ is compatible with d'. We will use a 4point condition that was first studied in a different context by Kalmanson [15] and has been shown to characterize circular distances in [12]. To be more precise, it suffices to show that, for every four elements ${z}_{{i}_{1}},{z}_{{i}_{2}},{z}_{{i}_{3}},{z}_{{i}_{4}}$, i_{1} <i_{2} <i_{3} <i_{4},
Case 1: {${z}_{{i}_{1}},{z}_{{i}_{2}},{z}_{{i}_{3}},{z}_{{i}_{4}}$} ∩ {u, v} = 0. The above inequalities follow immediately since d is circular, and d and d' as well as $\tilde{\Theta}$ and ${\tilde{\Theta}}^{\prime}$ coincide on Y'\{u, v}.
Case 2: {${z}_{{i}_{1}},{z}_{{i}_{2}},{z}_{{i}_{3}},{z}_{{i}_{4}}$} ∩ {u, v} = 1. Consider the situation ${z}_{{i}_{1}}$ = u. Then
The other inequalities can be derived in a completely analogous way.
Case 3: {${z}_{{i}_{1}},{z}_{{i}_{2}},{z}_{{i}_{3}},{z}_{{i}_{4}}$} ∩ {u, v} = 2. Then we have ${z}_{{i}_{1}}$ = u and ${z}_{{i}_{2}}$ = v and
The other inequality ${d}^{\prime}({z}_{{i}_{1}},{z}_{{i}_{3}})+{d}^{\prime}({z}_{{i}_{2}},{z}_{{i}_{4}})\ge {d}^{\prime}({z}_{{i}_{1}},{z}_{{i}_{4}})+{d}^{\prime}({z}_{{i}_{2}},{z}_{{i}_{3}})$ can be shown to hold in a similar way. ■
The procedure FINDORDERING calls itself recursively with ${\u212d}^{\prime}$ and d' as input. An ordering of Y', the union of ${\u212d}^{\prime}$, is returned. By Proposition 4.3 and the induction hypothesis, this ordering Θ' is compatible with ${\u212d}^{\prime}$ and d'. It is used to construct an ordering Θ on Y, in line 14, which becomes the output of the procedure.
Proposition 4.4 The ordering Θ is compatible with collection $\u212d$ and with the distance function d.
Proof: Since ${\u212d}^{\prime}$ is compatible with Θ' it is straightforward to check that $\u212d$ is compatible with Θ. Hence we only need to show that Θ is compatible with d.
Let orderings $\tilde{\Theta}$ = y_{1}, ..., y_{ n }of Y and ${\tilde{\Theta}}^{\prime}$ = z_{1}, ..., z_{n1}of Y' be as in the proof of Proposition 4.3 and let ω be the split weight function such that d = d_{ ω }. Then $\tilde{\Theta}$ is compatible with all splits S such that ω(S) > 0. Now consider some split S = {A, B} such that ω(S) > 0 and assume that y_{ n }∈ B. Then there exists i, j ∈ {1, ..., n  1}, i ≤ j, such that A = {y_{ i }, ..., y_{ j }}. Note also that, since the distance function d' is compatible with ordering ${\tilde{\Theta}}^{\prime}$ = z_{1}, ..., z_{n1}of Y' and, hence, is circular, there exists a unique circular split weight function ω': Ϭ(Y') → ℝ_{≥0} with the property that d' = d_{ω'}. We divide the remaining argument into five cases.
Case 1: j ≤ 3. Then, clearly, S is compatible with Θ.
Case 2: j ≥ 4 and i = 1. Define A' = {z_{1}, ..., z_{j1}} and the split S' = {A', Y'\A'} of Y'. Then we can express ω'(S') in terms of d' as follows (cf. [12]):
Thus, ω'(S') > 0. Hence, the split S' is compatible with the ordering Θ' of Y'. But then the split S is compatible with the ordering Θ of Y.
Case 3: j ≥ 4 and 2 ≤ i ≤ 3. We only consider the situation when i = 2; the situation i = 3 is completely analogous. Define A' = {z_{2}, ..., z_{j1}} and the split S' = {A', Y'\A'} of Y'. With a similar calculation as made for Case 2 we obtain ω'(S') ≥ (α + β)ω(S). Hence, ω'(S') > 0 and, thus, S' is compatible with Θ'. But then S is compatible with Θ.
Case 4: j ≥ 4 and i = 4. This case is similar to Case 2. Define A' = {z_{4}, ..., z_{j1}} and S' = {A', Y'\A'}. We obtain ω'(S') ≥ ω(S). Hence, as for Case 2, ω'(S') > 0 and, thus, S is compatible with Θ.
Case 5: j ≥ i ≥ 5. Define the split S' = {A, Y'\A}. Then we have ω'(S') = ω'(S') > 0. Hence, S' is compatible with Θ' and, thus, S is compatible with Θ. ■
4.2 Case 2: The selection case
Now suppose that there are no clusters C ∈ $\u212d$ with C ≥ 3. This is the selection case in the description of the algorithm.
In line 17 the algorithm selects two clusters that minimize (3):
where
Note that $\overline{d}$ is a distance function defined on the set of clusters $\u212d$. We will first show that $\overline{d}$ is circular. We do this in two steps: Proposition 4.5 and Proposition 4.6.
Proposition 4.5 Let d: M × M → ℝ_{≥0} be a circular distance function and Θ = x_{1}, ..., x_{ n }be an ordering of M that is compatible with d. Let M' = (M\{x_{1}, x_{2}}) ∪ {y} where y is a new element not contained in M. Define a distance function d': M' × M' → ℝ_{≥0} as follows:
where λ is a real number with the property that 0 <λ < 1. Then the following hold:
(i) d' is circular and compatible with ordering y, x_{3}, ..., x_{ n }of M'.
(ii) If z_{1}, ..., z_{n1}is an ordering of M' that is compatible with d' then at least one of the orderings x_{1}, x_{2}, z_{2}, ..., z_{n1}or x_{2}, x_{1}, z_{2}, ..., z_{n1}of M is compatible with d.
Proof: (i) and (ii) can be proven using convexity arguments, or in a way analogous to our proof of Propositions 4.3 and 4.4, respectively. ■
Proposition 4.6 The distance function $\overline{d}$, defined on the individual clusters in $\u212d$, is a circular distance. Moreover, for every ordering D_{1}, ..., D_{ k }of $\u212d$ that is compatible with $\overline{d}$ there exist orderings Θ_{ i }of D_{ i }, i ∈ {1, ..., k}, such that the ordering Θ_{1}, ..., Θ_{ k }of Y is compatible with distance function d.
Proof: We use multiple applications of Proposition 4.5, once for each cluster in $\u212d$ with two elements, and with λ = $\frac{1}{2}$ in each case. ■
We now have the more difficult task of showing that clusters C_{1} and C_{2} selected by the Qcriterion, that is by minimizing (3), are adjacent in at least one ordering of the clusters that is compatible with $\overline{d}$, as described in Proposition 4.6. This is the most technical part of the proof. The key step is the inequality established in Lemma 4.7. This is used to prove Theorem 4.8, which establishes that the Qcriterion when applied to a circular distance will always select a pair of elements that are adjacent in at least one ordering compatible with the circular distance. As a corollary it will follow that there exists an ordering of the clusters in $\u212d$ compatible with $\overline{d}$ where C_{1} and C_{2} are adjacent.
Lemma 4.7 Let Θ = x_{1}, x_{2}, ..., x_{ n }be an ordering of M that is compatible with circular distance d on M and suppose that 3 ≤ r ≤ ⌈n/2⌉. Let S = {A, M\A} be a split compatible with Θ where A = {x_{ i }, ..., x_{ j }}. Define Q_{ S }: M × M → ℝ by
and let

(i)
If min{A, M\A} > 1 and A ∩ {x_{1}, x_{ r }} = 1 then λ(S) < 0.

(ii)
Any other split S compatible with Θ satisfies λ(S) ≤ 0.
Proof: Expanding λ(S) gives
We divide the rest of our argument into five cases which are summarized in Table 1. For these cases straightforward calculations yield the entries of Table 2. Using Table 2 we compute λ(S) in each case.
Case (i): We obtain λ(S) = 2(j  1)(j + 1  r) + 2(j  1)(j + 1  n). Hence, λ(S) = 0 if j = 1 and λ(S) < 0 if j ≥ 2.
Case (ii): We obtain λ(S) = 0.
Case (iii): We obtain λ(S) = (j  i)(4(j  i)  2n + 8). Thus, since j  i ≤ r  3 ≤ (n + 1)/2  3, λ(S) = 0 if i = j and λ(S) < 0 if i <j.
Case (iv): We obtain λ(S) = 2(i  r)(n  2  (j  i)) + 2(2  i)(j  i). Thus, since j  i ≤ n  3, λ(S) < 0 if i <r. If i = r then λ(S) = 0 if j = r and λ(S) < 0 otherwise.
Case (v): We obtain λ(S) = 0. ■
Theorem 4.8 Let M be a set of n elements and d: M × M → ℝ_{≥0} be a circular distance function. Suppose that x, y minimize
Then there is an ordering of M that is compatible with d in which x and y are adjacent.
Proof: Let Θ = x_{1}, ..., x_{ n }be an ordering of M that is compatible with d. Suppose that Q(x_{1}, x_{ r }) ≤ Q(x, y) for all x, y where, without loss of generality, 2 ≤ r ≤⌈n/2⌉. If r = 2 then we are done, so we assume r ≥ 3. Let ω be the (circular) split weight function for which d = d_{ ω }, so Θ is compatible with ω. Let Θ* be the ordering obtained by removing x_{ r }from Θ and reinserting it immediately after x_{1}. We claim that Θ* is also compatible with ω.
As in Lemma 4.7, for any split S compatible with Θ we define
By the choice of x_{1} and x_{ r }we have
Since Q is linear, and d = Σ_{S∈Ϭ(X)}ω(S)d_{ S }by Lemma 4.7 we have
Now consider any split S compatible with Θ but not Θ*. Then S satisfies the conditions in Lemma 4.7 (i), giving λ(S) < 0 and hence ω(S) = 0. Thus there are no splits in the support of ω that are not compatible with Θ*, and Θ* is compatible with ω and, hence, d. Thus x_{1} and x_{ r }are adjacent in an ordering Θ* compatible with d. ■
Corollary 4.9 Let C_{1} and C_{2} be the two clusters selected in line 17 of procedure FINDORDERING. Then there exists an ordering Θ* = D_{1}, ..., D_{ k }of $\u212d$ such that D_{1} = C_{1}, D_{2} = C_{2} and $\overline{d}$ is compatible with Θ*.
After selecting C_{1} and C_{2} the procedure FINDORDERING removes these clusters from the collection and replaces them with their union C' = C_{1} ∪ C_{2}. It also assigns an ordering Θ_{C'}to the cluster.
FINDORDERING is then called recursively. The following is directly analogous to Proposition 4.3.
Proposition 4.10 There exists an ordering of Y that is compatible with collection ${\u212d}^{\prime}$ and split weight function ω.
Proof: We already know by Proposition 4.9 and Proposition 4.6 that there exists an ordering $\tilde{\Theta}$ = y_{1}, ..., y_{ n }of Y that is compatible with $\u212d$ and ω and, in addition, also satisfies one of the following properties:
If x_{1} ∈ C_{1} and x_{2} ∈ C_{2} are selected such that $\tilde{\Theta}$ is also compatible with ${\u212d}^{\prime}$ then we are done. Otherwise we have to construct a suitable new ordering ${\tilde{\Theta}}^{\prime}$ of Y. There are, up to symmetric situations with roles of C_{1} and C_{2} swapped, only two cases we need to consider.
Case 1: C_{1} = {y_{1}, y_{2}}, x_{1} = y_{1} and x_{2} = y_{3}. We want to show that ordering ${\tilde{\Theta}}^{\prime}$ = y_{2}, y_{1}, y_{3}, ..., y_{ n }is compatible with ω. To this end we first show that $\widehat{Q}$[d](y_{2}, y_{3}) ≤ $\widehat{Q}$[d](y_{1}, y_{3}). It suffices to establish this inequality for all split metrics d_{ S }with S ∈ ${\mathfrak{S}}_{\tilde{\Theta}}$. Define the set of splits
Ϭ' = {{{y_{2}, ..., y_{ i }}, Y\{y_{2}, ..., y_{ i }}}3 ≤ i ≤ n  1}.
By a case analysis similar to the one applied in the proof of Lemma 4.7 we obtain the following:

$\widehat{Q}$[d_{ S }](y_{2}, y_{3}) = $\widehat{Q}$[d_{ S }](y_{1}, y_{3}) if S ∈ ${\mathfrak{S}}_{\widehat{\Theta}}$\Ϭ', and

$\widehat{Q}$[d_{ S }](y_{2}, y_{3}) <$\widehat{Q}$[d_{ S }](y_{1}, y_{3}) if S ∈ Ϭ'.
But then, since $\widehat{Q}$[d](y_{1}, y_{3}) is minimum, $\widehat{Q}$[d](y_{2}, y_{3}) = $\widehat{Q}$[d](y_{1}, y_{3}). Thus, by the above strict inequality, for every split S ∈ Ϭ' we must have ω(S) = 0. Hence, ω is compatible with ${\tilde{\Theta}}^{\prime}$.
Case 2: C_{1} = {y_{1}, y_{2}}, C_{2} = {y_{3}, y_{4}}, x_{1} = y_{1}, x_{2} = y_{4} and n ≥ 5. We want to show that ${\tilde{\Theta}}^{\prime}$ = y_{2}, y_{1}, y_{4}, y_{3}, y_{5}, ..., y_{ n }is compatible with ω. A similar argument to the one used in Case 1 shows that for every split S in
Ϭ' = {{{y_{2}, ..., y_{ i }}, Y\{y_{2}, ..., y_{ i }}}3 ≤ i ≤ n  1} ∪ {{{y_{4}, ..., y_{ i }}, Y\{y_{2}, ..., y_{ i }}}5 ≤ i ≤ n}
we must have ω(S) = 0. Thus, ω is compatible with ${\tilde{\Theta}}^{\prime}$. ■
Now, by Proposition 4.10, we can apply the induction hypothesis and conclude that the recursive call FINDORDERING(${\u212d}^{\prime}$, d) will return an ordering Θ compatible with ${\u212d}^{\prime}$ and d. Since Θ will order C' according to Θ_{C'}(or its reverse), we have that Θ is compatible with C_{1} and C_{2}. Thus Θ is compatible with $\u212d$ and d, completing the proof of Theorem 4.2. □
Remark 4.11 Note that we have shown that Corollary 4.9 holds under the assumption that (in view of line 6) every cluster in $\u212d$ contains at most two elements. However, it is possible to prove this result in the more general setting where clusters can have arbitrary size. In principle, this could yield a consistent variation of the NeighborNet algorithm that is analogous to the recently introduced QNet algorithm [16], where, instead of reducing the size of clusters when they have more than two elements, the reduction case is skipped entirely and clusters are pairwise combined until only one cluster is left. However, we suspect that such a method would probably not work well in practice since the reduced distances have smaller variance than the original distances.
References
 1.
Felsenstein J: Inferring phylogenies. 2003, Sinauer Associates
 2.
Bryant D, Moulton V: NeighborNet: An agglomerative method for the construction of phylogenetic networks. Molecular Biology and Evolution. 2004, 21: 255265. 10.1093/molbev/msh018.
 3.
Saitou N, Nei M: The neighborjoining method: A new method for reconstructing phylogenetic trees. Molecular Biology and Evolution. 1987, 4 (4): 406425.
 4.
Hu J, Fu HC, Lin CH, Su HJ, Yeh HH: Reassortment and Concerted Evolution in Banana Bunchy Top Virus Genomes. Journal of Virology. 2007, 81: 17461761.
 5.
Lacher D, Steinsland H, Blank T, Donnenberg M, Whittam T: Sequence Typing and Virulence Gene Allelic Profiling. Journal of Bacteriology. 2007, 189: 342350.
 6.
Kilian B, Ozkan H, Deusch O, Effgen S, Brandolini A, Kohl J, Martin W, Salamini F: Independent Wheat B and G Genome Origins in Outcrossing Aegilops Progenitor Haplotypes. Molecular Biology Evolution. 2007, 24: 217227. 10.1093/molbev/msl151.
 7.
Hamed MB: Neighbournets portray the Chinese dialect continuum and the linguistic legacy of China's demic history. Proc Royal Society B: Biological Sciences. 2005, 272: 10151022. 10.1098/rspb.2004.3015.
 8.
Dress A, Huson D, Moulton V: Analyzing and visualizing sequence and distance data using SplitsTree. Discrete Applied Mathematics. 1996, 71: 95110. 10.1016/S0166218X(96)000595.
 9.
Huson D, Bryant D: Application of Phylogenetic Networks in Evolutionary Studies. Molecular Biology and Evolution. 2006, 23: 254267. 10.1093/molbev/msj030.
 10.
Bandelt HJ, Dress A: A canonical split decomposition theory for metrics on a finite set. Advances in Mathematics. 1992, 92: 47105. 10.1016/00018708(92)90061O.
 11.
Semple C, Steel M: Phylogenetics. 2003, Oxford University Press
 12.
Chepoi V, Fichet B: A note on circular decomposable metrics. Geometriae Dedicata. 1998, 69: 237240. 10.1023/A:1004907919611.
 13.
Christopher G, Farach M, Trick M: The structure of circular decomposable metrics. Proc of European Symposium on Algorithms (ESA), Volume 1136 of LNCS, Springer. 1996, 486500.
 14.
Dress A, Huson D: Constructing split graphs. IEEE Transactions on Computational Biology and Bioinformatics. 2004, 1 (3): 109115. 10.1109/TCBB.2004.27.
 15.
Kalmanson K: Edgeconvex circuits and the travelling salesman problem. Canadian Journal of Mathematics. 1975, 27: 10001010.
 16.
Grünewald S, Forslund K, Dress A, Moulton V: QNet: An agglomerative method for the construction of phylogenetic networks from weighted quartets. Molecular Biology and Evolution. 2007, 24: 532538. 10.1093/molbev/msl180.
 17.
Kotetishvili M, Stine O, Kreger A, Morris J, Sulakvelidze A: Multilocus sequence typing for characterization of clinical and environmental salmonella strains. Journal of Clinical Microbiology. 2002, 40: 16261635.
Author information
Affiliations
Corresponding author
Authors’ original submitted files for images
Below are the links to the authors’ original submitted files for images.
Rights and permissions
About this article
Cite this article
Bryant, D., Moulton, V. & Spillner, A. Consistency of the NeighborNet Algorithm. Algorithms Mol Biol 2, 8 (2007). https://doi.org/10.1186/1748718828
Received:
Accepted:
Published:
Keywords
 Phylogenetic Tree
 Distance Function
 Induction Hypothesis
 Phylogenetic Signal
 Selection Case