public class RawHierarchyTree
extends java.lang.Object
Constructor and Description |
---|
RawHierarchyTree(java.lang.String n,
RawHierarchyTree p,
Taxonomy tax)
Creates new RawHierarchyTree given the name and its parent.
|
Modifier and Type | Method and Description |
---|---|
float |
getCopyNumber() |
int |
getGenusIndex()
Returns the genus index of this treenode.
|
int |
getGenusNodeCount() |
int |
getLeaveCount()
Counts the number of sequence leaves below this tree.
|
java.lang.String |
getName()
Gets the name of the treenode.
|
void |
getNodeMap(java.lang.String level,
java.util.HashMap<java.lang.String,RawHierarchyTree> nodeMap)
get all the lowest level nodes in given hierarchy level starting from the given root
|
int |
getNonSingletonLeaveCount()
Counts the number of non-singleton sequence leaves below this tree.
|
RawHierarchyTree |
getParent()
Gets the parent treenode.
|
int |
getSizeofChildren()
Gets the size of the children,
either taxon children or sequence leaves.
|
int |
getSizeofSubclasses()
Gets the size of the child treenodes.
|
RawHierarchyTree |
getSubclassbyName(java.lang.String n)
Gets the child treenode with the given name.
|
java.util.Collection<RawHierarchyTree> |
getSubclasses()
Gets the array of the subclasses if any.
|
Taxonomy |
getTaxonomy()
Returns the taxon object of this treenode.
|
int |
getWordOccurrence(int wordIndex)
Gets the word occurrence for the given word index.
|
int |
getWordOccurrenceSize()
Returns the size of the array wordOccurrence.
|
boolean |
hasCopyNumber() |
void |
initWordOccurrence(LineageSequence pSeq,
float[] wordPriorArr)
This method initiates the word occurrences from a sequence for the
lowest level of the hierarchy tree.
|
boolean |
isSingleton() |
void |
releaseWordOccurrence()
Resets the array wordOccurrence to null.
|
protected void |
setCopyNumber(float c) |
void |
setGenusIndex(int i)
Sets the genus index of this treenode.
|
public RawHierarchyTree(java.lang.String n, RawHierarchyTree p, Taxonomy tax)
protected void setCopyNumber(float c)
public float getCopyNumber()
public boolean hasCopyNumber()
public java.lang.String getName()
public RawHierarchyTree getParent()
public java.util.Collection<RawHierarchyTree> getSubclasses()
public RawHierarchyTree getSubclassbyName(java.lang.String n)
public int getSizeofChildren()
public int getSizeofSubclasses()
public void initWordOccurrence(LineageSequence pSeq, float[] wordPriorArr) throws java.io.IOException
java.io.IOException
public int getWordOccurrenceSize()
public int getWordOccurrence(int wordIndex)
public void releaseWordOccurrence()
public int getLeaveCount()
public int getGenusNodeCount()
public boolean isSingleton()
public int getNonSingletonLeaveCount()
public Taxonomy getTaxonomy()
public void setGenusIndex(int i)
public int getGenusIndex()
public void getNodeMap(java.lang.String level, java.util.HashMap<java.lang.String,RawHierarchyTree> nodeMap)