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_EXTLOG_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, validateModuleOrdergetInputFiles, getSeqFiles, isValidInputModulebuildScriptForPairedReads, executeTask, getJobParams, getMainScript, getRuntimeParams, getScriptDir, getScriptErrors, getTimeout, hasScripts, isValidPropaddGeneralProperty, 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, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetDescription, getDetails, getMenuPlacement, getPropType, getTitle, isValidProp, listPropscleanUp, executeTask, getAlias, getID, getInputFiles, getLogDir, getMetadata, getModuleDir, getOutputDir, getPropDefault, getResourceDir, getSummary, getTempDir, init, isValidInputModule, setAliasgetSeqFilesbuildScriptForPairedReads, getJobParams, getMainScript, getScriptDir, getScriptErrors, getTimeoutprotected 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 ScriptModulebuildScript in class ScriptModuleImplfiles - Files in the input directory that contain only forward readsException - if unable to generate script linespublic void checkDependencies()
throws Exception
ClassifierModuleImplClassifierModuleImpl.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 BioModulecheckDependencies in class ClassifierModuleImplException - thrown if missing or invalid dependencies are foundpublic String getClassifierExe() throws ConfigException
getClassifierExe in interface ClassifierModulegetClassifierExe in class ClassifierModuleImplConfigException - if Configuration errors are thrownpublic List<String> getClassifierParams() throws ConfigException
getClassifierParams in interface ClassifierModulegetClassifierParams in class ClassifierModuleImplConfigException - if Configuration errors are thrownpublic File getDB() throws ConfigPathException, ConfigNotFoundException, DockerVolCreationException
DatabaseModulegetDB in interface DatabaseModulegetDB in class ClassifierModuleImplConfigPathException - if path is defined but does not existsConfigNotFoundException - if DB property is undefined and the default DB is not included in the module
runtime envDockerVolCreationExceptionpublic List<String> getPreRequisiteModules() throws Exception
PearMergeReads.getPreRequisiteModules in interface BioModulegetPreRequisiteModules in class BioModuleImplException - if invalid Class names are returned as prerequisitespublic List<String> getWorkerScriptFunctions() throws Exception
getWorkerScriptFunctions in interface ScriptModulegetWorkerScriptFunctions in class ScriptModuleImplException - if errors occurpublic String getDockerImageOwner()
BioModulegetDockerImageOwner in interface BioModulegetDockerImageOwner in class BioModuleImplpublic String getDockerImageName()
BioModulegetDockerImageName in interface BioModulepublic String getDockerImageTag()
BioModulegetDockerImageTag in interface BioModulegetDockerImageTag in class BioModuleImplString getConfThreshold() throws ConfigNotFoundException, ConfigFormatException
public String getDescription()
ApiModulegetDetails.getDescription in interface ApiModulepublic String getCitationString()
ApiModulegetCitationString in interface ApiModulepublic String version()
BioModulepublic List<String> getPostRequisiteModules() throws Exception
ClassifierModuleImplFor example RdpClassifier, will return the RdpParser.
getPostRequisiteModules in interface BioModulegetPostRequisiteModules in class ClassifierModuleImplException - if invalid Class names are returned as post-requisites