public class Humann2Classifier extends ClassifierModuleImpl
Modifier and Type | Field and Description |
---|---|
protected static String |
EXE_HUMANN2
Config exe property for humnan2 executable: "exe.humann2" |
protected static String |
EXE_HUMANN2_JOIN_PARAMS
Config List property used to obtain the humann2_join_tables executable params |
protected static String |
EXE_HUMANN2_PARAMS
Config List property used to obtain the humann2 executable params |
protected static String |
EXE_HUMANN2_RENORM_PARAMS
Config List property used to obtain the humann2_renorm_table executable params |
protected static String |
HN2_NUCL_DB
Config Directory property must contain the nucleotide database: "humann2.nuclDB" |
protected static String |
HN2_PROT_DB
Config Directory property must contain the protein nucleotide database: "humann2.protDB" |
GZIP_EXT, LOG_EXT, PDF_EXT, RETURN, SH_EXT, TAB_DELIM, TSV_EXT, TXT_EXT
SCRIPT_BATCH_SIZE, SCRIPT_DEFAULT_HEADER, SCRIPT_NUM_THREADS, SCRIPT_PERMISSIONS, SCRIPT_TIMEOUT
MAIN_SCRIPT_PREFIX, OUTPUT_DIR, TEMP_DIR
Constructor and Description |
---|
Humann2Classifier() |
Modifier and Type | Method and Description |
---|---|
List<List<String>> |
buildScript(List<File> files)
Method returns a nested list of bash script lines to classify samples containing forward reads only.
|
List<List<String>> |
buildScriptForPairedReads(List<File> files)
The default behavior is the same for paired or unpaired data.
|
void |
checkDependencies()
Verify that none of the derived command line parameters are included in
Config ."exe.humann2""Params". |
void |
cleanUp()
By default, no cleanUp code is required.
|
String |
getClassifierExe()
Get kraken executable command: "exe.humann2"
|
List<String> |
getClassifierParams()
Obtain the humann2 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.
|
protected String |
getRuntimeParams()
Get formatted runtime parameters and
|
String |
getSummary()
Add database info if module is a DatabaseModule
|
List<String> |
getWorkerScriptFunctions()
Method returns bash script lines used to build the functions called by the worker scripts.
|
getClassifierType, getPostRequisiteModules, validateModuleOrder
getInputFiles, getSeqFiles, isValidInputModule
executeTask, getJobParams, getMainScript, getRuntimeParams, getScriptDir, getScriptErrors, getTimeout, hasScripts
cacheInputFiles, compareTo, equals, findModuleInputFiles, getFileCache, getID, getModuleDir, getOutputDir, getPreRequisiteModules, getTempDir, init, toString, validateFileNameUnique
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getSeqFiles
getJobParams, getMainScript, getScriptDir, getScriptErrors, getTimeout
executeTask, getID, getInputFiles, getModuleDir, getOutputDir, getPreRequisiteModules, getTempDir, init, isValidInputModule
protected static final String EXE_HUMANN2
Config
exe property for humnan2 executable: "exe.humann2"protected static final String EXE_HUMANN2_JOIN_PARAMS
Config
List property used to obtain the humann2_join_tables executable paramsprotected static final String EXE_HUMANN2_PARAMS
Config
List property used to obtain the humann2 executable paramsprotected static final String EXE_HUMANN2_RENORM_PARAMS
Config
List property used to obtain the humann2_renorm_table executable paramsprotected static final String HN2_NUCL_DB
Config
Directory property must contain the nucleotide database: "humann2.nuclDB"protected static final String HN2_PROT_DB
Config
Directory property must contain the protein nucleotide database: "humann2.protDB"public List<List<String>> buildScript(List<File> files) throws Exception
ScriptModule
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 List<List<String>> buildScriptForPairedReads(List<File> files) throws Exception
ScriptModuleImpl
buildScriptForPairedReads
in interface ScriptModule
buildScriptForPairedReads
in class ScriptModuleImpl
files
- Files in the input directory that contain only paired readsException
- if unable to generate the script linespublic void checkDependencies() throws Exception
Config
."exe.humann2""Params". Also verify:
Config
."humann2.nuclDB" is a valid directory
Config
."humann2.protDB" is a valid directory
checkDependencies
in interface BioModule
checkDependencies
in class ClassifierModuleImpl
Exception
- thrown if missing or invalid dependencies are foundpublic void cleanUp() throws Exception
BioModuleImpl
cleanUp
in interface BioModule
cleanUp
in class BioModuleImpl
Exception
- thrown if any runtime error occurspublic String getClassifierExe() throws Exception
getClassifierExe
in interface ClassifierModule
getClassifierExe
in class ClassifierModuleImpl
Exception
- if the classifier program undefined or invalidpublic List<String> getClassifierParams() throws Exception
getClassifierParams
in interface ClassifierModule
getClassifierParams
in class ClassifierModuleImpl
Exception
- thrown if parameters defined are invalidpublic File getDB() throws Exception
DatabaseModule
getDB
in interface DatabaseModule
getDB
in class ClassifierModuleImpl
Exception
- thrown if any runtime error occurspublic String getSummary() throws Exception
SeqModuleImpl
getSummary
in interface BioModule
getSummary
in class ClassifierModuleImpl
Exception
- if any error occurspublic List<String> getWorkerScriptFunctions() throws Exception
ScriptModule
getWorkerScriptFunctions
in interface ScriptModule
getWorkerScriptFunctions
in class ScriptModuleImpl
Exception
- if errors occur