public class RemoveScarceOtuCounts extends OtuCountModule
BLJ_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 |
|---|
RemoveScarceOtuCounts() |
| Modifier and Type | Method and Description |
|---|---|
void |
checkDependencies()
Validate module dependencies:
Require
Config. exists
Require Config. is positive integer
Require Config. is positive integer
Verify Config. is positive integer if set
Start the AWS DB sync to S3 if a novel DB has been configure and
"aws.copyDbToS3" is enabled
|
void |
cleanUp()
Set the number of hits field.
|
protected static TreeMap<String,TreeSet<String>> |
findScarceOtus(TreeSet<String> uniqueOtus,
TreeMap<String,TreeSet<String>> scarceTaxa)
Find the scarce OTUs that contain the key values in scarceTaxa.
|
protected TreeMap<String,TreeSet<String>> |
findScarceTaxa(TreeMap<String,TreeMap<String,Long>> sampleOtuCounts,
TreeSet<String> otus)
Find scarce taxa found in less samples than the cutoff percentage:
Config."report.scarceCountCutoff". |
String |
getSummary()
Produce summary message with min, max, mean, and median number of reads.
|
protected TreeMap<String,TreeMap<String,Long>> |
getUpdatedOtuCounts(TreeMap<String,TreeMap<String,Long>> sampleOtuCounts,
TreeMap<String,TreeSet<String>> scarceOtus)
Remove scarce OTUs from the sampleOtuCounts and return it.
|
protected void |
logScarceOtus(Set<String> scarceOtus)
Save a list of scarce OTUs to the module temp directory.
|
protected void |
removeScarceOtuCounts(TreeMap<String,TreeMap<String,Long>> updatedOtuCounts)
Output OTU count files with the updatedOtuCounts
|
void |
runModule()
This method executes the modules primary Java routine.
|
getInputFiles, isOtuModule, isValidInputModulebuildScript, executeTask, getDockerImageName, getDockerImageOwner, getDockerImageTag, getWorkerScriptFunctions, markStatus, moduleComplete, moduleFailed, runBioLockJ_CMDbuildScriptForPairedReads, getJobParams, getMainScript, getRuntimeParams, getScriptDir, getScriptErrors, getTimeout, hasScripts, isValidPropaddGeneralProperty, addGeneralProperty, addGeneralProperty, addNewProperty, addNewProperty, cacheInputFiles, compareTo, equals, findModuleInputFiles, getAlias, getDescription, getDetails, getFileCache, getID, 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, waitbuildScriptForPairedReads, getJobParams, getMainScript, getScriptDir, getScriptErrors, getTimeoutgetAlias, getID, getLogDir, getMetadata, getModuleDir, getOutputDir, getPostRequisiteModules, getPreRequisiteModules, getPropDefault, getResourceDir, getTempDir, init, setAlias, versionpublic void checkDependencies()
throws Exception
ScriptModuleImplConfig. exists
Config. is positive integer
Config. is positive integer
Config. is positive integer if set
checkDependencies in interface BioModulecheckDependencies in class ScriptModuleImplException - thrown if missing or invalid dependencies are foundpublic void cleanUp()
throws Exception
cleanUp in interface BioModulecleanUp in class BioModuleImplException - thrown if any runtime error occurspublic String getSummary() throws Exception
getSummary in interface BioModulegetSummary in class ScriptModuleImplException - if any error occurspublic void runModule()
throws Exception
JavaModulerunModule in interface JavaModulerunModule in class JavaModuleImplException - thrown if any runtime error occursprotected TreeMap<String,TreeSet<String>> findScarceTaxa(TreeMap<String,TreeMap<String,Long>> sampleOtuCounts, TreeSet<String> otus) throws Exception
Config."report.scarceCountCutoff". Return a map of these scare taxa and a
set of samples that need to remove them.sampleOtuCounts - TreeMap(SampleId, TreeMap(OTU, count)) OTU counts for every sampleotus - TreeSet of unique OTUsException - if errors occurprotected TreeMap<String,TreeMap<String,Long>> getUpdatedOtuCounts(TreeMap<String,TreeMap<String,Long>> sampleOtuCounts, TreeMap<String,TreeSet<String>> scarceOtus)
sampleOtuCounts - TreeMap(SampleId, TreeMap(OTU, count)) OTU counts for every samplescarceOtus - TreeMap(OTU, TreeSet(SampleId)) Scarce OTUs and the samples that list themprotected void logScarceOtus(Set<String> scarceOtus) throws Exception
scarceOtus - OTUs found in too few samplesException - if errors occurprotected void removeScarceOtuCounts(TreeMap<String,TreeMap<String,Long>> updatedOtuCounts) throws Exception
updatedOtuCounts - TreeMap(SampleId, TreeMap(OTU, count)) OTU counts for every sampleException - if errors occurprotected static TreeMap<String,TreeSet<String>> findScarceOtus(TreeSet<String> uniqueOtus, TreeMap<String,TreeSet<String>> scarceTaxa)
uniqueOtus - TreeSet(OTU) contains all OTUs for all samplesscarceTaxa - TreeMap(taxa, TreeSet(SampleId)) contains scarce taxa and their associated samples