public class PhylogenyMethods
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static boolean |
areAllChildrenDuplications(PhylogenyNode n) |
static int |
calculateDepth(PhylogenyNode node) |
double |
calculateDistance(PhylogenyNode node1,
PhylogenyNode node2)
Calculates the distance between PhylogenyNodes node1 and node2.
|
static double |
calculateDistanceToRoot(PhylogenyNode node) |
double |
calculateFurthestDistance(Phylogeny phylogeny) |
static short |
calculateMaxBranchesToLeaf(PhylogenyNode node) |
static int |
calculateMaxDepth(Phylogeny phy) |
static double |
calculateMaxDistanceToRoot(Phylogeny phy) |
static int |
calculateMaximumNumberOfDescendantsPerNode(Phylogeny phy) |
static int |
calculateSumOfDistinctTaxonomies(PhylogenyNode node)
Returns the sum of different taxonomies of
all external nodes of node.
|
java.lang.Object |
clone() |
static void |
deleteExternalNodesNegativeSelection(java.util.Set<java.lang.Integer> to_delete,
Phylogeny phy) |
static void |
deleteExternalNodesNegativeSelection(java.lang.String[] node_names_to_delete,
Phylogeny p) |
static void |
deleteExternalNodesPositiveSelection(java.util.Set<Taxonomy> species_to_keep,
Phylogeny phy) |
static void |
deleteExternalNodesPositiveSelection(java.lang.String[] node_names_to_keep,
Phylogeny p) |
static java.util.Set<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 Taxonomy |
getExternalDescendantsTaxonomy(PhylogenyNode node)
Returns taxonomy t if all external descendants have
the same taxonomy t, null otherwise.
|
PhylogenyNode |
getFarthestNode1() |
PhylogenyNode |
getFarthestNode2() |
static PhylogenyNode |
getFurthestDescendant(PhylogenyNode node) |
static PhylogenyMethods |
getInstance() |
PhylogenyNode |
getLCA(PhylogenyNode node1,
PhylogenyNode node2)
Returns the LCA of PhylogenyNodes node1 and node2.
|
static double |
getMaximumConfidenceValue(Phylogeny phy)
Returns the largest confidence value found on phy.
|
java.util.List<PhylogenyNode> |
getOrthologousNodes(Phylogeny phy,
PhylogenyNode node)
Returns all orthologs of the external PhylogenyNode n of this Phylogeny.
|
static java.lang.String |
getSpecies(PhylogenyNode node)
Convenience method for display purposes.
|
static java.util.List<PhylogenyNode> |
getSuperOrthologousNodes(PhylogenyNode n)
Returns all Nodes which are connected to external PhylogenyNode n of this
Phylogeny by a path containing only speciation events.
|
static java.lang.String |
getTaxonomyIdentifier(PhylogenyNode node)
Convenience method for display purposes.
|
static java.util.List<PhylogenyNode> |
getUltraParalogousNodes(PhylogenyNode n)
Returns all Nodes which are connected to external PhylogenyNode n of this
Phylogeny by a path containing, and leading to, only duplication events.
|
static java.lang.String |
inferCommonPartOfScientificNameOfDescendants(PhylogenyNode node) |
boolean |
isAreOrthologous(PhylogenyNode node1,
PhylogenyNode node2) |
static boolean |
isHasExternalDescendant(PhylogenyNode node) |
static void |
midpointRoot(Phylogeny phylogeny) |
static void |
normalizeBootstrapValues(Phylogeny phylogeny,
double max_bootstrap_value,
double max_normalized_value) |
static java.util.Set<PhylogenyNode> |
obtainAllNodesAsSet(Phylogeny phy) |
static void |
postorderBranchColorAveragingExternalNodeBased(Phylogeny p) |
static void |
removeNode(PhylogenyNode remove_me,
Phylogeny phylogeny) |
static java.util.Set<PhylogenyNode> |
searchData(java.lang.String query,
Phylogeny phy,
boolean case_sensitive,
boolean partial) |
static java.util.Set<PhylogenyNode> |
searchDataLogicalAnd(java.lang.String[] queries,
Phylogeny phy,
boolean case_sensitive,
boolean partial) |
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 int |
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.
|
public double calculateDistance(PhylogenyNode node1, PhylogenyNode node2)
node1
- node2
- public double calculateFurthestDistance(Phylogeny phylogeny)
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
public PhylogenyNode getFarthestNode1()
public PhylogenyNode getFarthestNode2()
public PhylogenyNode getLCA(PhylogenyNode node1, PhylogenyNode node2)
node1
- node2
- public java.util.List<PhylogenyNode> getOrthologousNodes(Phylogeny phy, PhylogenyNode node)
PRECONDITION: This tree must be binary and rooted, and speciation - duplication need to be assigned for each of its internal Nodes.
Returns null if this Phylogeny is empty or if n is internal.
n
- external PhylogenyNode whose orthologs are to be returnedpublic boolean isAreOrthologous(PhylogenyNode node1, PhylogenyNode node2)
public static boolean areAllChildrenDuplications(PhylogenyNode n)
public static int calculateDepth(PhylogenyNode node)
public static double calculateDistanceToRoot(PhylogenyNode node)
public static short calculateMaxBranchesToLeaf(PhylogenyNode node)
public static int calculateMaxDepth(Phylogeny phy)
public static double calculateMaxDistanceToRoot(Phylogeny phy)
public static int calculateMaximumNumberOfDescendantsPerNode(Phylogeny phy)
public static int calculateSumOfDistinctTaxonomies(PhylogenyNode node)
public static void deleteExternalNodesNegativeSelection(java.util.Set<java.lang.Integer> 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 void deleteExternalNodesPositiveSelection(java.util.Set<Taxonomy> species_to_keep, Phylogeny phy)
public static void deleteExternalNodesPositiveSelection(java.lang.String[] node_names_to_keep, Phylogeny p)
public static java.util.Set<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 Taxonomy getExternalDescendantsTaxonomy(PhylogenyNode node)
public static PhylogenyNode getFurthestDescendant(PhylogenyNode node)
public static PhylogenyMethods getInstance()
public static double getMaximumConfidenceValue(Phylogeny phy)
public static java.lang.String getSpecies(PhylogenyNode node)
public static java.util.List<PhylogenyNode> getSuperOrthologousNodes(PhylogenyNode n)
PRECONDITION: This tree must be binary and rooted, and speciation - duplication need to be assigned for each of its internal Nodes.
Returns null if this Phylogeny is empty or if n is internal.
n
- external PhylogenyNode whose strictly speciation related Nodes
are to be returnedpublic static java.lang.String getTaxonomyIdentifier(PhylogenyNode node)
public static java.util.List<PhylogenyNode> getUltraParalogousNodes(PhylogenyNode n)
PRECONDITION: This tree must be binary and rooted, and speciation - duplication need to be assigned for each of its internal Nodes.
Returns null if this Phylogeny is empty or if n is internal.
(Last modified: 10/06/01)
n
- external PhylogenyNode whose ultra paralogs are to be returnedpublic static java.lang.String inferCommonPartOfScientificNameOfDescendants(PhylogenyNode node)
public static boolean isHasExternalDescendant(PhylogenyNode node)
public static void midpointRoot(Phylogeny phylogeny)
public static void normalizeBootstrapValues(Phylogeny phylogeny, double max_bootstrap_value, double max_normalized_value)
public static java.util.Set<PhylogenyNode> obtainAllNodesAsSet(Phylogeny phy)
public static void postorderBranchColorAveragingExternalNodeBased(Phylogeny p)
public static void removeNode(PhylogenyNode remove_me, Phylogeny phylogeny)
public static java.util.Set<PhylogenyNode> searchData(java.lang.String query, Phylogeny phy, boolean case_sensitive, boolean partial)
public static java.util.Set<PhylogenyNode> searchDataLogicalAnd(java.lang.String[] queries, Phylogeny phy, boolean case_sensitive, boolean partial)
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)
node
- taxonomy_code
- public static int taxonomyBasedDeletionOfExternalNodes(Phylogeny reference, Phylogeny to_be_stripped)
reference
- a reference Phylogenyto_be_stripped
- Phylogeny to be stripped