Package edu.msu.cme.rdp.classifier

# Class HierarchyTree

java.lang.Object
edu.msu.cme.rdp.classifier.HierarchyTree

public class HierarchyTree extends Object
A HierarchyTree holds the taxonomic information of a taxon.

## Constructor Summary

Constructors
Constructor
Description
`HierarchyTree(String n, int taxid, String rank, int leaves, int gIndex)`
`HierarchyTree(String n, int taxid, String rank, int leaves, int gIndex, double copyNumber)`
Creates new HierarchyTree given the taxonomic information.

## Method Summary

Modifier and Type
Method
Description
`void`
`addParent(HierarchyTree p)`
Adds the parent HierarchyTree, also adds this node to the parent treenode as a child.
`HierarchyTree`
`getChild(String name)`
`double`
`getCopyNumber()`
`int`
`getGenusIndex()`
Gets the index of the genus treenode in the genusNodeList.
`int`
`getLeaveCount()`
Gets the size of sequence leaves directly belong to this treenode.
`String`
`getName()`
Gets the name of the treenode.
`HierarchyTree`
`getParent()`
Gets the parent treenode.
`String`
`getRank()`
Gets the rank of the treenode.
`int`
`getSizeofSubclasses()`
Gets the list of the child treenodes.
`List<HierarchyTree>`
`getSubclasses()`
Gets the name of the treenode.
`int`
`getTaxid()`
Gets the taxon id of the treenode.
`boolean`
`hasCopyNumberInfo()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### HierarchyTree

public HierarchyTree(String n, int taxid, String rank, int leaves, int gIndex, double copyNumber)
Creates new HierarchyTree given the taxonomic information.

### HierarchyTree

public HierarchyTree(String n, int taxid, String rank, int leaves, int gIndex)

## Method Details

### addParent

public void addParent(HierarchyTree p)
Adds the parent HierarchyTree, also adds this node to the parent treenode as a child.

### getName

public String getName()
Gets the name of the treenode.

### getParent

public HierarchyTree getParent()
Gets the parent treenode.

### getRank

public String getRank()
Gets the rank of the treenode.

### getTaxid

public int getTaxid()
Gets the taxon id of the treenode.

### getSubclasses

public List<HierarchyTree> getSubclasses()
Gets the name of the treenode.

### getSizeofSubclasses

public int getSizeofSubclasses()
Gets the list of the child treenodes.

### getChild

public HierarchyTree getChild(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