public class RdpClassifier extends ClassifierModuleImpl implements ApiModule
Modifier and Type | Field and Description |
---|---|
protected static String |
FUNCTION_RDP
Name of the RdpClassifier bash script function used to assign taxonomy: "runRdp"
|
static String |
HIER_COUNTS |
static String |
HIER_SUFFIX |
protected static String |
JAVA_PARAMS
Config List property: "rdp.javaParams"
The parameters for the call to java when running rdp. |
protected static String |
RDP_DB
Config File property used to define an alternate RDP database file: "rdp.db" |
protected static String |
RDP_DOCKER_JAR
Config File property for RDP java executable jar WHEN RUNNING IN DOCKER: "rdp.containerJar"
This is the path in the default docker container. |
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: "rdp.params" |
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 |
---|
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 |
getCitationString()
At a minimum, this should return the name and/or url for the wrapped tool.
|
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"
If "rdp.hierCounts" is true, then skip any parameter for it here, it will added per file. |
(package private) String |
getConfThreshold() |
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.
|
String |
getDescription()
Briefly describe what this module does.
|
String |
getDockerImageName()
Get the docker image to use for this module.
|
String |
getDockerImageOwner()
Get the name of the docker hub user that owns the image to use for this module.
|
String |
getDockerImageTag()
Get the version / tag to use for the docker image.
|
List<String> |
getPostRequisiteModules()
This method returns the corresponding Parser module associated with the classifier.
|
List<String> |
getPreRequisiteModules()
If paired reads found, add prerequisite:
PearMergeReads . |
List<String> |
getWorkerScriptFunctions()
This method generates the required bash functions: "runRdp"
|
String |
version()
Changes to a module class should be accompanied by a increment in version.
|
getClassifierType, getDbCache, getSummary, setDbCache, validateModuleOrder
getInputFiles, getSeqFiles, isValidInputModule
buildScriptForPairedReads, executeTask, getJobParams, getMainScript, getRuntimeParams, getScriptDir, getScriptErrors, getTimeout, hasScripts, isValidProp
addGeneralProperty, addGeneralProperty, addGeneralProperty, addNewProperty, addNewProperty, cacheInputFiles, cleanUp, compareTo, equals, findModuleInputFiles, getAlias, getDescription, getDetails, getFileCache, getID, getLogDir, getMenuPlacement, getMetadata, getModuleDir, getOutputDir, getPropDefault, getPropDescMap, getPropType, getPropTypeMap, getResourceDir, getTempDir, getTitle, hashCode, init, listProps, setAlias, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getDescription, getDetails, getMenuPlacement, getPropType, getTitle, isValidProp, listProps
cleanUp, executeTask, getAlias, getID, getInputFiles, getLogDir, getMetadata, getModuleDir, getOutputDir, getPropDefault, getResourceDir, getSummary, getTempDir, init, isValidInputModule, setAlias
getSeqFiles
buildScriptForPairedReads, getJobParams, getMainScript, getScriptDir, getScriptErrors, getTimeout
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_DOCKER_JAR
Config
File property for RDP java executable jar WHEN RUNNING IN DOCKER: "rdp.containerJar"
This is the path in the default docker container.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: "rdp.params"public static final String HIER_COUNTS
public static final String HIER_SUFFIX
protected static final String JAVA_PARAMS
Config
List property: "rdp.javaParams"
The parameters for the call to java when running rdp.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 ConfigException
getClassifierExe
in interface ClassifierModule
getClassifierExe
in class ClassifierModuleImpl
ConfigException
- if Configuration errors are thrownpublic List<String> getClassifierParams() throws ConfigException
getClassifierParams
in interface ClassifierModule
getClassifierParams
in class ClassifierModuleImpl
ConfigException
- if Configuration errors are thrownpublic File getDB() throws ConfigPathException, ConfigNotFoundException, DockerVolCreationException
DatabaseModule
getDB
in interface DatabaseModule
getDB
in class ClassifierModuleImpl
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> 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 occurpublic String getDockerImageOwner()
BioModule
getDockerImageOwner
in interface BioModule
getDockerImageOwner
in class BioModuleImpl
public String getDockerImageName()
BioModule
getDockerImageName
in interface BioModule
public String getDockerImageTag()
BioModule
getDockerImageTag
in interface BioModule
getDockerImageTag
in class BioModuleImpl
String getConfThreshold() throws ConfigNotFoundException, ConfigFormatException
public String getDescription()
ApiModule
getDetails
.getDescription
in interface ApiModule
public String getCitationString()
ApiModule
getCitationString
in interface ApiModule
public String version()
BioModule
public List<String> getPostRequisiteModules() throws Exception
ClassifierModuleImpl
For example RdpClassifier, will return the RdpParser.
getPostRequisiteModules
in interface BioModule
getPostRequisiteModules
in class ClassifierModuleImpl
Exception
- if invalid Class names are returned as post-requisites