Class PhylogeneticTree
java.lang.Object
org.episteme.natural.biology.phylogeny.PhylogeneticTree
Phylogenetic tree construction and representation.
Supports multiple tree construction algorithms:
- UPGMA (Unweighted Pair Group Method with Arithmetic Mean)
- Neighbor-Joining
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classNode in a phylogenetic tree with branch length support. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Tree<PhylogeneticTree.Node> asTree(PhylogeneticTree.Node root) Converts a phylogenetic tree to aTreeinterface for graph operations.static PhylogeneticTree.NodebuildNeighborJoining(Real[][] distanceMatrix, List<Species> speciesList) static PhylogeneticTree.NodebuildNeighborJoiningFromLabels(Real[][] distanceMatrix, List<String> labels) Builds a phylogenetic tree using Neighbor-Joining algorithm (String labels).static PhylogeneticTree.NodebuildUPGMA(Real[][] distanceMatrix, List<Species> speciesList) static PhylogeneticTree.NodebuildUPGMAFromLabels(Real[][] distanceMatrix, List<String> labels) Builds a phylogenetic tree using UPGMA algorithm (String labels).static intCounts the number of leaves in the tree.Gets all leaf names from the tree.static PhylogeneticTree.NodeparseNewick(String newick) Parses a Newick format string into a phylogenetic tree.
-
Constructor Details
-
PhylogeneticTree
public PhylogeneticTree()
-
-
Method Details
-
buildUPGMA
-
buildUPGMAFromLabels
public static PhylogeneticTree.Node buildUPGMAFromLabels(Real[][] distanceMatrix, List<String> labels) Builds a phylogenetic tree using UPGMA algorithm (String labels). -
buildNeighborJoining
public static PhylogeneticTree.Node buildNeighborJoining(Real[][] distanceMatrix, List<Species> speciesList) -
buildNeighborJoiningFromLabels
public static PhylogeneticTree.Node buildNeighborJoiningFromLabels(Real[][] distanceMatrix, List<String> labels) Builds a phylogenetic tree using Neighbor-Joining algorithm (String labels). -
asTree
Converts a phylogenetic tree to aTreeinterface for graph operations.- Parameters:
root- the root node- Returns:
- a Tree implementation
-
parseNewick
Parses a Newick format string into a phylogenetic tree.- Parameters:
newick- the Newick format string- Returns:
- root node of the parsed tree
-
countLeaves
Counts the number of leaves in the tree. -
getLeafNames
Gets all leaf names from the tree.
-