Package edu.msu.cme.rdp.classifier
Class HierarchyTree
- java.lang.Object
-
- edu.msu.cme.rdp.classifier.HierarchyTree
-
public class HierarchyTree extends java.lang.ObjectA HierarchyTree holds the taxonomic information of a taxon.
-
-
Constructor Summary
Constructors Constructor Description HierarchyTree(java.lang.String n, int taxid, java.lang.String rank, int leaves, int gIndex)HierarchyTree(java.lang.String n, int taxid, java.lang.String rank, int leaves, int gIndex, double copyNumber)Creates new HierarchyTree given the taxonomic information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddParent(HierarchyTree p)Adds the parent HierarchyTree, also adds this node to the parent treenode as a child.HierarchyTreegetChild(java.lang.String name)doublegetCopyNumber()intgetGenusIndex()Gets the index of the genus treenode in the genusNodeList.intgetLeaveCount()Gets the size of sequence leaves directly belong to this treenode.java.lang.StringgetName()Gets the name of the treenode.HierarchyTreegetParent()Gets the parent treenode.java.lang.StringgetRank()Gets the rank of the treenode.intgetSizeofSubclasses()Gets the list of the child treenodes.java.util.List<HierarchyTree>getSubclasses()Gets the name of the treenode.intgetTaxid()Gets the taxon id of the treenode.booleanhasCopyNumberInfo()
-
-
-
Constructor Detail
-
HierarchyTree
public HierarchyTree(java.lang.String n, int taxid, java.lang.String rank, int leaves, int gIndex, double copyNumber)Creates new HierarchyTree given the taxonomic information.
-
HierarchyTree
public HierarchyTree(java.lang.String n, int taxid, java.lang.String rank, int leaves, int gIndex)
-
-
Method Detail
-
addParent
public void addParent(HierarchyTree p)
Adds the parent HierarchyTree, also adds this node to the parent treenode as a child.
-
getName
public java.lang.String getName()
Gets the name of the treenode.
-
getParent
public HierarchyTree getParent()
Gets the parent treenode.
-
getRank
public java.lang.String getRank()
Gets the rank of the treenode.
-
getTaxid
public int getTaxid()
Gets the taxon id of the treenode.
-
getSubclasses
public java.util.List<HierarchyTree> getSubclasses()
Gets the name of the treenode.
-
getSizeofSubclasses
public int getSizeofSubclasses()
Gets the list of the child treenodes.
-
getChild
public HierarchyTree getChild(java.lang.String name)
-
getLeaveCount
public int getLeaveCount()
Gets the size of sequence leaves directly belong to this treenode.
-
getGenusIndex
public int getGenusIndex()
Gets the index of the genus treenode in the genusNodeList. Returns -1 if not a genus node.
-
getCopyNumber
public double getCopyNumber()
-
hasCopyNumberInfo
public boolean hasCopyNumberInfo()
- Returns:
- true if the taxon has copy number information
-
-