public class RdpClassifier extends ClassifierModuleImpl
Modifier and Type | Field and Description |
---|---|
protected static String |
FUNCTION_RDP
Name of the RdpClassifier bash script function used to assign taxonomy: "runRdp"
|
protected static String |
RDP_DB
Config File property used to define an alternate RDP database file: "rdp.db" |
protected static String |
RDP_JAR
Config File property for RDP java executable JAR: "rdp.jar" |
protected static String |
RDP_PARAMS
Config List property for RDP java executable JAR runtime params: "exe.rdpParams" |
GZIP_EXT, LOG_EXT, PDF_EXT, RETURN, SH_EXT, TAB_DELIM, TSV_EXT, TXT_EXT
SCRIPT_BATCH_SIZE, SCRIPT_DEFAULT_HEADER, SCRIPT_NUM_THREADS, SCRIPT_PERMISSIONS, SCRIPT_TIMEOUT
MAIN_SCRIPT_PREFIX, OUTPUT_DIR, TEMP_DIR
Constructor and Description |
---|
RdpClassifier() |
Modifier and Type | Method and Description |
---|---|
List<List<String>> |
buildScript(List<File> files)
Build bash script lines to classify unpaired reads with RDP.
|
void |
checkDependencies()
Validate module dependencies:
Call
ClassifierModuleImpl.getClassifierExe() to verify the executable
Call ClassifierModuleImpl.getClassifierParams() to verify the runtime parameters are valid
Call ClassifierModuleImpl.validateModuleOrder() to validate module configuration order. |
String |
getClassifierExe()
RDP uses java to run a JAR file, so no special command is required
|
List<String> |
getClassifierParams()
Do not accept -t to define a database, since that instead requires the specific property: "rdp.db"
|
File |
getDB()
Return database directory, if multiple databases are configured, they must share a common parent directory and
the common parent directory is returned by this method.
|
List<String> |
getPreRequisiteModules()
If paired reads found, add prerequisite:
PearMergeReads . |
List<String> |
getWorkerScriptFunctions()
This method generates the required bash functions: "runRdp"
|
getClassifierType, getPostRequisiteModules, getSummary, validateModuleOrder
getInputFiles, getSeqFiles, isValidInputModule
buildScriptForPairedReads, executeTask, getJobParams, getMainScript, getRuntimeParams, getScriptDir, getScriptErrors, getTimeout, hasScripts
cacheInputFiles, cleanUp, compareTo, equals, findModuleInputFiles, getFileCache, getID, getModuleDir, getOutputDir, getTempDir, init, toString, validateFileNameUnique
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getSeqFiles
buildScriptForPairedReads, getJobParams, getMainScript, getScriptDir, getScriptErrors, getTimeout
cleanUp, executeTask, getID, getInputFiles, getModuleDir, getOutputDir, getTempDir, init, isValidInputModule
protected static final String FUNCTION_RDP
protected static final String RDP_DB
Config
File property used to define an alternate RDP database file: "rdp.db"protected static final String RDP_JAR
Config
File property for RDP java executable JAR: "rdp.jar"protected static final String RDP_PARAMS
Config
List property for RDP java executable JAR runtime params: "exe.rdpParams"public List<List<String>> buildScript(List<File> files) throws Exception
Example line: "java -jar $RDP_PATH t /database/silva128/rRNAClassifier.properties -o ./output/sample42.fasta_reported.tsv ./input/sample42.fasta"
buildScript
in interface ScriptModule
buildScript
in class ScriptModuleImpl
files
- Files in the input directory that contain only forward readsException
- if unable to generate script linespublic void checkDependencies() throws Exception
ClassifierModuleImpl
ClassifierModuleImpl.getClassifierExe()
to verify the executable
ClassifierModuleImpl.getClassifierParams()
to verify the runtime parameters are valid
ClassifierModuleImpl.validateModuleOrder()
to validate module configuration order.
BioModule.checkDependencies()
to validate script dependencies.
checkDependencies
in interface BioModule
checkDependencies
in class ClassifierModuleImpl
Exception
- thrown if missing or invalid dependencies are foundpublic String getClassifierExe() throws Exception
getClassifierExe
in interface ClassifierModule
getClassifierExe
in class ClassifierModuleImpl
Exception
- if the classifier program undefined or invalidpublic List<String> getClassifierParams() throws Exception
getClassifierParams
in interface ClassifierModule
getClassifierParams
in class ClassifierModuleImpl
Exception
- thrown if parameters defined are invalidpublic File getDB() throws Exception
DatabaseModule
getDB
in interface DatabaseModule
getDB
in class ClassifierModuleImpl
Exception
- thrown if any runtime error occurspublic List<String> getPreRequisiteModules() throws Exception
PearMergeReads
.getPreRequisiteModules
in interface BioModule
getPreRequisiteModules
in class BioModuleImpl
Exception
- if invalid Class names are returned as prerequisitespublic List<String> getWorkerScriptFunctions() throws Exception
getWorkerScriptFunctions
in interface ScriptModule
getWorkerScriptFunctions
in class ScriptModuleImpl
Exception
- if errors occur