| Bioinformatics Toolbox™ | ![]() |
Tree = seqneighjoin(Dist)
Tree = seqneighjoin(Dist, Method)
Tree = seqneighjoin(Dist, Method, Names)
seqneighjoin(..., 'Reroot', RerootValue)
| Dist | Matrix or vector returned by the seqpdist function. |
| Method | Method to compute the distances between nodes. Enter 'equivar' (default), 'firstorder', or 'average'. |
| Names | Vector of structures with the fields 'Header', 'Name', or a cell array of strings. In all cases the number of elements must equal the number of samples used to generate the pairwise distances in Dist. |
Tree = seqneighjoin(Dist) computes a phylogenetic tree object from Dist, pairwise distances between the species or products using the neighbor-joining method.
Tree = seqneighjoin(Dist, Method) specifies Method, a method to compute the distances of the new nodes to all other nodes at every iteration. The general expression to calculate the distances between the new node, n, after joining i and j and all other nodes (k), is given by
D(n,k) = a*D(i,k) + (1-a)*D(j,k) - a*D(n,i) - (1-a)*D(n,j)
This expression is guaranteed to find the correct tree with additive data (minimum variance reduction).
Choices for Method are:
| Method | Description |
|---|---|
| 'equivar' (default) | Assumes equal variance and independence of evolutionary distance estimates (a = 1/2). Such as in Studier and Keppler, JMBE (1988). |
| 'firstorder' | Assumes a first-order model of the variances and covariances of evolutionary distance estimates, 'a' is adjusted at every iteration to a value between 0 and 1. Such as in Gascuel, JMBE (1997). |
| 'average' | New distances are the weighted average of previous distances while the branch distances are ignored. D(n,k) = [ D(i,k) + D(j,k) ] /2 As in the original neighbor-joining algorithm by Saitou and Nei, JMBE (1987). |
Tree = seqneighjoin(Dist, Method, Names) passes a list of names (Names) to label the leaf nodes (e.g., species or products) in the phylogenetic tree object.
seqneighjoin(..., 'Reroot', RerootValue),
when RerootValue is false,
excludes rerooting the resulting tree. This is useful for observing the original
linkage order followed by the algorithm. By default seqneighjoin reroots
the resulting tree using the midpoint method.
Load a multiple alignment of amino acids.
seqs = fastaread('pf00002.fa');Measure the Jukes-Cantor pairwise distances.
dist = seqpdist(seqs,'method','jukes-cantor','indels','pair');
Build the phylogenetic using the neighbor-joining algorithm.
tree = seqneighjoin(dist,'equivar',seqs) view(tree)
[1] Saitou, N., and Nei, M. (1987). The neighbor-joining method: A new method for reconstructing phylogenetic trees. Molecular Biology and Evolution 4(4), 406–425.
[2] Gascuel, O. (1997). BIONJ: An improved version of the NJ algorithm based on a simple model of sequence data. Molecular Biology and Evolution 14 685–695.
[3] Studier, J.A., Keppler, K.J. (1988). A note on the neighbor-joining algorithm of Saitou and Nei. Molecular Biology and Evolution 5(6) 729–731.
Bioinformatics Toolbox™ functions: multialign, phytree (object constructor), seqlinkage (alternative method to create a phylogenetic tree), seqpdist
Methods of phytree object: reroot, view
![]() | seqmatch | seqpdist | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |