public abstract class ClassifierModuleImpl extends SeqModuleImpl implements ClassifierModule, DatabaseModule
GZIP_EXT, LOG_EXT, PDF_EXT, RETURN, SH_EXT, TAB_DELIM, TSV_EXT, TXT_EXT
LOG_DIR, MAIN_SCRIPT_PREFIX, NO_VERSION, OUTPUT_DIR, RES_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.
|
protected File |
getDbCache()
DB directory path getter
|
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 |
setDbCache(File db)
Set DB cache directory path on 1st access
|
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, isValidProp
addGeneralProperty, addGeneralProperty, addGeneralProperty, addNewProperty, addNewProperty, cacheInputFiles, cleanUp, compareTo, equals, findModuleInputFiles, getAlias, getDescription, getDetails, getDockerImageOwner, getDockerImageTag, getFileCache, getID, getLogDir, getMenuPlacement, getMetadata, getModuleDir, getOutputDir, getPreRequisiteModules, getPropDefault, getPropDescMap, getPropType, getPropTypeMap, getResourceDir, getTempDir, getTitle, hashCode, init, listProps, setAlias, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getSeqFiles
buildScript, buildScriptForPairedReads, getJobParams, getMainScript, getScriptDir, getScriptErrors, getTimeout, getWorkerScriptFunctions
cleanUp, executeTask, getAlias, getDockerImageName, getDockerImageOwner, getDockerImageTag, getID, getInputFiles, getLogDir, getMetadata, getModuleDir, getOutputDir, getPreRequisiteModules, getPropDefault, getResourceDir, getTempDir, init, isValidInputModule, setAlias, version
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 ConfigException
ClassifierModule
getClassifierExe
in interface ClassifierModule
ConfigException
- if Configuration errors are thrownpublic abstract List<String> getClassifierParams() throws ConfigException, DockerVolCreationException
ClassifierModule
getClassifierParams
in interface ClassifierModule
ConfigException
- if Configuration errors are thrownDockerVolCreationException
public abstract File getDB() throws ConfigPathException, ConfigNotFoundException, DockerVolCreationException
DatabaseModule
getDB
in interface DatabaseModule
ConfigPathException
- if path is defined but does not existsConfigNotFoundException
- if DB property is undefined and the default DB is not included in the module
runtime envDockerVolCreationException
public 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 File getDbCache()
protected void setDbCache(File db)
db
- Database fileprotected 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