Package edu.msu.cme.rdp.classifier.train

# Class TreeFactory

java.lang.Object
edu.msu.cme.rdp.classifier.train.TreeFactory

public class TreeFactory extends Object
A TreeFactory reads the raw taxonomic information and creates the RawHierarchyTree nodes.

## Constructor Summary

Constructors
Constructor
Description
`TreeFactory(Reader taxReader, int trainsetNo, String version, String modification)`
Creates new TreeFactory.

## Method Summary

Modifier and Type
Method
Description
`RawHierarchyTree`
`getRoot()`
Gets the root of the tree
`void`
`parseCopyNumberFile(String cnFile)`
parse the copy number file first step, take the copy number info from the lowest rank taxa, then calculate the copy number of the parent taxa based on the immediate children second step, for any taxon without copy number info, uses the
`void`
`parseSequenceFile(LineageSequenceParser parser)`

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

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

## Constructor Details

### TreeFactory

public TreeFactory(Reader taxReader, int trainsetNo, String version, String modification) throws IOException, NameRankDupException
Creates new TreeFactory.

Throws:
  `IOException`
  `NameRankDupException`

## Method Details

### parseSequenceFile

public void parseSequenceFile(LineageSequenceParser parser) throws IOException

Throws:
  `IOException`

### parseCopyNumberFile

public void parseCopyNumberFile(String cnFile) throws IOException
parse the copy number file first step, take the copy number info from the lowest rank taxa, then calculate the copy number of the parent taxa based on the immediate children second step, for any taxon without copy number info, uses the

Parameters:
  `cnFile` -
Throws:
  `IOException`

### getRoot

public RawHierarchyTree getRoot()
Gets the root of the tree