TreeNode 1.5.2
A library to manipulate phylogenetic trees
|
Contains methods to simulate sequence evolution. More...
Public Member Functions | |
delegate double | GetScale (double conservation) |
Represents a function that can be evaluated to return the scaling factor to use in order to obtain the specified average conservation . More... | |
Static Public Member Functions | |
static Dictionary< string, Sequence > | SimulateSequences (this TreeNode tree, Sequence ancestralSequence, RateMatrix rateMatrix, double scale=1, IndelModel indelModel=null) |
Simulates the evolution of the specified ancestral sequence over a phylogenetic tree , with the specified rate matrix, scale factor, and insertion/deletion model. More... | |
static Dictionary< string, Sequence > | SimulateSequences (this TreeNode tree, int ancestralSequenceLength, RateMatrix rateMatrix, double scale=1, IndelModel indelModel=null) |
Simulates the evolution of a random ancestral sequence with the specified length over a phylogenetic tree , with the specified rate matrix, scale factor, and insertion/deletion model. More... | |
static Dictionary< string, Sequence > | SimulateAllSequences (this TreeNode tree, Sequence ancestralSequence, RateMatrix rateMatrix, double scale=1, IndelModel indelModel=null) |
Simulates the evolution of the specified ancestral sequence over a phylogenetic tree , with the specified rate matrix, scale factor, and insertion/deletion model. More... | |
static Dictionary< string, Sequence > | SimulateAllSequences (this TreeNode tree, int ancestralSequenceLength, RateMatrix rateMatrix, double scale=1, IndelModel indelModel=null) |
Simulates the evolution of a random ancestral sequence with the specified length over a phylogenetic tree , with the specified rate matrix, scale factor, and insertion/deletion model. More... | |
static GetScale | ConservationToScale (TreeNode tree, RateMatrix rateMatrix, double minRate=1e-5, double maxRate=1e4) |
Returns a method that can be evaluated to determine the scaling factor that, when applied to a sequence simulation done using the specified tree and rate matrix, will produce at the tips a sequence alignment with the specified (average) percent identity. More... | |
static Dictionary< string, string > | ToStringAlignment (this Dictionary< string, Sequence > alignment) |
Converts a sequence alignment where the sequences are stored as Sequences into an alignment where the sequences are stored as string s. More... | |
Properties | |
static Random | RandomNumberGenerator = new ThreadSafeRandom() [get, set] |
The random number generator used to simulate sequence evolution. If you change this, please ensure that it is thread-safe. More... | |
Contains methods to simulate sequence evolution.
Definition at line 16 of file SequenceSimulation.cs.
|
static |
Returns a method that can be evaluated to determine the scaling factor that, when applied to a sequence simulation done using the specified tree and rate matrix, will produce at the tips a sequence alignment with the specified (average) percent identity.
tree | The TreeNode on which the sequence simulations will be performed. |
rateMatrix | The rate matrix that will be used for the sequence simulations. |
minRate | Minimum rate value to test. |
maxRate | Maximum rate value to test. |
Definition at line 211 of file SequenceSimulation.public.cs.
delegate double PhyloTree.SequenceSimulation.SequenceSimulation.GetScale | ( | double | conservation | ) |
Represents a function that can be evaluated to return the scaling factor to use in order to obtain the specified average conservation .
conservation | The average conservation whose corresponding scaling factor will be returned. |
|
static |
Simulates the evolution of a random ancestral sequence with the specified length over a phylogenetic tree , with the specified rate matrix, scale factor, and insertion/deletion model.
tree | The tree over which the sequence evolves. This is assumed to be rooted (i.e., the ancestral sequence is placed at the root of the tree). |
ancestralSequenceLength | The length of the ancestral sequence whose evolution is being simulated. Note that if insertions/deletions are allowed to happen, the final length of the (aligned) sequences may differ from this. |
rateMatrix | The rate matrix that governs the evolution of the sequence. |
scale | A scaling factor. If this is different from 1, the effect is the same as multiplying the branch lengths of the tree or the rate matrix by the supplied value. |
indelModel | The model for insertions/deletions. If this is null, no insertions/deletions are allowed to happen. |
string
containing the TreeNode.Id of the node, and the value is a Sequence containing the sequence. The sequences are all aligned.Definition at line 187 of file SequenceSimulation.public.cs.
|
static |
Simulates the evolution of the specified ancestral sequence over a phylogenetic tree , with the specified rate matrix, scale factor, and insertion/deletion model.
tree | The tree over which the sequence evolves. This is assumed to be rooted (i.e., the ancestral sequence is placed at the root of the tree). |
ancestralSequence | The ancestral sequence whose evolution is being simulated. |
rateMatrix | The rate matrix that governs the evolution of the sequence. |
scale | A scaling factor. If this is different from 1, the effect is the same as multiplying the branch lengths of the tree or the rate matrix by the supplied value. |
indelModel | The model for insertions/deletions. If this is null, no insertions/deletions are allowed to happen. |
string
containing the TreeNode.Id of the node, and the value is a Sequence containing the sequence. The sequences are all aligned.Definition at line 116 of file SequenceSimulation.public.cs.
|
static |
Simulates the evolution of a random ancestral sequence with the specified length over a phylogenetic tree , with the specified rate matrix, scale factor, and insertion/deletion model.
tree | The tree over which the sequence evolves. This is assumed to be rooted (i.e., the ancestral sequence is placed at the root of the tree). |
ancestralSequenceLength | The length of the ancestral sequence whose evolution is being simulated. Note that if insertions/deletions are allowed to happen, the final length of the (aligned) sequences may differ from this. |
rateMatrix | The rate matrix that governs the evolution of the sequence. |
scale | A scaling factor. If this is different from 1, the effect is the same as multiplying the branch lengths of the tree or the rate matrix by the supplied value. |
indelModel | The model for insertions/deletions. If this is null, no insertions/deletions are allowed to happen. |
string
containing the TreeNode.Name of the node, and the value is a Sequence containing the sequence. The sequences are all aligned.Definition at line 97 of file SequenceSimulation.public.cs.
|
static |
Simulates the evolution of the specified ancestral sequence over a phylogenetic tree , with the specified rate matrix, scale factor, and insertion/deletion model.
tree | The tree over which the sequence evolves. This is assumed to be rooted (i.e., the ancestral sequence is placed at the root of the tree). |
ancestralSequence | The ancestral sequence whose evolution is being simulated. |
rateMatrix | The rate matrix that governs the evolution of the sequence. |
scale | A scaling factor. If this is different from 1, the effect is the same as multiplying the branch lengths of the tree or the rate matrix by the supplied value. |
indelModel | The model for insertions/deletions. If this is null, no insertions/deletions are allowed to happen. |
string
containing the TreeNode.Name of the node, and the value is a Sequence containing the sequence. The sequences are all aligned.Definition at line 23 of file SequenceSimulation.public.cs.
|
static |
Converts a sequence alignment where the sequences are stored as Sequences into an alignment where the sequences are stored as string
s.
alignment | The alignment to convert. |
Definition at line 310 of file SequenceSimulation.public.cs.
|
staticgetset |
The random number generator used to simulate sequence evolution. If you change this, please ensure that it is thread-safe.
Definition at line 21 of file SequenceSimulation.cs.