Package edu.msu.cme.rdp.classifier.utils
Class ClassifierFactory
- java.lang.Object
-
- edu.msu.cme.rdp.classifier.utils.ClassifierFactory
-
public class ClassifierFactory extends java.lang.ObjectA factory to create a classifier with the training information defined by the property file.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringFUNGALITS_unite_GENEstatic java.lang.StringFUNGALITS_warcup_GENEstatic java.lang.StringFUNGALLSU_GENEstatic java.lang.StringRRNA_16S_GENE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ClassifiercreateClassifier()Creates a new classifier.java.lang.StringgetClassifierVersion()Returns the version of the classifier.static ClassifierFactorygetFactory(java.lang.String gene)Returns a factory with the training information.HierarchyVersiongetHierarchyTrainsetNo()Returns the info of the taxonomy hierarchy from of the training file.java.lang.StringgetHierarchyVersion()Returns the version of the taxonomical hierarchy.HierarchyTreegetRoot()java.lang.StringgetTrainRank()static voidresetDefaultDataProp()Resets the data property file to the default data property file.static voidsetDataProp(java.lang.String properties, boolean relative)Sets the property file which contains the mapping of the training files.
-
-
-
Field Detail
-
RRNA_16S_GENE
public static final java.lang.String RRNA_16S_GENE
- See Also:
- Constant Field Values
-
FUNGALLSU_GENE
public static final java.lang.String FUNGALLSU_GENE
- See Also:
- Constant Field Values
-
FUNGALITS_warcup_GENE
public static final java.lang.String FUNGALITS_warcup_GENE
- See Also:
- Constant Field Values
-
FUNGALITS_unite_GENE
public static final java.lang.String FUNGALITS_unite_GENE
- See Also:
- Constant Field Values
-
-
Method Detail
-
resetDefaultDataProp
public static void resetDefaultDataProp()
Resets the data property file to the default data property file.
-
setDataProp
public static void setDataProp(java.lang.String properties, boolean relative)Sets the property file which contains the mapping of the training files. The actually training data files should be in the same directory as this property file. To override the default property location, this method must be called before the first ClassifierFactory.getFactory() call.
-
getFactory
public static ClassifierFactory getFactory(java.lang.String gene) throws java.io.IOException, TrainingDataException
Returns a factory with the training information. This method initialize all the training information. Note: the ClassifierFactory.setDataProp() static method must be called before this method if default property file will not be used.- Throws:
java.io.IOExceptionTrainingDataException
-
createClassifier
public Classifier createClassifier()
Creates a new classifier.
-
getHierarchyVersion
public java.lang.String getHierarchyVersion()
Returns the version of the taxonomical hierarchy.
-
getHierarchyTrainsetNo
public HierarchyVersion getHierarchyTrainsetNo()
Returns the info of the taxonomy hierarchy from of the training file.
-
getClassifierVersion
public java.lang.String getClassifierVersion()
Returns the version of the classifier.
-
getRoot
public HierarchyTree getRoot()
-
getTrainRank
public java.lang.String getTrainRank()
-
-