public class TreeFactory
extends java.lang.Object
| Constructor and Description |
|---|
TreeFactory(java.io.Reader taxReader)
Creates new TreeFactory
|
| Modifier and Type | Method and Description |
|---|---|
HierarchyTree |
addSequence(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.
|
HierarchyTree |
addSequence(LineageSequence pSeq,
boolean initWordOccurrence) |
void |
buildTree()
build the taxonomic tree without sequences attached to it
|
void |
calculateWordPrior() |
void |
displayTreePhylo(HierarchyTree root,
java.lang.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 description
|
java.lang.String |
getLowestRank() |
java.util.Set<java.lang.String> |
getRankSet() |
HierarchyTree |
getRoot()
Gets the root of the tree
|
Taxonomy |
getTaxonomy(java.lang.String seqName,
java.lang.String ancestorName,
int pid,
int index) |
float |
getWordPrior(int wordIndex) |
void |
printWordPriors() |
public TreeFactory(java.io.Reader taxReader)
throws java.io.IOException
java.io.IOExceptionpublic void buildTree()
public HierarchyTree addSequence(LineageSequence pSeq) throws java.io.IOException
java.io.IOExceptionpublic HierarchyTree addSequence(LineageSequence pSeq, boolean initWordOccurrence) throws java.io.IOException
java.io.IOExceptionpublic Taxonomy getTaxonomy(java.lang.String seqName, java.lang.String ancestorName, int pid, int index)
public HierarchyTree getRoot()
public java.util.Set<java.lang.String> getRankSet()
public java.lang.String getLowestRank()
public void displayTreePhylo(HierarchyTree root, java.lang.String index, int indent)
public void calculateWordPrior()
public void printWordPriors()
throws java.io.IOException
java.io.IOExceptionpublic float getWordPrior(int wordIndex)