public class Kraken2Classifier extends ClassifierModuleImpl
| Modifier and Type | Field and Description |
|---|---|
protected static String |
EXE_KRAKEN2
Config exe property for kraken2 executable: "exe.kraken2" |
protected static String |
FUNCTION_KRAKEN
Name of the kraken function used to assign taxonomy: "runKraken2"
|
protected static String |
KRAKEN_DATABASE
Config property must contain file path to Kraken kmer database directory:
"kraken2.db" |
protected static String |
KRAKEN_FILE
File suffix added by BioLockJ to kraken output files (before translation): "_kraken2_out.txt"
|
GZIP_EXT, LOG_EXT, PDF_EXT, RETURN, SH_EXT, TAB_DELIM, TSV_EXT, TXT_EXTSCRIPT_BATCH_SIZE, SCRIPT_DEFAULT_HEADER, SCRIPT_NUM_THREADS, SCRIPT_PERMISSIONS, SCRIPT_TIMEOUTMAIN_SCRIPT_PREFIX, OUTPUT_DIR, TEMP_DIR| Constructor and Description |
|---|
Kraken2Classifier() |
| Modifier and Type | Method and Description |
|---|---|
List<List<String>> |
buildScript(List<File> files)
Build bash script lines to classify unpaired WGS reads with Kraken2.
|
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.kraken2""Params". |
String |
getClassifierExe()
Get kraken executable command: "exe.kraken2"
|
List<String> |
getClassifierParams()
Obtain the kraken2 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.
|
List<String> |
getWorkerScriptFunctions()
This method generates the required bash function: "runKraken2"
|
getClassifierType, getPostRequisiteModules, getSummary, validateModuleOrdergetInputFiles, getSeqFiles, isValidInputModuleexecuteTask, getJobParams, getMainScript, getRuntimeParams, getScriptDir, getScriptErrors, getTimeout, hasScriptscacheInputFiles, cleanUp, compareTo, equals, findModuleInputFiles, getFileCache, getID, getModuleDir, getOutputDir, getPreRequisiteModules, getTempDir, init, toString, validateFileNameUniqueclone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetSeqFilesgetJobParams, getMainScript, getScriptDir, getScriptErrors, getTimeoutcleanUp, executeTask, getID, getInputFiles, getModuleDir, getOutputDir, getPreRequisiteModules, getTempDir, init, isValidInputModuleprotected static final String EXE_KRAKEN2
Config exe property for kraken2 executable: "exe.kraken2"protected static final String FUNCTION_KRAKEN
protected static final String KRAKEN_DATABASE
Config property must contain file path to Kraken kmer database directory:
"kraken2.db"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.kraken2""Params".checkDependencies in interface BioModulecheckDependencies in class ClassifierModuleImplException - thrown if missing or invalid dependencies are foundpublic String getClassifierExe() throws Exception
getClassifierExe in interface ClassifierModulegetClassifierExe in class ClassifierModuleImplException - if the classifier program undefined or invalidpublic List<String> getClassifierParams() throws Exception
getClassifierParams in interface ClassifierModulegetClassifierParams in class ClassifierModuleImplException - thrown if parameters defined are invalidpublic File getDB() throws Exception
DatabaseModulegetDB in interface DatabaseModulegetDB in class ClassifierModuleImplException - thrown if any runtime error occurspublic List<String> getWorkerScriptFunctions() throws Exception
getWorkerScriptFunctions in interface ScriptModulegetWorkerScriptFunctions in class ScriptModuleImplException - if errors occur