PTreeGenerator
1.0
Simple phylogenetic tree generation from multiple sequence alignment.
|
Parses user specified options and delegetes appropriate actions to other modules. More...
Public Member Functions | |
def | __init__ |
Constructor initializes the object variables and calls other modules to do so. | |
def | parseOptions |
Parses the options passed to the constructor. | |
def | checkAlignment |
Checks the input alignment for duplicate taxa id strings. | |
def | computeTree |
Method that delegates tree computation to the appropriate module. | |
def | update |
Method that can be used to update the results, if the Computation class changes. | |
def | computeDistanceMatrix |
Computes the distance matrix from the alignment. | |
def | cleanAlignment |
Method responsible for the correct alignment cleaning. | |
def | showResults |
Public Attributes | |
algorithm | |
The methodology used to build the tree as one of those in ptreegen::enums. | |
gapPenalty | |
Cost of gaps when they are included in the distance computation. | |
includeGaps | |
Specifies if columns with gaps should be left in the alignment or deleted. | |
removePoor | |
Specifies if poorly conserved regions should be removed from the alignment. | |
gapCutoff | |
If at least x% in column are not gaps, then the column is left in the alignment. | |
pairCutoff | |
If at least x% of pairs in column are identical, then the column is left in the alignment. | |
seqType | |
The type of the input sequence as one of ptreegen::enums. | |
distFunction | |
Pointer to function used to compute distances between a two sequences. | |
parsIterCnt | |
options | |
Reference to the dictionary like object. | |
alignment | |
Reference to an object representing the multiple sequence alignment. | |
distanceMatrix | |
The distance matrix for the alignment. | |
tree | |
The generated tree. | |
visualization |
Parses user specified options and delegetes appropriate actions to other modules.
Also serves as a data storage of computed results.
Definition at line 24 of file computation.py.
def ptreegen.computation.Computation.__init__ | ( | self, | |
options | |||
) |
Constructor initializes the object variables and calls other modules to do so.
options | computation options in the form of a dictionary-like object |
Definition at line 31 of file computation.py.
def ptreegen.computation.Computation.checkAlignment | ( | self | ) |
Checks the input alignment for duplicate taxa id strings.
Definition at line 89 of file computation.py.
References ptreegen.computation.Computation.alignment.
def ptreegen.computation.Computation.cleanAlignment | ( | self, | |
alignment | |||
) |
Method responsible for the correct alignment cleaning.
It removes badly conserved regions and/or regions with too many gaps, if requested by the user.
alignment | the mutliple sequence alignment instance |
Definition at line 150 of file computation.py.
References ptreegen.computation.Computation.gapCutoff, ptreegen.computation.Computation.includeGaps, ptreegen.computation.Computation.pairCutoff, and ptreegen.computation.Computation.removePoor.
Referenced by ptreegen.computation.Computation.update().
def ptreegen.computation.Computation.computeDistanceMatrix | ( | self, | |
alignment, | |||
distFunction | |||
) |
Computes the distance matrix from the alignment.
alignment | the mutliple sequence alignment instance |
distFunction | the distance measure used, can be one of the functions in ptreegen::distance_functions. |
Definition at line 127 of file computation.py.
References ptreegen.computation.Computation.distFunction, and ptreegen.computation.Computation.options.
Referenced by ptreegen.computation.Computation.computeTree(), and ptreegen.computation.Computation.update().
def ptreegen.computation.Computation.computeTree | ( | self | ) |
Method that delegates tree computation to the appropriate module.
Definition at line 102 of file computation.py.
References ptreegen.computation.Computation.algorithm, ptreegen.computation.Computation.alignment, ptreegen.computation.Computation.computeDistanceMatrix(), ptreegen.computation.Computation.distanceMatrix, ptreegen.computation.Computation.distFunction, and ptreegen.computation.Computation.parsIterCnt.
Referenced by ptreegen.computation.Computation.update().
def ptreegen.computation.Computation.parseOptions | ( | self, | |
options | |||
) |
Parses the options passed to the constructor.
options | computation options in the form of a dictionary-like object |
Definition at line 53 of file computation.py.
References ptreegen.computation.Computation.algorithm, ptreegen.computation.Computation.alignment, ptreegen.computation.Computation.distFunction, ptreegen.computation.Computation.gapCutoff, ptreegen.computation.Computation.gapPenalty, ptreegen.computation.Computation.includeGaps, ptreegen.computation.Computation.pairCutoff, ptreegen.computation.Computation.parsIterCnt, ptreegen.computation.Computation.removePoor, and ptreegen.computation.Computation.seqType.
def ptreegen.computation.Computation.showResults | ( | self | ) |
Definition at line 192 of file computation.py.
def ptreegen.computation.Computation.update | ( | self | ) |
Method that can be used to update the results, if the Computation class changes.
Definition at line 115 of file computation.py.
References ptreegen.computation.Computation.alignment, ptreegen.computation.Computation.cleanAlignment(), ptreegen.computation.Computation.computeDistanceMatrix(), ptreegen.computation.Computation.computeTree(), ptreegen.computation.Computation.distanceMatrix, ptreegen.computation.Computation.distFunction, and ptreegen.computation.Computation.tree.
ptreegen.computation.Computation.algorithm |
The methodology used to build the tree as one of those in ptreegen::enums.
Definition at line 32 of file computation.py.
Referenced by ptreegen.computation.Computation.computeTree(), and ptreegen.computation.Computation.parseOptions().
ptreegen.computation.Computation.alignment |
Reference to an object representing the multiple sequence alignment.
Definition at line 43 of file computation.py.
Referenced by ptreegen.computation.Computation.checkAlignment(), ptreegen.computation.Computation.computeTree(), ptreegen.computation.Computation.parseOptions(), and ptreegen.computation.Computation.update().
ptreegen.computation.Computation.distanceMatrix |
The distance matrix for the alignment.
Definition at line 45 of file computation.py.
Referenced by ptreegen.computation.Computation.computeTree(), and ptreegen.computation.Computation.update().
ptreegen.computation.Computation.distFunction |
Pointer to function used to compute distances between a two sequences.
Definition at line 39 of file computation.py.
Referenced by ptreegen.computation.Computation.computeDistanceMatrix(), ptreegen.computation.Computation.computeTree(), ptreegen.computation.Computation.parseOptions(), and ptreegen.computation.Computation.update().
ptreegen.computation.Computation.gapCutoff |
If at least x% in column are not gaps, then the column is left in the alignment.
Definition at line 36 of file computation.py.
Referenced by ptreegen.computation.Computation.cleanAlignment(), and ptreegen.computation.Computation.parseOptions().
ptreegen.computation.Computation.gapPenalty |
Cost of gaps when they are included in the distance computation.
Definition at line 33 of file computation.py.
Referenced by ptreegen.computation.Computation.parseOptions().
ptreegen.computation.Computation.includeGaps |
Specifies if columns with gaps should be left in the alignment or deleted.
Definition at line 34 of file computation.py.
Referenced by ptreegen.computation.Computation.cleanAlignment(), and ptreegen.computation.Computation.parseOptions().
ptreegen.computation.Computation.options |
Reference to the dictionary like object.
Definition at line 41 of file computation.py.
Referenced by ptreegen.computation.Computation.computeDistanceMatrix().
ptreegen.computation.Computation.pairCutoff |
If at least x% of pairs in column are identical, then the column is left in the alignment.
Definition at line 37 of file computation.py.
Referenced by ptreegen.computation.Computation.cleanAlignment(), and ptreegen.computation.Computation.parseOptions().
ptreegen.computation.Computation.parsIterCnt |
Definition at line 40 of file computation.py.
Referenced by ptreegen.computation.Computation.computeTree(), and ptreegen.computation.Computation.parseOptions().
ptreegen.computation.Computation.removePoor |
Specifies if poorly conserved regions should be removed from the alignment.
Definition at line 35 of file computation.py.
Referenced by ptreegen.computation.Computation.cleanAlignment(), and ptreegen.computation.Computation.parseOptions().
ptreegen.computation.Computation.seqType |
The type of the input sequence as one of ptreegen::enums.
Definition at line 38 of file computation.py.
Referenced by ptreegen.computation.Computation.parseOptions().
ptreegen.computation.Computation.tree |
The generated tree.
Definition at line 46 of file computation.py.
Referenced by ptreegen.parsimony.LargeParsimony.cost(), and ptreegen.computation.Computation.update().
ptreegen.computation.Computation.visualization |
Definition at line 47 of file computation.py.