public class Humann2Parser extends ParserModuleImpl implements ApiModule
Modifier and Type | Field and Description |
---|---|
protected static String |
HN2_KEEP_UNINTEGRATED
Config Boolean property: "humann2.keepUnintegrated" |
protected static String |
HN2_KEEP_UNMAPPED
Config Boolean property: "humann2.keepUnmapped" |
NUM_OTUS
BLJ_OPTIONS
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 |
---|
Humann2Parser() |
Modifier and Type | Method and Description |
---|---|
void |
checkDependencies()
Execute
ParserModuleImpl.validateModuleOrder() to validate module configuration order. |
String |
getCitationString()
At a minimum, this should return the name and/or url for the wrapped tool.
|
String |
getDescription()
Briefly describe what this module does.
|
String |
getSummary()
Produce summary message with min, max, mean, and median number of reads.
|
boolean |
isValidInputModule(BioModule module)
If module is a
SeqModule input must contain sequence data. |
Boolean |
isValidProp(String property)
Tests to see if the value val is valid for property prop; primarily tests format.
|
void |
parseSamples()
To parse the taxonomy level reports output by
Humann2Classifier . |
void |
runModule()
Parsers execute a task with 3 core functions:
ParserModuleImpl.parseSamples() - generates ParsedSample s
ParserModuleImpl.buildOtuCountFiles() - builds OTU tree tables from ParsedSample s
|
addOtuNode, addParsedSample, buildOtuCountFiles, getDepricatedOtuCountFields, getHitsPerSample, getOtuCountField, getParsedSample, getParsedSamples, getSampleIds, getUniqueOtus, isValid, setNumHitsFieldName, validateModuleOrder
buildScript, executeTask, getDockerImageName, getDockerImageOwner, getDockerImageTag, getWorkerScriptFunctions, markStatus, moduleComplete, moduleFailed, runBioLockJ_CMD
buildScriptForPairedReads, getJobParams, getMainScript, getRuntimeParams, getScriptDir, getScriptErrors, getTimeout, hasScripts
addGeneralProperty, addGeneralProperty, addGeneralProperty, addNewProperty, addNewProperty, cacheInputFiles, cleanUp, compareTo, equals, findModuleInputFiles, getAlias, getDescription, getDetails, getFileCache, getID, getInputFiles, getLogDir, getMenuPlacement, getMetadata, getModuleDir, getOutputDir, getPostRequisiteModules, getPreRequisiteModules, 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, listProps
cleanUp, executeTask, getAlias, getDockerImageName, getDockerImageOwner, getDockerImageTag, getID, getInputFiles, getLogDir, getMetadata, getModuleDir, getOutputDir, getPostRequisiteModules, getPreRequisiteModules, getPropDefault, getResourceDir, getTempDir, init, setAlias, version
moduleComplete, moduleFailed
buildScript, buildScriptForPairedReads, getJobParams, getMainScript, getScriptDir, getScriptErrors, getTimeout, getWorkerScriptFunctions
protected static final String HN2_KEEP_UNINTEGRATED
Config
Boolean property: "humann2.keepUnintegrated"protected static final String HN2_KEEP_UNMAPPED
Config
Boolean property: "humann2.keepUnmapped"public void checkDependencies() throws Exception
ParserModuleImpl
ParserModuleImpl.validateModuleOrder()
to validate module configuration order.checkDependencies
in interface BioModule
checkDependencies
in class ParserModuleImpl
Exception
- thrown if missing or invalid dependencies are foundpublic String getSummary() throws Exception
ParserModuleImpl
getSummary
in interface BioModule
getSummary
in class ParserModuleImpl
Exception
- if any error occurspublic boolean isValidInputModule(BioModule module)
JavaModuleImpl
SeqModule
input must contain sequence data.isValidInputModule
in interface BioModule
isValidInputModule
in class JavaModuleImpl
module
- BioModule that ran before the current BioModulepublic void parseSamples() throws Exception
Humann2Classifier
. Skip
mapping of UNMAPPED and UNINTEGRATED columns
Sample HumanN2 report line (head output_pAbund.tsv):parseSamples
in interface ParserModule
parseSamples
in class ParserModuleImpl
Exception
- if error occurs while parsing classifier reportspublic void runModule() throws Exception
ParserModuleImpl
ParserModuleImpl.parseSamples()
- generates ParsedSample
s
ParserModuleImpl.buildOtuCountFiles()
- builds OTU tree tables from ParsedSample
s
runModule
in interface JavaModule
runModule
in class ParserModuleImpl
Exception
- thrown if any runtime error occurspublic String getDescription()
ApiModule
getDetails
.getDescription
in interface ApiModule
public String getCitationString()
ApiModule
getCitationString
in interface ApiModule
public Boolean isValidProp(String property) throws Exception
ApiModule
BioModule.checkDependencies()
. Using switch/case or a stack of if/else is recommended.
Within each case, call any/all method that is used by this module to access the value from the config file,
leveraging the checks in the Config.get* methods.
This method should never actually return false. If the value is not valid, it should throw an exception that
includes a helpful message about whats not valid. As part of a throwable, that message is passed along to
wherever the call started. Any time that "false" is actually the desired form, this method should be wrapped in
a try/catch.isValidProp
in interface ApiModule
isValidProp
in class ScriptModuleImpl
Exception