TreeNode 1.5.2
A library to manipulate phylogenetic trees
|
Contains methods to compute distance matrices. More...
Static Public Member Functions | |
static float[][] | BuildFromAlignment (IReadOnlyList< byte[]> sequences, EvolutionModel evolutionModel=EvolutionModel.Kimura, int numCores=-1, Action< double > progressCallback=null) |
Build a distance matrix from aligned DNA sequences stored as a T:byte[] array where each byte corresponds to three positions. More... | |
static float[][] | BuildFromAlignment (IReadOnlyList< ushort[]> sequences, EvolutionModel evolutionModel=EvolutionModel.Kimura, int numCores=-1, Action< double > progressCallback=null) |
Build a distance matrix from aligned protein sequences stored as a T:ushort[] array where each ushort corresponds to two positions. More... | |
static void | BuildFromAlignment (float[][] allocatedMatrix, IReadOnlyList< byte[]> sequences, EvolutionModel evolutionModel=EvolutionModel.Kimura, int numCores=-1, Action< double > progressCallback=null) |
Build a distance matrix from aligned DNA sequences stored as a T:byte[] array where each byte corresponds to three positions. More... | |
static void | BuildFromAlignment (float[][] allocatedMatrix, IReadOnlyList< ushort[]> sequences, EvolutionModel evolutionModel=EvolutionModel.Kimura, int numCores=0, Action< double > progressCallback=null) |
Build a distance matrix from aligned protein sequences stored as a T:ushort[] array where each ushort corresponds to two positions. More... | |
static void | BuildFromAlignment (float[][] allocatedMatrix, IReadOnlyList< string > sequences, AlignmentType alignmentType=AlignmentType.Autodetect, EvolutionModel evolutionModel=EvolutionModel.Kimura, int numCores=0, Action< double > progressCallback=null) |
Build a distance matrix from aligned DNA or protein sequences. More... | |
static float[][] | BuildFromAlignment (IReadOnlyList< string > sequences, AlignmentType alignmentType=AlignmentType.Autodetect, EvolutionModel evolutionModel=EvolutionModel.Kimura, int numCores=0, Action< double > progressCallback=null) |
Build a distance matrix from aligned DNA or protein sequences. More... | |
static void | BootstrapReplicateFromAlignment (float[][] allocatedMatrix, IReadOnlyList< string > sequences, AlignmentType alignmentType=AlignmentType.Autodetect, EvolutionModel evolutionModel=EvolutionModel.Kimura, int numCores=0, Action< double > progressCallback=null) |
Build a bootstrap replicate of a distance matrix from aligned DNA or protein sequences. More... | |
static float[][] | BootstrapReplicateFromAlignment (IReadOnlyList< string > sequences, AlignmentType alignmentType=AlignmentType.Autodetect, EvolutionModel evolutionModel=EvolutionModel.Kimura, int numCores=0, Action< double > progressCallback=null) |
Build a bootstrap replicate of a distance matrix from aligned DNA or protein sequences. More... | |
static float[][] | BuildFromAlignment (Dictionary< string, string > alignment, AlignmentType alignmentType=AlignmentType.Autodetect, EvolutionModel evolutionModel=EvolutionModel.Kimura, int numCores=0, Action< double > progressCallback=null) |
Build a distance matrix from aligned DNA or protein sequences. More... | |
static void | BuildFromAlignment (float[][] allocatedMatrix, Dictionary< string, string > alignment, AlignmentType alignmentType=AlignmentType.Autodetect, EvolutionModel evolutionModel=EvolutionModel.Kimura, int numCores=0, Action< double > progressCallback=null) |
Build a distance matrix from aligned DNA or protein sequences. More... | |
static float[][] | BootstrapReplicateFromAlignment (Dictionary< string, string > alignment, AlignmentType alignmentType=AlignmentType.Autodetect, EvolutionModel evolutionModel=EvolutionModel.Kimura, int numCores=0, Action< double > progressCallback=null) |
Build a bootstrap replicate of a distance matrix from aligned DNA or protein sequences. More... | |
static void | BootstrapReplicateFromAlignment (float[][] allocatedMatrix, Dictionary< string, string > alignment, AlignmentType alignmentType=AlignmentType.Autodetect, EvolutionModel evolutionModel=EvolutionModel.Kimura, int numCores=0, Action< double > progressCallback=null) |
Build a bootstrap replicate of a distance matrix from aligned DNA or protein sequences. More... | |
static IEnumerable< byte[]> | ConvertDNASequences (IEnumerable< string > sequences) |
Convert DNA sequences into T:byte[] arrays in which each byte corresponds to 3 positions. More... | |
static List< byte[]> | ConvertDNASequences (IReadOnlyList< string > sequences) |
Convert DNA sequences into T:byte[] arrays in which each byte corresponds to 3 positions. More... | |
static IEnumerable< byte[]> | BootstrapDNASequences (IEnumerable< string > sequences) |
Computes a bootstrap replicate of a DNA sequence alignment. More... | |
static List< byte[]> | BootstrapDNASequences (IReadOnlyList< string > sequences) |
Computes a bootstrap replicate of a DNA sequence alignment. More... | |
static IEnumerable< ushort[]> | ConvertProteinSequences (IEnumerable< string > sequences) |
Convert protein sequences into T:ushort[] arrays in which each ushort corresponds to 2 positions. More... | |
static List< ushort[]> | ConvertProteinSequences (IReadOnlyList< string > sequences) |
Convert protein sequences into T:ushort[] arrays in which each ushort corresponds to 2 positions. More... | |
static IEnumerable< ushort[]> | BootstrapProteinSequences (IEnumerable< string > sequences) |
Computes a bootstrap replicate of a protein sequence alignment. More... | |
static List< ushort[]> | BootstrapProteinSequences (IReadOnlyList< string > sequences) |
Computes a bootstrap replicate of a protein sequence alignment. More... | |
static ushort[] | ConvertProteinSequence (string sequence) |
Converts a protein sequence stored as a string into a T:ushort[] array. Each ushort contains 2 amino acid positions. The allowed symbols are the usual 20 1-letter amino acid abbreviations, plus U for Sec, O for Pyl, B for Asn or Asp, Z for Gln or Glu, J for Ile or Leu, X for any amino acid, * for stop codons and - for gaps (uppercase and lowercase). All other characters are treated as gaps. If the sequence length is not a multiple of 2, it is padded with gaps. More... | |
static float | CompareProteinSequencesBLOSUM62 (ushort[] sequence1, ushort[] sequence2, int selfScore1, int selfScore2) |
Compares two protein sequences using the Scoredist correction with the BLOSUM62 matrix. More... | |
Contains methods to compute distance matrices.
Definition at line 66 of file DistanceMatrix.cs.
|
static |
Computes a bootstrap replicate of a DNA sequence alignment.
sequences | The aligned DNA sequences. |
ArgumentOutOfRangeException | Thrown if not all of the sequences have the same length. |
Definition at line 533 of file DistanceMatrix.cs.
|
static |
Computes a bootstrap replicate of a DNA sequence alignment.
sequences | The aligned DNA sequences. |
ArgumentOutOfRangeException | Thrown if not all of the sequences have the same length. |
Definition at line 562 of file DistanceMatrix.cs.
|
static |
Computes a bootstrap replicate of a protein sequence alignment.
sequences | The aligned protein sequences. |
ArgumentOutOfRangeException | Thrown if not all of the sequences have the same length. |
Definition at line 596 of file DistanceMatrix.cs.
|
static |
Computes a bootstrap replicate of a protein sequence alignment.
sequences | The aligned protein sequences. |
ArgumentOutOfRangeException | Thrown if not all of the sequences have the same length. |
Definition at line 625 of file DistanceMatrix.cs.
|
static |
Build a bootstrap replicate of a distance matrix from aligned DNA or protein sequences.
alignment | The aligned sequences. These will be resampled randomly. |
alignmentType | The type of sequences in the alignment. |
evolutionModel | The evolutionary model to use to compute the distance matrix. |
numCores | The maximum number of threads to use, or -1 to let the runtime decide. |
progressCallback | A method used to report progress. |
Definition at line 462 of file DistanceMatrix.cs.
|
static |
Build a bootstrap replicate of a distance matrix from aligned DNA or protein sequences.
allocatedMatrix | A pre-allocated T:float[][] jagged array that will contain the lower-triangular distance matrix. |
alignment | The aligned sequences. These will be resampled randomly. |
alignmentType | The type of sequences in the alignment. |
evolutionModel | The evolutionary model to use to compute the distance matrix. |
numCores | The maximum number of threads to use, or -1 to let the runtime decide. |
progressCallback | A method used to report progress. |
Definition at line 476 of file DistanceMatrix.cs.
|
static |
Build a bootstrap replicate of a distance matrix from aligned DNA or protein sequences.
allocatedMatrix | A pre-allocated T:float[][] jagged array that will contain the lower-triangular distance matrix. |
sequences | The aligned sequences. These will be resampled randomly. |
alignmentType | The type of sequences in the alignment. |
evolutionModel | The evolutionary model to use to compute the distance matrix. |
numCores | The maximum number of threads to use, or -1 to let the runtime decide. |
progressCallback | A method used to report progress. |
Definition at line 355 of file DistanceMatrix.cs.
|
static |
Build a bootstrap replicate of a distance matrix from aligned DNA or protein sequences.
sequences | The aligned sequences. These will be resampled randomly. |
alignmentType | The type of sequences in the alignment. |
evolutionModel | The evolutionary model to use to compute the distance matrix. |
numCores | The maximum number of threads to use, or -1 to let the runtime decide. |
progressCallback | A method used to report progress. |
Definition at line 411 of file DistanceMatrix.cs.
|
static |
Build a distance matrix from aligned DNA or protein sequences.
alignment | The aligned sequences. |
alignmentType | The type of sequences in the alignment. |
evolutionModel | The evolutionary model to use to compute the distance matrix. |
numCores | The maximum number of threads to use, or -1 to let the runtime decide. |
progressCallback | A method used to report progress. |
Definition at line 434 of file DistanceMatrix.cs.
|
static |
Build a distance matrix from aligned DNA or protein sequences.
allocatedMatrix | A pre-allocated T:float[][] jagged array that will contain the lower-triangular distance matrix. |
alignment | The aligned sequences. |
alignmentType | The type of sequences in the alignment. |
evolutionModel | The evolutionary model to use to compute the distance matrix. |
numCores | The maximum number of threads to use, or -1 to let the runtime decide. |
progressCallback | A method used to report progress. |
Definition at line 448 of file DistanceMatrix.cs.
|
static |
Build a distance matrix from aligned DNA sequences stored as a T:byte[] array where each byte corresponds to three positions.
allocatedMatrix | A pre-allocated T:float[][] jagged array that will contain the lower-triangular distance matrix. |
sequences | The aligned sequences. |
evolutionModel | The evolutionary model to use to compute the distance matrix. |
numCores | The maximum number of threads to use, or -1 to let the runtime decide. |
progressCallback | A method used to report progress. |
Definition at line 171 of file DistanceMatrix.cs.
|
static |
Build a distance matrix from aligned DNA or protein sequences.
allocatedMatrix | A pre-allocated T:float[][] jagged array that will contain the lower-triangular distance matrix. |
sequences | The aligned sequences. |
alignmentType | The type of sequences in the alignment. |
evolutionModel | The evolutionary model to use to compute the distance matrix. |
numCores | The maximum number of threads to use, or -1 to let the runtime decide. |
progressCallback | A method used to report progress. |
Definition at line 252 of file DistanceMatrix.cs.
|
static |
Build a distance matrix from aligned protein sequences stored as a T:ushort[] array where each ushort corresponds to two positions.
allocatedMatrix | A pre-allocated T:float[][] jagged array that will contain the lower-triangular distance matrix. |
sequences | The aligned sequences. |
evolutionModel | The evolutionary model to use to compute the distance matrix. |
numCores | The maximum number of threads to use, or -1 to let the runtime decide. |
progressCallback | A method used to report progress. |
Definition at line 211 of file DistanceMatrix.cs.
|
static |
Build a distance matrix from aligned DNA sequences stored as a T:byte[] array where each byte corresponds to three positions.
sequences | The aligned sequences. |
evolutionModel | The evolutionary model to use to compute the distance matrix. |
numCores | The maximum number of threads to use, or -1 to let the runtime decide. |
progressCallback | A method used to report progress. |
Definition at line 127 of file DistanceMatrix.cs.
|
static |
Build a distance matrix from aligned DNA or protein sequences.
sequences | The aligned sequences. |
alignmentType | The type of sequences in the alignment. |
evolutionModel | The evolutionary model to use to compute the distance matrix. |
numCores | The maximum number of threads to use, or -1 to let the runtime decide. |
progressCallback | A method used to report progress. |
Definition at line 332 of file DistanceMatrix.cs.
|
static |
Build a distance matrix from aligned protein sequences stored as a T:ushort[] array where each ushort corresponds to two positions.
sequences | The aligned sequences. |
evolutionModel | The evolutionary model to use to compute the distance matrix. |
numCores | The maximum number of threads to use, or -1 to let the runtime decide. |
progressCallback | A method used to report progress. |
Definition at line 149 of file DistanceMatrix.cs.
|
static |
Compares two protein sequences using the Scoredist correction with the BLOSUM62 matrix.
sequence1 | The first sequence. |
sequence2 | The second sequence. |
selfScore1 | The score obtained by comparing sequence1 with itself. |
selfScore2 | The score obtained by comparing sequence2 with itself. |
Definition at line 779 of file DistanceMatrix.Protein.cs.
|
static |
Convert DNA sequences into T:byte[] arrays in which each byte corresponds to 3 positions.
sequences | The sequences to convert. |
Definition at line 486 of file DistanceMatrix.cs.
|
static |
Convert DNA sequences into T:byte[] arrays in which each byte corresponds to 3 positions.
sequences | The sequences to convert. |
Definition at line 499 of file DistanceMatrix.cs.
|
static |
Converts a protein sequence stored as a string into a T:ushort[] array. Each ushort contains 2 amino acid positions. The allowed symbols are the usual 20 1-letter amino acid abbreviations, plus U for Sec, O for Pyl, B for Asn or Asp, Z for Gln or Glu, J for Ile or Leu, X for any amino acid, * for stop codons and - for gaps (uppercase and lowercase). All other characters are treated as gaps. If the sequence length is not a multiple of 2, it is padded with gaps.
sequence | The sequence to convert. |
Definition at line 53 of file DistanceMatrix.Protein.cs.
|
static |
Convert protein sequences into T:ushort[] arrays in which each ushort corresponds to 2 positions.
sequences | The sequences to convert. |
Definition at line 572 of file DistanceMatrix.cs.
|
static |
Convert protein sequences into T:ushort[] arrays in which each ushort corresponds to 2 positions.
sequences | The sequences to convert. |
Definition at line 585 of file DistanceMatrix.cs.