Package org.forester.phylogeny
Class PhylogenyMethods
java.lang.Object
org.forester.phylogeny.PhylogenyMethods
- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enum - 
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddMolecularSeqsToTree(Phylogeny phy, Msa msa) static DescriptiveStatisticsstatic List<DescriptiveStatistics>static doublecalculateDistance(PhylogenyNode node1, PhylogenyNode node2) Calculates the distance between PhylogenyNodes node1 and node2.static final PhylogenyNodecalculateLCA(PhylogenyNode node1, PhylogenyNode node2) Returns the LCA of PhylogenyNodes node1 and node2.static final PhylogenyNodecalculateLCAonTreeWithIdsInPreOrder(PhylogenyNode node1, PhylogenyNode node2) Returns the LCA of PhylogenyNodes node1 and node2.static shortstatic intstatic doublestatic PhylogenyNodestatic DescriptiveStatisticsstatic intclone()static final voidstatic intstatic intstatic final HashMap<String,PhylogenyNode> static voiddeleteExternalNodesNegativeSelection(String[] node_names_to_delete, Phylogeny p) static voiddeleteExternalNodesNegativeSelection(Set<Long> to_delete, Phylogeny phy) deleteExternalNodesPositiveSelection(String[] node_names_to_keep, Phylogeny p) static voiddeleteExternalNodesPositiveSelectionT(List<Taxonomy> species_to_keep, Phylogeny phy) static final voidstatic final voidstatic final List<List<PhylogenyNode>>divideIntoSubTrees(Phylogeny phy, double min_distance_to_root) static booleanstatic List<PhylogenyNode>static ColorConvenience methodstatic doubleConvenience methodstatic doubleConvenience methodstatic double[]Convenience methodstatic final EventgetEventAtLCA(PhylogenyNode n1, PhylogenyNode n2) static TaxonomyReturns taxonomy t if all external descendants have the same taxonomy t, null otherwise.static PhylogenyNodestatic doubleReturns the largest confidence value found on phy.static intstatic StringgetSpecies(PhylogenyNode node) Convenience method for display purposes.static StringConvenience method for display purposes.static final booleanstatic booleanstatic final booleanstatic booleanisTaxonomyHasIdentifierOfGivenProvider(Taxonomy tax, String[] providers) static voidmidpointRoot(Phylogeny phylogeny) static voidnormalizeBootstrapValues(Phylogeny phylogeny, double max_bootstrap_value, double max_normalized_value) static List<PhylogenyNode>Returns a map of distinct taxonomies of all external nodes of node.static voidorderAppearance(PhylogenyNode n, boolean order, boolean order_ext_alphabetically, PhylogenyMethods.DESCENDANT_SORT_PRIORITY pri) Arranges the order of childern for each node of this Phylogeny in such a way that either the branch with more children is on top (right) or on bottom (left), dependent on the value of boolean order.static voidstatic final voidpreOrderReId(Phylogeny phy) static final Phylogeny[]readPhylogenies(PhylogenyParser parser, File file) static final Phylogeny[]readPhylogenies(PhylogenyParser parser, List<File> files) static voidremoveNode(PhylogenyNode remove_me, Phylogeny phylogeny) static List<PhylogenyNode>searchData(String query, Phylogeny phy, boolean case_sensitive, boolean partial, boolean regex, boolean search_domains, double domains_confidence_threshold) static List<PhylogenyNode>searchDataLogicalAnd(String[] queries, Phylogeny phy, boolean case_sensitive, boolean partial, boolean search_domains, double domains_confidence_threshold) static voidstatic voidsetBootstrapConfidence(PhylogenyNode node, double bootstrap_confidence_value) Convenience method.static voidsetBranchColorValue(PhylogenyNode node, Color color) static voidsetBranchWidthValue(PhylogenyNode node, double branch_width_value) Convenience methodstatic voidsetConfidence(PhylogenyNode node, double confidence_value) Convenience method.static voidsetConfidence(PhylogenyNode node, double confidence_value, String type) Convenience method.static voidsetScientificName(PhylogenyNode node, String scientific_name) static voidsetTaxonomyCode(PhylogenyNode node, String taxonomy_code) Convenience method to set the taxonomy code of a phylogeny node.static final voidstatic List<PhylogenyNode>taxonomyBasedDeletionOfExternalNodes(Phylogeny reference, Phylogeny to_be_stripped) Removes from Phylogeny to_be_stripped all external Nodes which are associated with a species NOT found in Phylogeny reference.static final voidstatic final voidtransferInternalNodeNamesToConfidence(Phylogeny phy, String confidence_type) static final voidtransferNodeNameToField(Phylogeny phy, PhylogenyMethods.PhylogenyNodeField field, boolean external_only)  
- 
Method Details
- 
clone
- Overrides:
 clonein classObject- Throws:
 CloneNotSupportedException
 - 
extractFastaInformation
 - 
calculateBranchLengthStatistics
 - 
calculateConfidenceStatistics
 - 
calculateDistance
Calculates the distance between PhylogenyNodes node1 and node2.- Parameters:
 node1-node2-- Returns:
 - distance between node1 and node2
 
 - 
calculateLCA
Returns the LCA of PhylogenyNodes node1 and node2.- Parameters:
 node1-node2-- Returns:
 - LCA of node1 and node2
 
 - 
calculateLCAonTreeWithIdsInPreOrder
public static final PhylogenyNode calculateLCAonTreeWithIdsInPreOrder(PhylogenyNode node1, PhylogenyNode node2) Returns the LCA of PhylogenyNodes node1 and node2. Precondition: ids are in pre-order (or level-order).- Parameters:
 node1-node2-- Returns:
 - LCA of node1 and node2
 
 - 
