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_OTUSBLJ_OPTIONSGZIP_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 |
|---|
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 ParsedSamples
ParserModuleImpl.buildOtuCountFiles() - builds OTU tree tables from ParsedSamples
|
addOtuNode, addParsedSample, buildOtuCountFiles, getDepricatedOtuCountFields, getHitsPerSample, getOtuCountField, getParsedSample, getParsedSamples, getSampleIds, getUniqueOtus, isValid, setNumHitsFieldName, validateModuleOrderbuildScript, executeTask, getDockerImageName, getDockerImageOwner, getDockerImageTag, getWorkerScriptFunctions, markStatus, moduleComplete, moduleFailed, runBioLockJ_CMDbuildScriptForPairedReads, getJobParams, getMainScript, getRuntimeParams, getScriptDir, getScriptErrors, getTimeout, hasScriptsaddGeneralProperty, 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, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetDescription, getDetails, getMenuPlacement, getPropType, getTitle, listPropscleanUp, executeTask, getAlias, getDockerImageName, getDockerImageOwner, getDockerImageTag, getID, getInputFiles, getLogDir, getMetadata, getModuleDir, getOutputDir, getPostRequisiteModules, getPreRequisiteModules, getPropDefault, getResourceDir, getTempDir, init, setAlias, versionmoduleComplete, moduleFailedbuildScript, buildScriptForPairedReads, getJobParams, getMainScript, getScriptDir, getScriptErrors, getTimeout, getWorkerScriptFunctionsprotected 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
ParserModuleImplParserModuleImpl.validateModuleOrder() to validate module configuration order.checkDependencies in interface BioModulecheckDependencies in class ParserModuleImplException - thrown if missing or invalid dependencies are foundpublic String getSummary() throws Exception
ParserModuleImplgetSummary in interface BioModulegetSummary in class ParserModuleImplException - if any error occurspublic boolean isValidInputModule(BioModule module)
JavaModuleImplSeqModule input must contain sequence data.isValidInputModule in interface BioModuleisValidInputModule in class JavaModuleImplmodule - 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 ParserModuleparseSamples in class ParserModuleImplException - if error occurs while parsing classifier reportspublic void runModule()
throws Exception
ParserModuleImplParserModuleImpl.parseSamples() - generates ParsedSamples
ParserModuleImpl.buildOtuCountFiles() - builds OTU tree tables from ParsedSamples
runModule in interface JavaModulerunModule in class ParserModuleImplException - thrown if any runtime error occurspublic String getDescription()
ApiModulegetDetails.getDescription in interface ApiModulepublic String getCitationString()
ApiModulegetCitationString in interface ApiModulepublic Boolean isValidProp(String property) throws Exception
ApiModuleBioModule.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 ApiModuleisValidProp in class ScriptModuleImplException