public abstract class ClassifierModuleImpl extends SeqModuleImpl implements ClassifierModule, DatabaseModule
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 |
---|
ClassifierModuleImpl() |
Modifier and Type | Method and Description |
---|---|
void |
checkDependencies()
Validate module dependencies:
Call
getClassifierExe() to verify the executable
Call getClassifierParams() to verify the runtime parameters are valid
Call validateModuleOrder() to validate module configuration order. |
abstract String |
getClassifierExe()
Get the executable required to classify your samples.
|
abstract List<String> |
getClassifierParams()
Get optional list of parameters to append whenever the classifier executable is called.
|
protected String |
getClassifierType()
This method returns the classifier class name in lower case, after "classifier" is removed.
The remaining text should uniquely identify the name of the program. The basic deployment will return one of: (rdp, qiime, kraken, metaphlan2, or humann2). |
abstract 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> |
getPostRequisiteModules()
This method returns the corresponding Parser module associated with the classifier.
|
String |
getSummary()
Add database info if module is a DatabaseModule
|
protected void |
validateModuleOrder()
Validate that no
biolockj.module.seq modules run after this classifier unless a new classifier branch is
started. |
getInputFiles, getSeqFiles, isValidInputModule
buildScript, buildScriptForPairedReads, executeTask, getJobParams, getMainScript, getRuntimeParams, getScriptDir, getScriptErrors, getTimeout, getWorkerScriptFunctions, hasScripts
cacheInputFiles, cleanUp, compareTo, equals, findModuleInputFiles, getFileCache, getID, getModuleDir, getOutputDir, getPreRequisiteModules, getTempDir, init, toString, validateFileNameUnique
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getSeqFiles
buildScript, buildScriptForPairedReads, getJobParams, getMainScript, getScriptDir, getScriptErrors, getTimeout, getWorkerScriptFunctions
cleanUp, executeTask, getID, getInputFiles, getModuleDir, getOutputDir, getPreRequisiteModules, getTempDir, init, isValidInputModule
public void checkDependencies() throws Exception
getClassifierExe()
to verify the executable
getClassifierParams()
to verify the runtime parameters are valid
validateModuleOrder()
to validate module configuration order.
BioModule.checkDependencies()
to validate script dependencies.
checkDependencies
in interface BioModule
checkDependencies
in class ScriptModuleImpl
Exception
- thrown if missing or invalid dependencies are foundpublic abstract String getClassifierExe() throws Exception
ClassifierModule
getClassifierExe
in interface ClassifierModule
Exception
- if the classifier program undefined or invalidpublic abstract List<String> getClassifierParams() throws Exception
ClassifierModule
getClassifierParams
in interface ClassifierModule
Exception
- thrown if parameters defined are invalidpublic abstract File getDB() throws Exception
DatabaseModule
getDB
in interface DatabaseModule
Exception
- thrown if any runtime error occurspublic List<String> getPostRequisiteModules() throws Exception
For example RdpClassifier, will return the RdpParser.
getPostRequisiteModules
in interface BioModule
getPostRequisiteModules
in class BioModuleImpl
Exception
- if invalid Class names are returned as post-requisitespublic String getSummary() throws Exception
SeqModuleImpl
getSummary
in interface BioModule
getSummary
in class SeqModuleImpl
Exception
- if any error occursprotected String getClassifierType()
protected void validateModuleOrder() throws Exception
biolockj.module.seq
modules run after this classifier unless a new classifier branch is
started.Exception
- if modules are out of order