calculateMaxBranchesToLeaf
 - 
calculateMaxDepth
 - 
calculateMaxDistanceToRoot
 - 
calculateNodeWithMaxDistanceToRoot
 - 
calculateNumberOfExternalNodesWithoutTaxonomy
 - 
calculateNumberOfDescendantsPerNodeStatistics
 - 
collapseSubtreeStructure
 - 
countNumberOfOneDescendantNodes
 - 
countNumberOfPolytomies
 - 
createNameToExtNodeMap
 - 
deleteExternalNodesNegativeSelection
 - 
deleteExternalNodesNegativeSelection
public static void deleteExternalNodesNegativeSelection(String[] node_names_to_delete, Phylogeny p) throws IllegalArgumentException - Throws:
 IllegalArgumentException
 - 
deleteExternalNodesPositiveSelection
 - 
deleteExternalNodesPositiveSelectionT
 - 
deleteInternalNodesWithOnlyOneDescendent
 - 
deleteNonOrthologousExternalNodes
 - 
divideIntoSubTrees
public static final List<List<PhylogenyNode>> divideIntoSubTrees(Phylogeny phy, double min_distance_to_root)  - 
getAllDescendants
 - 
getBranchColorValue
Convenience method- Parameters:
 node-- Returns:
 
 - 
getBranchWidthValue
Convenience method - 
getConfidenceValue
Convenience method - 
getConfidenceValuesAsArray
Convenience method - 
getEventAtLCA
 - 
getExternalDescendantsTaxonomy
Returns taxonomy t if all external descendants have the same taxonomy t, null otherwise. - 
getFurthestDescendant
 - 
getMaximumConfidenceValue
Returns the largest confidence value found on phy. - 
getMinimumDescendentsPerInternalNodes
 - 
getSpecies
Convenience method for display purposes. Not intended for algorithms. - 
getTaxonomyIdentifier
Convenience method for display purposes. Not intended for algorithms. - 
isAllDecendentsAreDuplications
 - 
isHasExternalDescendant
 - 
isTaxonomyHasIdentifierOfGivenProvider
 - 
midpointRoot
 - 
normalizeBootstrapValues
public static void normalizeBootstrapValues(Phylogeny phylogeny, double max_bootstrap_value, double max_normalized_value)  - 
obtainAllNodesAsList
 - 
obtainDistinctTaxonomyCounts
Returns a map of distinct taxonomies of all external nodes of node. If at least one of the external nodes has no taxonomy, null is returned. - 
orderAppearance
public static void orderAppearance(PhylogenyNode n, boolean order, boolean order_ext_alphabetically, PhylogenyMethods.DESCENDANT_SORT_PRIORITY pri) Arranges the order of childern for each node of this Phylogeny in such a way that either the branch with more children is on top (right) or on bottom (left), dependent on the value of boolean order.- Parameters:
 order- decides in which direction to orderpri-
 - 
postorderBranchColorAveragingExternalNodeBased
 - 
preOrderReId
 - 
readPhylogenies
public static final Phylogeny[] readPhylogenies(PhylogenyParser parser, File file) throws IOException - Throws:
 IOException
 - 
readPhylogenies
public static final Phylogeny[] readPhylogenies(PhylogenyParser parser, List<File> files) throws IOException - Throws:
 IOException
 - 
removeNode
 - 
searchData
public static List<PhylogenyNode> searchData(String query, Phylogeny phy, boolean case_sensitive, boolean partial, boolean regex, boolean search_domains, double domains_confidence_threshold)  - 
searchDataLogicalAnd
public static List<PhylogenyNode> searchDataLogicalAnd(String[] queries, Phylogeny phy, boolean case_sensitive, boolean partial, boolean search_domains, double domains_confidence_threshold)  - 
setAllIndicatorsToZero
 - 
setBootstrapConfidence
Convenience method. Sets value for the first confidence value (created if not present, values overwritten otherwise). - 
setBranchColorValue
 - 
setBranchWidthValue
Convenience method - 
setConfidence
Convenience method. Sets value for the first confidence value (created if not present, values overwritten otherwise). - 
setConfidence
Convenience method. Sets value for the first confidence value (created if not present, values overwritten otherwise). - 
setScientificName
 - 
setTaxonomyCode
public static void setTaxonomyCode(PhylogenyNode node, String taxonomy_code) throws PhyloXmlDataFormatException Convenience method to set the taxonomy code of a phylogeny node.- Parameters:
 node-taxonomy_code-- Throws:
 PhyloXmlDataFormatException
 - 
sortNodeDescendents
public static final void sortNodeDescendents(PhylogenyNode node, PhylogenyMethods.DESCENDANT_SORT_PRIORITY pri)  - 
taxonomyBasedDeletionOfExternalNodes
public static List<PhylogenyNode> taxonomyBasedDeletionOfExternalNodes(Phylogeny reference, Phylogeny to_be_stripped) Removes from Phylogeny to_be_stripped all external Nodes which are associated with a species NOT found in Phylogeny reference.- Parameters:
 reference- a reference Phylogenyto_be_stripped- Phylogeny to be stripped- Returns:
 - nodes removed from to_be_stripped
 
 - 
transferInternalNamesToBootstrapSupport
 - 
isInternalNamesLookLikeConfidences
 - 
transferInternalNodeNamesToConfidence
 - 
transferNodeNameToField
public static final void transferNodeNameToField(Phylogeny phy, PhylogenyMethods.PhylogenyNodeField field, boolean external_only) throws PhyloXmlDataFormatException - Throws:
 PhyloXmlDataFormatException
 - 
addMolecularSeqsToTree
 
 -