public class KrakenClassifier extends ClassifierModuleImpl implements ApiModule
| Modifier and Type | Field and Description |
|---|---|
protected static String |
EXE_KRAKEN
Config exe property for kraken executable: "exe.kraken" |
protected static String |
FUNCTION_KRAKEN
Name of the kraken function used to assign taxonomy: "runKraken"
|
protected static String |
FUNCTION_TRANSLATE
Name of the translate function used to convert mpa-format to standard format: "translate"
|
protected static String |
KRAKEN_DATABASE
Config property must contain file path to Kraken kmer database directory:
"kraken.db" |
protected static String |
KRAKEN_FILE
File suffix added by BioLockJ to kraken output files (before translation): "_kraken_out.txt"
|
protected static String |
KRAKEN_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 |
|---|
KrakenClassifier() |
| Modifier and Type | Method and Description |
|---|---|
List<List<String>> |
buildScript(List<File> files)
Build bash script lines to classify unpaired WGS reads with Kraken.
|
List<List<String>> |
buildScriptForPairedReads(List<File> files)
Build bash script lines to classify paired WGS reads with Kraken.
|
void |
checkDependencies()
Verify that none of the derived command line parameters are included in
Config."exe.kraken". |
String |
getCitationString()
At a minimum, this should return the name and/or url for the wrapped tool.
|
String |
getClassifierExe()
Get kraken executable command: "exe.kraken"
|
List<String> |
getClassifierParams()
Obtain the kraken runtime params
|
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 |
getDetails()
A extension of
getDescription. |
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> |
getWorkerScriptFunctions()
This method generates the required bash functions: "translate" and "runKraken"
|
getClassifierType, getDbCache, getPostRequisiteModules, getSummary, setDbCache, validateModuleOrdergetInputFiles, getSeqFiles, isValidInputModuleexecuteTask, getJobParams, getMainScript, getRuntimeParams, getScriptDir, getScriptErrors, getTimeout, hasScripts, isValidPropaddGeneralProperty, addGeneralProperty, addGeneralProperty, addNewProperty, addNewProperty, cacheInputFiles, cleanUp, compareTo, equals, findModuleInputFiles, getAlias, getDescription, getFileCache, getID, getLogDir, getMenuPlacement, getMetadata, getModuleDir, getOutputDir, getPreRequisiteModules, getPropDefault, getPropDescMap, getPropType, getPropTypeMap, getResourceDir, getTempDir, getTitle, hashCode, init, listProps, setAlias, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetDescription, getMenuPlacement, getPropType, getTitle, isValidProp, listPropscleanUp, executeTask, getAlias, getID, getInputFiles, getLogDir, getMetadata, getModuleDir, getOutputDir, getPostRequisiteModules, getPreRequisiteModules, getPropDefault, getResourceDir, getSummary, getTempDir, init, isValidInputModule, setAlias, versiongetSeqFilesgetJobParams, getMainScript, getScriptDir, getScriptErrors, getTimeoutprotected static final String EXE_KRAKEN
Config exe property for kraken executable: "exe.kraken"protected static final String FUNCTION_KRAKEN
protected static final String FUNCTION_TRANSLATE
protected static final String KRAKEN_DATABASE
Config property must contain file path to Kraken kmer database directory:
"kraken.db"protected static final String KRAKEN_PARAMS
protected static final String KRAKEN_FILE
public List<List<String>> buildScript(List<File> files) throws Exception
Example lines:
buildScript in interface ScriptModulebuildScript in class ScriptModuleImplfiles - Files in the input directory that contain only forward readsException - if unable to generate script linespublic List<List<String>> buildScriptForPairedReads(List<File> files) throws Exception
Example lines:
buildScriptForPairedReads in interface ScriptModulebuildScriptForPairedReads in class ScriptModuleImplfiles - Files in the input directory that contain only paired readsException - if unable to generate the script linespublic void checkDependencies()
throws Exception
Config."exe.kraken".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 ConfigNotFoundException, ConfigPathException, DockerVolCreationException
DatabaseModulegetDB in interface DatabaseModulegetDB in class ClassifierModuleImplConfigNotFoundException - if DB property is undefined and the default DB is not included in the module
runtime envConfigPathException - if path is defined but does not existsDockerVolCreationExceptionpublic 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 BioModuleImplpublic String getDescription()
ApiModulegetDetails.getDescription in interface ApiModulepublic String getDetails()
ApiModulegetDescription. Beyond the brief description, give details such as
the interaction between properties.getDetails in interface ApiModulegetDetails in class BioModuleImplpublic String getCitationString()
ApiModulegetCitationString in interface ApiModule