Class TreeFactory
java.lang.Object
edu.msu.cme.rdp.classifier.train.validation.TreeFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddSequence
(LineageSequence pSeq) For the given sequence name, its ancestors, and the sequence, creates a HierarchyTree for each ancestor, If the root does not exist, creates the root with a null parent.addSequence
(LineageSequence pSeq, boolean initWordOccurrence) void
build the taxonomic tree without sequences attached to itvoid
void
displayTreePhylo
(HierarchyTree root, String index, int indent) display the phylogenetic tree for each node, display the index and the name for each sequence, diaplay the name and the descriptiongetRoot()
Gets the root of the treegetTaxonomy
(String seqName, String ancestorName, int pid, int index) float
getWordPrior
(int wordIndex) void
-
Constructor Details
-
TreeFactory
Creates new TreeFactory- Throws:
IOException
-
-
Method Details
-
buildTree
public void buildTree()build the taxonomic tree without sequences attached to it -
addSequence
For the given sequence name, its ancestors, and the sequence, creates a HierarchyTree for each ancestor, If the root does not exist, creates the root with a null parent. If the root is already exist, checks the ParsedSequence to see if its oldest ancestor is the same as the previous root.- Throws:
IOException
-
addSequence
public HierarchyTree addSequence(LineageSequence pSeq, boolean initWordOccurrence) throws IOException - Throws:
IOException
-
getTaxonomy
-
getRoot
Gets the root of the tree -
getRankSet
-
getLowestRank
-
displayTreePhylo
display the phylogenetic tree for each node, display the index and the name for each sequence, diaplay the name and the description -
calculateWordPrior
public void calculateWordPrior() -
printWordPriors
- Throws:
IOException
-
getWordPrior
public float getWordPrior(int wordIndex)
-