public class JsonReport extends JavaModuleImpl
BLJ_OPTIONS
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 |
---|
JsonReport() |
Modifier and Type | Method and Description |
---|---|
protected LinkedHashMap<String,TreeSet<JsonNode>> |
buildJsonMap(JsonNode rootNode)
Build JsonMap from the
CompileOtuCounts output directory. |
List<String> |
getPreRequisiteModules()
Module prerequisite:
CompileOtuCounts |
String |
getSummary()
Returns summary message to be displayed by Email module so must not contain confidential info.
|
boolean |
isValidInputModule(BioModule module)
If module is a
SeqModule input must contain sequence data. |
protected static boolean |
pipelineInputContainsOtuSummary()
Check pipeline input to see if OTU summary file is the only pipeline input file.
|
void |
runModule()
Obtain parsed sample data, build root node, and create the jsonMap by passing both to buildMap().
|
protected LinkedHashMap<String,TreeSet<JsonNode>> |
updateNodeStats(LinkedHashMap<String,TreeSet<JsonNode>> jsonMap,
File stats,
String level,
String label)
Add stats from
R_CalculateStats into all of the JsonNode s. |
protected String |
writeNodeAndChildren(JsonNode node,
boolean hasPeer,
LinkedHashMap<String,TreeSet<JsonNode>> jsonMap,
int nodeLevel)
Build lines of text output for the Json Report file.
|
buildScript, executeTask, getSource, getWorkerScriptFunctions, markStatus, moduleComplete, moduleFailed
buildScriptForPairedReads, checkDependencies, getJobParams, getMainScript, getRuntimeParams, getScriptDir, getScriptErrors, getTimeout, hasScripts
cacheInputFiles, cleanUp, compareTo, equals, findModuleInputFiles, getFileCache, getID, getInputFiles, getModuleDir, getOutputDir, getPostRequisiteModules, getTempDir, init, toString, validateFileNameUnique
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
buildScriptForPairedReads, getJobParams, getMainScript, getScriptDir, getScriptErrors, getTimeout
checkDependencies, cleanUp, getID, getInputFiles, getModuleDir, getOutputDir, getPostRequisiteModules, getTempDir, init
public List<String> getPreRequisiteModules() throws Exception
CompileOtuCounts
getPreRequisiteModules
in interface BioModule
getPreRequisiteModules
in class BioModuleImpl
Exception
- if invalid Class names are returned as prerequisitespublic String getSummary() throws Exception
ScriptModuleImpl
getSummary
in interface BioModule
getSummary
in class ScriptModuleImpl
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 runModule() throws Exception
runModule
in interface JavaModule
runModule
in class JavaModuleImpl
Exception
- thrown if any runtime error occursprotected LinkedHashMap<String,TreeSet<JsonNode>> buildJsonMap(JsonNode rootNode) throws Exception
CompileOtuCounts
output directory.rootNode
- Root JsonNode is top of the hierarchyException
- if errors occurprotected LinkedHashMap<String,TreeSet<JsonNode>> updateNodeStats(LinkedHashMap<String,TreeSet<JsonNode>> jsonMap, File stats, String level, String label) throws Exception
R_CalculateStats
into all of the JsonNode
s.jsonMap
- LinkedHashMap(level,Set(JsonNode))stats
- Stats filelevel
- Config
."report.taxonomyLevels"label
- Label to use in node statisticsException
- if errors occurprotected String writeNodeAndChildren(JsonNode node, boolean hasPeer, LinkedHashMap<String,TreeSet<JsonNode>> jsonMap, int nodeLevel) throws Exception
node
- JsonNode is the parent nodehasPeer
- boolean is true if node has peer nodesjsonMap
- LinkedHashMap(level,Set(JsonNode)) all nodes by levelnodeLevel
- Config
."report.taxonomyLevels"Exception
- if errors occur