public class PhylogenyMethods
extends java.lang.Object
Modifier and Type | Class | Description |
---|---|---|
static class |
PhylogenyMethods.DESCENDANT_SORT_PRIORITY |
|
static class |
PhylogenyMethods.PhylogenyNodeField |
Modifier and Type | Method | Description |
---|---|---|
static void |
addMolecularSeqsToTree(Phylogeny phy,
Msa msa) |
|
static DescriptiveStatistics |
calculateBranchLengthStatistics(Phylogeny phy) |
|
static java.util.List<DescriptiveStatistics> |
calculateConfidenceStatistics(Phylogeny phy) |
|
static double |
calculateDistance(PhylogenyNode node1,
PhylogenyNode node2) |
Calculates the distance between PhylogenyNodes node1 and node2.
|
static PhylogenyNode |
calculateLCA(PhylogenyNode node1,
PhylogenyNode node2) |
Returns the LCA of PhylogenyNodes node1 and node2.
|
static PhylogenyNode |
calculateLCAonTreeWithIdsInPreOrder(PhylogenyNode node1,
PhylogenyNode node2) |
Returns the LCA of PhylogenyNodes node1 and node2.
|
static short |
calculateMaxBranchesToLeaf(PhylogenyNode node) |
|
static int |
calculateMaxDepth(Phylogeny phy) |
|
static double |
calculateMaxDistanceToRoot(Phylogeny phy) |
|
static PhylogenyNode |
calculateNodeWithMaxDistanceToRoot(Phylogeny phy) |
|
static DescriptiveStatistics |
calculateNumberOfDescendantsPerNodeStatistics(Phylogeny phy) |
|
static int |
calculateNumberOfExternalNodesWithoutTaxonomy(PhylogenyNode node) |
|
java.lang.Object |
clone() |
|
static void |
collapseSubtreeStructure(PhylogenyNode n) |
|
static int |
countNumberOfOneDescendantNodes(Phylogeny phy) |
|
static int |
countNumberOfPolytomies(Phylogeny phy) |
|
static java.util.HashMap<java.lang.String,PhylogenyNode> |
createNameToExtNodeMap(Phylogeny phy) |
|
static void |
deleteExternalNodesNegativeSelection(java.lang.String[] node_names_to_delete,
Phylogeny p) |
|
static void |
deleteExternalNodesNegativeSelection(java.util.Set<java.lang.Long> to_delete,
Phylogeny phy) |
|
static java.util.List<java.lang.String> |
deleteExternalNodesPositiveSelection(java.lang.String[] node_names_to_keep,
Phylogeny p) |
|
static void |
deleteExternalNodesPositiveSelectionT(java.util.List<Taxonomy> species_to_keep,
Phylogeny phy) |
|
static void |
deleteInternalNodesWithOnlyOneDescendent(Phylogeny phy) |
|
static void |
deleteNonOrthologousExternalNodes(Phylogeny phy,
PhylogenyNode n) |
|
static java.util.List<java.util.List<PhylogenyNode>> |
divideIntoSubTrees(Phylogeny phy,
double min_distance_to_root) |
|
static boolean |
extractFastaInformation(Phylogeny phy) |
|
static java.util.List<PhylogenyNode> |
getAllDescendants(PhylogenyNode node) |
|
static java.awt.Color |
getBranchColorValue(PhylogenyNode node) |
Convenience method
|
static double |
getBranchWidthValue(PhylogenyNode node) |
Convenience method
|
static double |
getConfidenceValue(PhylogenyNode node) |
Convenience method
|
static double[] |
getConfidenceValuesAsArray(PhylogenyNode node) |
Convenience method
|
static Event |
getEventAtLCA(PhylogenyNode n1,
PhylogenyNode n2) |
|
static Taxonomy |
getExternalDescendantsTaxonomy(PhylogenyNode node) |
Returns taxonomy t if all external descendants have
the same taxonomy t, null otherwise.
|
static PhylogenyNode |
getFurthestDescendant(PhylogenyNode node) |
|
static double |
getMaximumConfidenceValue(Phylogeny phy) |
Returns the largest confidence value found on phy.
|
static int |
getMinimumDescendentsPerInternalNodes(Phylogeny phy) |
|
static java.lang.String |
getSpecies(PhylogenyNode node) |
Convenience method for display purposes.
|
static java.lang.String |
getTaxonomyIdentifier(PhylogenyNode node) |
Convenience method for display purposes.
|
static boolean |
isAllDecendentsAreDuplications(PhylogenyNode n) |
|
static boolean |
isHasExternalDescendant(PhylogenyNode node) |
|
static boolean |
isInternalNamesLookLikeConfidences(Phylogeny phy) |
|
static boolean |
isTaxonomyHasIdentifierOfGivenProvider(Taxonomy tax,
java.lang.String[] providers) |
|
static void |
midpointRoot(Phylogeny phylogeny) |
|
static void |
normalizeBootstrapValues(Phylogeny phylogeny,
double max_bootstrap_value,
double max_normalized_value) |
|
static java.util.List<PhylogenyNode> |
obtainAllNodesAsList(Phylogeny phy) |
|
static java.util.Map<Taxonomy,java.lang.Integer> |
obtainDistinctTaxonomyCounts(PhylogenyNode node) |
Returns a map of distinct taxonomies of
all external nodes of node.
|
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.
|
static void |
postorderBranchColorAveragingExternalNodeBased(Phylogeny p) |
|
static void |
preOrderReId(Phylogeny phy) |
|
static Phylogeny[] |
readPhylogenies(PhylogenyParser parser,
java.io.File file) |
|
static Phylogeny[] |
readPhylogenies(PhylogenyParser parser,
java.util.List<java.io.File> files) |
|
static void |
removeNode(PhylogenyNode remove_me,
Phylogeny phylogeny) |
|
static java.util.List<PhylogenyNode> |
searchData(java.lang.String query,
Phylogeny phy,
boolean case_sensitive,
boolean partial,
boolean regex,
boolean search_domains,
double domains_confidence_threshold) |
|
static java.util.List<PhylogenyNode> |
searchDataLogicalAnd(java.lang.String[] queries,
Phylogeny phy,
boolean case_sensitive,
boolean partial,
boolean search_domains,
double domains_confidence_threshold) |
|
static void |
setAllIndicatorsToZero(Phylogeny phy) |
|
static void |
setBootstrapConfidence(PhylogenyNode node,
double bootstrap_confidence_value) |
Convenience method.
|
static void |
setBranchColorValue(PhylogenyNode node,
java.awt.Color color) |
|
static void |
setBranchWidthValue(PhylogenyNode node,
double branch_width_value) |
Convenience method
|
static void |
setConfidence(PhylogenyNode node,
double confidence_value) |
Convenience method.
|
static void |
setConfidence(PhylogenyNode node,
double confidence_value,
java.lang.String type) |
Convenience method.
|
static void |
setScientificName(PhylogenyNode node,
java.lang.String scientific_name) |
|
static void |
setTaxonomyCode(PhylogenyNode node,
java.lang.String taxonomy_code) |
Convenience method to set the taxonomy code of a phylogeny node.
|
static void |
sortNodeDescendents(PhylogenyNode node,
PhylogenyMethods.DESCENDANT_SORT_PRIORITY pri) |
|
static java.util.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 void |
transferInternalNamesToBootstrapSupport(Phylogeny phy) |
|
static void |
transferInternalNodeNamesToConfidence(Phylogeny phy,
java.lang.String confidence_type) |
|
static void |
transferNodeNameToField(Phylogeny phy,
PhylogenyMethods.PhylogenyNodeField field,
boolean external_only) |
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
public static boolean extractFastaInformation(Phylogeny phy)
public static DescriptiveStatistics calculateBranchLengthStatistics(Phylogeny phy)
public static java.util.List<DescriptiveStatistics> calculateConfidenceStatistics(Phylogeny phy)
public static double calculateDistance(PhylogenyNode node1, PhylogenyNode node2)
node1
- node2
- public static final PhylogenyNode calculateLCA(PhylogenyNode node1, PhylogenyNode node2)
node1
- node2
- public static final PhylogenyNode calculateLCAonTreeWithIdsInPreOrder(PhylogenyNode node1, PhylogenyNode node2)
node1
- node2
- public static short calculateMaxBranchesToLeaf(PhylogenyNode node)
public static int calculateMaxDepth(Phylogeny phy)
public static double calculateMaxDistanceToRoot(Phylogeny phy)
public static PhylogenyNode calculateNodeWithMaxDistanceToRoot(Phylogeny phy)
public static int calculateNumberOfExternalNodesWithoutTaxonomy(PhylogenyNode node)
public static DescriptiveStatistics calculateNumberOfDescendantsPerNodeStatistics(Phylogeny phy)
public static final void collapseSubtreeStructure(PhylogenyNode n)
public static int countNumberOfOneDescendantNodes(Phylogeny phy)
public static int countNumberOfPolytomies(Phylogeny phy)
public static final java.util.HashMap<java.lang.String,PhylogenyNode> createNameToExtNodeMap(Phylogeny phy)
public static void deleteExternalNodesNegativeSelection(java.util.Set<java.lang.Long> to_delete, Phylogeny phy)
public static void deleteExternalNodesNegativeSelection(java.lang.String[] node_names_to_delete, Phylogeny p) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public static java.util.List<java.lang.String> deleteExternalNodesPositiveSelection(java.lang.String[] node_names_to_keep, Phylogeny p)
public static void deleteExternalNodesPositiveSelectionT(java.util.List<Taxonomy> species_to_keep, Phylogeny phy)
public static final void deleteInternalNodesWithOnlyOneDescendent(Phylogeny phy)
public static final void deleteNonOrthologousExternalNodes(Phylogeny phy, PhylogenyNode n)
public static final java.util.List<java.util.List<PhylogenyNode>> divideIntoSubTrees(Phylogeny phy, double min_distance_to_root)
public static java.util.List<PhylogenyNode> getAllDescendants(PhylogenyNode node)
public static java.awt.Color getBranchColorValue(PhylogenyNode node)
node
- public static double getBranchWidthValue(PhylogenyNode node)
public static double getConfidenceValue(PhylogenyNode node)
public static double[] getConfidenceValuesAsArray(PhylogenyNode node)
public static final Event getEventAtLCA(PhylogenyNode n1, PhylogenyNode n2)
public static Taxonomy getExternalDescendantsTaxonomy(PhylogenyNode node)
public static PhylogenyNode getFurthestDescendant(PhylogenyNode node)
public static double getMaximumConfidenceValue(Phylogeny phy)
public static int getMinimumDescendentsPerInternalNodes(Phylogeny phy)
public static java.lang.String getSpecies(PhylogenyNode node)
public static java.lang.String getTaxonomyIdentifier(PhylogenyNode node)
public static final boolean isAllDecendentsAreDuplications(PhylogenyNode n)
public static boolean isHasExternalDescendant(PhylogenyNode node)
public static boolean isTaxonomyHasIdentifierOfGivenProvider(Taxonomy tax, java.lang.String[] providers)
public static void midpointRoot(Phylogeny phylogeny)
public static void normalizeBootstrapValues(Phylogeny phylogeny, double max_bootstrap_value, double max_normalized_value)
public static java.util.List<PhylogenyNode> obtainAllNodesAsList(Phylogeny phy)
public static java.util.Map<Taxonomy,java.lang.Integer> obtainDistinctTaxonomyCounts(PhylogenyNode node)
public static void orderAppearance(PhylogenyNode n, boolean order, boolean order_ext_alphabetically, PhylogenyMethods.DESCENDANT_SORT_PRIORITY pri)
order
- decides in which direction to orderpri
- public static void postorderBranchColorAveragingExternalNodeBased(Phylogeny p)
public static final void preOrderReId(Phylogeny phy)
public static final Phylogeny[] readPhylogenies(PhylogenyParser parser, java.io.File file) throws java.io.IOException
java.io.IOException
public static final Phylogeny[] readPhylogenies(PhylogenyParser parser, java.util.List<java.io.File> files) throws java.io.IOException
java.io.IOException
public static void removeNode(PhylogenyNode remove_me, Phylogeny phylogeny)
public static java.util.List<PhylogenyNode> searchData(java.lang.String query, Phylogeny phy, boolean case_sensitive, boolean partial, boolean regex, boolean search_domains, double domains_confidence_threshold)
public static java.util.List<PhylogenyNode> searchDataLogicalAnd(java.lang.String[] queries, Phylogeny phy, boolean case_sensitive, boolean partial, boolean search_domains, double domains_confidence_threshold)
public static void setAllIndicatorsToZero(Phylogeny phy)
public static void setBootstrapConfidence(PhylogenyNode node, double bootstrap_confidence_value)
public static void setBranchColorValue(PhylogenyNode node, java.awt.Color color)
public static void setBranchWidthValue(PhylogenyNode node, double branch_width_value)
public static void setConfidence(PhylogenyNode node, double confidence_value)
public static void setConfidence(PhylogenyNode node, double confidence_value, java.lang.String type)
public static void setScientificName(PhylogenyNode node, java.lang.String scientific_name)
public static void setTaxonomyCode(PhylogenyNode node, java.lang.String taxonomy_code) throws PhyloXmlDataFormatException
node
- taxonomy_code
- PhyloXmlDataFormatException
public static final void sortNodeDescendents(PhylogenyNode node, PhylogenyMethods.DESCENDANT_SORT_PRIORITY pri)
public static java.util.List<PhylogenyNode> taxonomyBasedDeletionOfExternalNodes(Phylogeny reference, Phylogeny to_be_stripped)
reference
- a reference Phylogenyto_be_stripped
- Phylogeny to be strippedpublic static final void transferInternalNamesToBootstrapSupport(Phylogeny phy)
public static final boolean isInternalNamesLookLikeConfidences(Phylogeny phy)
public static final void transferInternalNodeNamesToConfidence(Phylogeny phy, java.lang.String confidence_type)
public static final void transferNodeNameToField(Phylogeny phy, PhylogenyMethods.PhylogenyNodeField field, boolean external_only) throws PhyloXmlDataFormatException
PhyloXmlDataFormatException