Class HierarchyTree
java.lang.Object
edu.msu.cme.rdp.classifier.train.validation.HierarchyTree
-
Constructor Summary
ConstructorsConstructorDescriptionHierarchyTree
(String n, HierarchyTree p, Taxonomy tax) Creates new HierarchyTree given the name and its parent -
Method Summary
Modifier and TypeMethodDescriptionvoid
changeParentSeqCount
(int i) void
creates the word occurrence array from its children if the word occurrence for this node does not existGets the array of Sequenceleaves if anyint
getName()
Gets the name of the treenodevoid
getNodeList
(String level, List nodeList) get all the lowest level nodes in given hierarchy level starting from the given rootvoid
getNodeMap
(String level, HashMap<String, HierarchyTree> nodeMap) get all the lowest level nodes in given hierarchy level starting from the given rootint
int
Counts the number of sequence leaves below this treeint
Gets the parent treenodeint
Gets the size of the childrenint
Gets the size of sequence leaves directly belong to this tree, not including the hidden leavesint
Gets the size of the subclassesGets the subclass with the given nameGets the array of the subclasses if anyint
int
getWordOccurrence
(int wordIndex) Gets the word occurrence for the given word indexint
void
hideSeq
(edu.msu.cme.rdp.readseq.utils.orientation.GoodWordIterator iterator) This method hides a sequence by removing the words of that sequence from the total wordOccurrencevoid
void
void
void
initWordOccurrence
(LineageSequence pSeq, float[] wordPriorArr, boolean initWordOccurrence) This method initiate the word occurrence from the sequences for the lowest level of the hierarchy treeboolean
boolean
void
unhideSeq
(edu.msu.cme.rdp.readseq.utils.orientation.GoodWordIterator iterator) This method initiate the word occurrence from the sequences for the lowest level of the hierarchy tree
-
Constructor Details
-
HierarchyTree
Creates new HierarchyTree given the name and its parent
-
-
Method Details
-
getName
Gets the name of the treenode -
getParent
Gets the parent treenode -
getSubclasses
Gets the array of the subclasses if any -
getLeaves
Gets the array of Sequenceleaves if any -
getSubclassbyName
Gets the subclass with the given name -
getSizeofChildren
public int getSizeofChildren()Gets the size of the children -
getSizeofSubclasses
public int getSizeofSubclasses()Gets the size of the subclasses -
getSizeofLeaves
public int getSizeofLeaves()Gets the size of sequence leaves directly belong to this tree, not including the hidden leaves -
initWordOccurrence
public void initWordOccurrence(LineageSequence pSeq, float[] wordPriorArr, boolean initWordOccurrence) throws IOException This method initiate the word occurrence from the sequences for the lowest level of the hierarchy tree- Throws:
IOException
-
unhideSeq
public void unhideSeq(edu.msu.cme.rdp.readseq.utils.orientation.GoodWordIterator iterator) throws IOException This method initiate the word occurrence from the sequences for the lowest level of the hierarchy tree- Throws:
IOException
-
hideSeq
public void hideSeq(edu.msu.cme.rdp.readseq.utils.orientation.GoodWordIterator iterator) throws IOException This method hides a sequence by removing the words of that sequence from the total wordOccurrence- Throws:
IOException
-
changeParentSeqCount
public void changeParentSeqCount(int i) -
isWordOccurDone
public boolean isWordOccurDone() -
getWordOccurrenceSize
public int getWordOccurrenceSize() -
getNumberofUniqueWords
public int getNumberofUniqueWords() -
createWordOccurrenceFromSubclasses
public void createWordOccurrenceFromSubclasses()creates the word occurrence array from its children if the word occurrence for this node does not exist -
getWordOccurrence
public int getWordOccurrence(int wordIndex) Gets the word occurrence for the given word index -
getNumOfLeaves
public int getNumOfLeaves()Counts the number of sequence leaves below this tree -
increTotalSeqs
public void increTotalSeqs() -
getTotalSeqs
public int getTotalSeqs() -
getMissCount
public int getMissCount() -
getNumTotalTestedseq
public int getNumTotalTestedseq() -
incNumTotalTestedseq
public void incNumTotalTestedseq() -
incMissCount
public void incMissCount() -
getTaxonomy
-
isSingleton
public boolean isSingleton() -
getNodeList
get all the lowest level nodes in given hierarchy level starting from the given root -
getNodeMap
get all the lowest level nodes in given hierarchy level starting from the given root
-