TreeNode 1.5.2
A library to manipulate phylogenetic trees
|
Contains methods to generate random trees. More...
Static Public Member Functions | |
static TreeNode | UnlabelledTopology (int leafCount, TreeNode.NullHypothesis model=TreeNode.NullHypothesis.PDA, bool rooted=false) |
Samples a random unlabelled topology according to the specified model. More... | |
static TreeNode | UnlabelledTree (int leafCount, IContinuousDistribution branchLengthDistribution, TreeNode.NullHypothesis model=TreeNode.NullHypothesis.PDA, bool rooted=false) |
Samples a random unlabelled tree according to the specified model, using branch lengths drawn from the supplied distribution. More... | |
static TreeNode | UnlabelledTree (int leafCount, TreeNode.NullHypothesis model=TreeNode.NullHypothesis.PDA, bool rooted=false) |
Samples a random unlabelled tree according to the specified model, using branch lengths drawn from a Uniform(0, 1) distribution. More... | |
static TreeNode | ResolvePolytomies (TreeNode tree, bool rooted=false) |
Randomly resolve all the polytomies in a tree. More... | |
static TreeNode | LabelledTopology (IReadOnlyList< string > leafNames, TreeNode.NullHypothesis model=TreeNode.NullHypothesis.PDA, bool rooted=false, TreeNode constraint=null) |
Samples a random labelled topology according to the specified model. More... | |
static TreeNode | LabelledTopology (int leafCount, TreeNode.NullHypothesis model=TreeNode.NullHypothesis.PDA, bool rooted=false, TreeNode constraint=null) |
Samples a random labelled topology according to the specified model. More... | |
static TreeNode | LabelledTree (IReadOnlyList< string > leafNames, IContinuousDistribution branchLengthDistribution, TreeNode.NullHypothesis model=TreeNode.NullHypothesis.PDA, bool rooted=false, TreeNode constraint=null) |
Samples a random labelled tree according to the specified model, using branch lengths drawn from the supplied distribution. More... | |
static TreeNode | LabelledTree (int leafCount, IContinuousDistribution branchLengthDistribution, TreeNode.NullHypothesis model=TreeNode.NullHypothesis.PDA, bool rooted=false, TreeNode constraint=null) |
Samples a random labelled tree according to the specified model, using branch lengths drawn from the supplied distribution. More... | |
static TreeNode | LabelledTree (IReadOnlyList< string > leafNames, TreeNode.NullHypothesis model=TreeNode.NullHypothesis.PDA, bool rooted=false, TreeNode constraint=null) |
Samples a random labelled tree according to the specified model, using branch lengths drawn from a Uniform(0, 1) distribution. More... | |
static TreeNode | LabelledTree (int leafCount, TreeNode.NullHypothesis model=TreeNode.NullHypothesis.PDA, bool rooted=false, TreeNode constraint=null) |
Samples a random labelled tree according to the specified model, using branch lengths drawn from a Uniform(0, 1) distribution. More... | |
Static Public Attributes | |
static Random | RandomNumberGenerator = new ThreadSafeRandom() |
Random number generator used for sampling. More... | |
Contains methods to generate random trees.
Definition at line 12 of file RandomTree.cs.
|
static |
Samples a random labelled topology according to the specified model.
leafCount | The number of terminal nodes in the topology. Their names will be in the form t1, t2, ..., tN , where N is leafCount . |
model | The model to use for growing the tree. |
rooted | A bool indicating whether the tree should be rooted or not. |
constraint | A tree to constrain the sampling. The topology produced by this method will be compatible with this tree. The constraint tree can be multifurcating. Please note that, as the constraint is applied at every step while growing the topology, using a constraint with TreeNode.NullHypothesis.YHK will bias the sampled topology distribution. |
ArgumentException | Thrown if model is neither TreeNode.NullHypothesis.PDA nor TreeNode.NullHypothesis.YHK. |
Definition at line 535 of file RandomTree.cs.
|
static |
Samples a random labelled topology according to the specified model.
leafNames | The labels for the terminal nodes of the topology. |
model | The model to use for growing the tree. |
rooted | A bool indicating whether the tree should be rooted or not. |
constraint | A tree to constrain the sampling. The topology produced by this method will be compatible with this tree. The constraint tree can be multifurcating. Please note that, as the constraint is applied at every step while growing the topology, using a constraint with TreeNode.NullHypothesis.YHK will bias the sampled topology distribution. |
ArgumentException | Thrown if model is neither TreeNode.NullHypothesis.PDA nor TreeNode.NullHypothesis.YHK. |
Definition at line 292 of file RandomTree.cs.
|
static |
Samples a random labelled tree according to the specified model, using branch lengths drawn from the supplied distribution.
leafCount | The number of terminal nodes in the topology. Their names will be in the form t1, t2, ..., tN , where N is leafCount . |
branchLengthDistribution | The continuous univariate distribution from which the branch lengths will be drawn. |
model | The model to use for growing the tree. |
rooted | A bool indicating whether the tree should be rooted or not. |
constraint | A tree to constrain the sampling. The topology produced by this method will be compatible with this tree. The constraint tree can be multifurcating. Please note that, as the constraint is applied at every step while growing the topology, using a constraint with TreeNode.NullHypothesis.YHK will bias the sampled topology distribution. |
Definition at line 585 of file RandomTree.cs.
|
static |
Samples a random labelled tree according to the specified model, using branch lengths drawn from a Uniform(0, 1) distribution.
leafCount | The number of terminal nodes in the topology. Their names will be in the form t1, t2, ..., tN , where N is leafCount . |
model | The model to use for growing the tree. |
rooted | A bool indicating whether the tree should be rooted or not. |
constraint | A tree to constrain the sampling. The topology produced by this method will be compatible with this tree. The constraint tree can be multifurcating. Please note that, as the constraint is applied at every step while growing the topology, using a constraint with TreeNode.NullHypothesis.YHK will bias the sampled topology distribution. |
Definition at line 620 of file RandomTree.cs.
|
static |
Samples a random labelled tree according to the specified model, using branch lengths drawn from the supplied distribution.
leafNames | The labels for the terminal nodes of the topology. |
branchLengthDistribution | The continuous univariate distribution from which the branch lengths will be drawn. |
model | The model to use for growing the tree. |
rooted | A bool indicating whether the tree should be rooted or not. |
constraint | A tree to constrain the sampling. The topology produced by this method will be compatible with this tree. The constraint tree can be multifurcating. Please note that, as the constraint is applied at every step while growing the topology, using a constraint with TreeNode.NullHypothesis.YHK will bias the sampled topology distribution. |
Definition at line 557 of file RandomTree.cs.
|
static |
Samples a random labelled tree according to the specified model, using branch lengths drawn from a Uniform(0, 1) distribution.
leafNames | The labels for the terminal nodes of the topology. |
model | The model to use for growing the tree. |
rooted | A bool indicating whether the tree should be rooted or not. |
constraint | A tree to constrain the sampling. The topology produced by this method will be compatible with this tree. The constraint tree can be multifurcating. Please note that, as the constraint is applied at every step while growing the topology, using a constraint with TreeNode.NullHypothesis.YHK will bias the sampled topology distribution. |
Definition at line 606 of file RandomTree.cs.
|
static |
Randomly resolve all the polytomies in a tree.
tree | The tree containing the polytomies to be resolved. |
rooted | A bool indicating whether the tree is supposed to be rooted or not. If this is true , a trichotomy at the root node will be resolved. |
Definition at line 217 of file RandomTree.cs.
|
static |
Samples a random unlabelled topology according to the specified model.
leafCount | The number of terminal nodes in the topology. |
model | The model to use for growing the tree. |
rooted | A bool indicating whether the tree should be rooted or not. |
ArgumentException | Thrown if model is neither TreeNode.NullHypothesis.PDA nor TreeNode.NullHypothesis.YHK. |
Definition at line 27 of file RandomTree.cs.
|
static |
Samples a random unlabelled tree according to the specified model, using branch lengths drawn from the supplied distribution.
leafCount | The number of terminal nodes in the topology. |
branchLengthDistribution | The continuous univariate distribution from which the branch lengths will be drawn. |
model | The model to use for growing the tree. |
rooted | A bool indicating whether the tree should be rooted or not. |
Definition at line 150 of file RandomTree.cs.
|
static |
Samples a random unlabelled tree according to the specified model, using branch lengths drawn from a Uniform(0, 1) distribution.
leafCount | The number of terminal nodes in the topology. |
model | The model to use for growing the tree. |
rooted | A bool indicating whether the tree should be rooted or not. |
Definition at line 175 of file RandomTree.cs.
|
static |
Random number generator used for sampling.
Definition at line 17 of file RandomTree.cs.