public class KrakenParser extends ParserModuleImpl implements ApiModule
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 |
---|
KrakenParser() |
Modifier and Type | Method and Description |
---|---|
void |
addOtuNode(OtuNode node)
Each sample with taxonomic assignments from a
ClassifierModule is parsed by
ParserModule.parseSamples() to produce a ParsedSample . |
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.
|
protected void |
parseSample(File file)
Construct a new KrakenNode
|
void |
parseSamples()
Parse all
KrakenClassifier reports in the input directory.Cache the leaf counts Build an KrakenNode for each line.If ParserModuleImpl.isValid(OtuNode) ,Create ParsedSample for the OtuNodeImpl.getSampleId() if not
yet created. |
addParsedSample, buildOtuCountFiles, checkDependencies, getDepricatedOtuCountFields, getHitsPerSample, getOtuCountField, getParsedSample, getParsedSamples, getSampleIds, getSummary, getUniqueOtus, isValid, runModule, setNumHitsFieldName, validateModuleOrder
buildScript, executeTask, getDockerImageName, getDockerImageOwner, getDockerImageTag, getWorkerScriptFunctions, isValidInputModule, markStatus, moduleComplete, moduleFailed, runBioLockJ_CMD
buildScriptForPairedReads, getJobParams, getMainScript, getRuntimeParams, getScriptDir, getScriptErrors, getTimeout, hasScripts, isValidProp
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, isValidProp, listProps
checkDependencies, cleanUp, executeTask, getAlias, getDockerImageName, getDockerImageOwner, getDockerImageTag, getID, getInputFiles, getLogDir, getMetadata, getModuleDir, getOutputDir, getPostRequisiteModules, getPreRequisiteModules, getPropDefault, getResourceDir, getSummary, getTempDir, init, isValidInputModule, setAlias, version
moduleComplete, moduleFailed
buildScript, buildScriptForPairedReads, getJobParams, getMainScript, getScriptDir, getScriptErrors, getTimeout, getWorkerScriptFunctions
public void addOtuNode(OtuNode node) throws Exception
ParserModule
ClassifierModule
is parsed by
ParserModule.parseSamples()
to produce a ParsedSample
. As each file is processed, this method
is called to add the OtuNode
to the ParsedSample
with the same sample
ID (if valid).addOtuNode
in interface ParserModule
addOtuNode
in class ParserModuleImpl
node
- OtuNodeException
- if unable to add the OTU nodepublic void parseSamples() throws Exception
KrakenClassifier
reports in the input directory.KrakenNode
for each line.ParserModuleImpl.isValid(OtuNode)
,ParsedSample
for the OtuNodeImpl.getSampleId()
if not
yet created.
OtuNodeImpl.getCount()
(1) to ParsedSample
OTU count.
Sample Kraken report line (head 7A_reported.tsv) :
FCC6MMAACXX:8:1101:1968:2100#GTATTCTC/1
d__Bacteria|p__Bacteroidetes|c__Bacteroidia|o__Bacteroidales|f__Bacteroidaceae|g__Bacteroides|s__Bacteroides_vulgatus
parseSamples
in interface ParserModule
parseSamples
in class ParserModuleImpl
Exception
- if error occurs while parsing classifier reportsprotected void parseSample(File file) throws Exception
file
- KrakenClassifier output fileException
- if any errors occurpublic String getDescription()
ApiModule
getDetails
.getDescription
in interface ApiModule
public String getCitationString()
ApiModule
getCitationString
in interface ApiModule