TreeNode 1.5.2
A library to manipulate phylogenetic trees
Loading...
Searching...
No Matches
PhyloTree.TreeBuilding.NeighborJoining Class Reference

Contains methods to compute neighbour-joining trees. More...

Static Public Member Functions

static TreeNode BuildTree (Dictionary< string, string > alignment, EvolutionModel evolutionModel=EvolutionModel.Kimura, int bootstrapReplicates=0, AlignmentType alignmentType=AlignmentType.Autodetect, TreeNode constraint=null, bool allowNegativeBranches=true, int numCores=-1, Action< double > progressCallback=null)
 Builds a neighbour-joining tree using data from a sequence alignment. This method first computes a distance matrix from the sequence alignment, and then uses the distance matrix to compute the tree. More...
 
static TreeNode BuildTree (float[][] distanceMatrix, IReadOnlyList< string > sequenceNames, TreeNode constraint=null, bool copyMatrix=true, bool allowNegativeBranches=true, int numCores=-1, Action< double > progressCallback=null)
 Builds a neighbour-joining tree using data from a distance matrix. More...
 

Detailed Description

Contains methods to compute neighbour-joining trees.

Definition at line 13 of file NeighborJoining.cs.

Member Function Documentation

◆ BuildTree() [1/2]

static TreeNode PhyloTree.TreeBuilding.NeighborJoining.BuildTree ( Dictionary< string, string >  alignment,
EvolutionModel  evolutionModel = EvolutionModel.Kimura,
int  bootstrapReplicates = 0,
AlignmentType  alignmentType = AlignmentType.Autodetect,
TreeNode  constraint = null,
bool  allowNegativeBranches = true,
int  numCores = -1,
Action< double >  progressCallback = null 
)
static

Builds a neighbour-joining tree using data from a sequence alignment. This method first computes a distance matrix from the sequence alignment, and then uses the distance matrix to compute the tree.

Parameters
alignmentThe sequence alignment.
evolutionModelThe evolutionary model to use when computing the distance matrix.
bootstrapReplicatesThe number of bootstrap replicates to perform.
alignmentTypeThe type of sequence alignment (DNA, protein, or autodetect).
constraintAn optional tree to constrain the search. The tree produced by this method will be compatible with this tree. The constraint tree can be multifurcating.
allowNegativeBranchesIf this is true negative branches produced by the neighbour-joining algorithm are left untouched; otherwise, their (absolute) length is added to the sibling branch, and the negative length is set to 0.
numCoresMaximum number of threads to use, or -1 to let the runtime decide.
progressCallbackA method used to report progress.
Returns
The neighbour-joining tree built from the supplied alignment .

Definition at line 28 of file NeighborJoining.cs.

◆ BuildTree() [2/2]

static TreeNode PhyloTree.TreeBuilding.NeighborJoining.BuildTree ( float  distanceMatrix[][],
IReadOnlyList< string >  sequenceNames,
TreeNode  constraint = null,
bool  copyMatrix = true,
bool  allowNegativeBranches = true,
int  numCores = -1,
Action< double >  progressCallback = null 
)
static

Builds a neighbour-joining tree using data from a distance matrix.

Parameters
distanceMatrixThe distance matrix containg distances between the taxa. This can be a lower triangular matrix or a full matrix; values above the diagonal will not be used.
sequenceNamesThe names of the taxa. The indices of this list should correspond to the rows and columns of the distanceMatrix .
constraintAn optional tree to constrain the search. The tree produced by this method will be compatible with this tree. The constraint tree can be multifurcating.
copyMatrixIf this is true, the matrix is copied before using it to compute the tree. If this is false, the matrix is not copied. Copying the matrix increases the memory used by the method, but note that if the matrix is not copied, it will be modified in-place!
allowNegativeBranchesIf this is true negative branches produced by the neighbour-joining algorithm are left untouched; otherwise, their (absolute) length is added to the sibling branch, and the negative length is set to 0.
numCoresMaximum number of threads to use, or -1 to let the runtime decide.
progressCallbackA method used to report progress.
Returns
The neighbour-joining tree built from the supplied distanceMatrix .

Definition at line 131 of file NeighborJoining.cs.


The documentation for this class was generated from the following file: