public class RemoveScarceOtuCounts extends OtuCountModule
BLJ_OPTIONSGZIP_EXT, LOG_EXT, PDF_EXT, RETURN, SH_EXT, TAB_DELIM, TSV_EXT, TXT_EXTSCRIPT_BATCH_SIZE, SCRIPT_DEFAULT_HEADER, SCRIPT_NUM_THREADS, SCRIPT_PERMISSIONS, SCRIPT_TIMEOUTMAIN_SCRIPT_PREFIX, OUTPUT_DIR, TEMP_DIR| Constructor and Description |
|---|
RemoveScarceOtuCounts() |
| Modifier and Type | Method and Description |
|---|---|
void |
checkDependencies()
|
void |
cleanUp()
Set the number of hits field.
|
protected static TreeMap<String,TreeSet<String>> |
findScarceOtus(TreeMap<String,TreeMap<String,Long>> sampleOtuCounts,
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, getSource, getWorkerScriptFunctions, markStatus, moduleComplete, moduleFailedbuildScriptForPairedReads, getJobParams, getMainScript, getRuntimeParams, getScriptDir, getScriptErrors, getTimeout, hasScriptscacheInputFiles, compareTo, equals, findModuleInputFiles, getFileCache, getID, getModuleDir, getOutputDir, getPostRequisiteModules, getPreRequisiteModules, getTempDir, init, toString, validateFileNameUniqueclone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitbuildScriptForPairedReads, getJobParams, getMainScript, getScriptDir, getScriptErrors, getTimeoutgetID, getModuleDir, getOutputDir, getPostRequisiteModules, getPreRequisiteModules, getTempDir, initpublic void checkDependencies()
throws Exception
ScriptModuleImplcheckDependencies 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(TreeMap<String,TreeMap<String,Long>> sampleOtuCounts, TreeSet<String> uniqueOtus, TreeMap<String,TreeSet<String>> scarceTaxa)
sampleOtuCounts - TreeMap(SampleId, TreeMap(OTU, count)) OTU counts for every sampleuniqueOtus - TreeSet(OTU) contains all OTUs for all samplesscarceTaxa - TreeMap(taxa, TreeSet(SampleId)) contains scarce taxa and their associated samples