public class NormalizeTaxaTables extends TaxaCountModule
Constants.REPORT_LOG_BASE property.
| Modifier and Type | Field and Description |
|---|---|
protected static String |
LOG_10
Log 10 display string as 1/2 supported values for: "report.logBase"
|
protected static String |
LOG_E
Log e display string as 1/2 supported values for: "report.logBase"
|
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 |
|---|
NormalizeTaxaTables() |
| Modifier and Type | Method and Description |
|---|---|
void |
checkDependencies()
Verify
Config."report.logBase" property is valid (if defined) with a
value = (e or 10). |
protected static List<String> |
filterZeroSampleIDs(List<String> sampleIDs,
Set<Integer> allZeroIndex)
Filter Sample IDs with all zero rows
|
protected static Set<Integer> |
findAllZeroIndex(List<List<Long>> data)
Return the table index for rows with all zer count values
|
protected String |
getLogBase()
Get the Log base (10 or e)
|
protected static List<String> |
getOtuNames(String header)
Parse Taxa names from the given header line.
|
String |
getSummary()
Returns summary message to be displayed by Email module so must not contain confidential info.
|
void |
runModule()
This method executes the modules primary Java routine.
|
protected void |
transform(File taxaTable)
Populate normalized OTU counts with the formula: (RC/n)*((SUM(x))/N)+1
|
protected static void |
writeDataToFile(File inputFile,
List<String> sampleNames,
List<String> taxaNames,
List<List<String>> taxaCounts)
Write transformed data to file
|
filterByProcessLevel, getInputFiles, getPreRequisiteModules, isTaxaModule, isValidInputModulebuildScript, executeTask, getSource, getWorkerScriptFunctions, markStatus, moduleComplete, moduleFailedbuildScriptForPairedReads, getJobParams, getMainScript, getRuntimeParams, getScriptDir, getScriptErrors, getTimeout, hasScriptscacheInputFiles, cleanUp, compareTo, equals, findModuleInputFiles, getFileCache, getID, getModuleDir, getOutputDir, getPostRequisiteModules, getTempDir, init, toString, validateFileNameUniqueclone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitbuildScriptForPairedReads, getJobParams, getMainScript, getScriptDir, getScriptErrors, getTimeoutcleanUp, getID, getModuleDir, getOutputDir, getPostRequisiteModules, getTempDir, initprotected static final String LOG_10
protected static final String LOG_E
public void checkDependencies()
throws Exception
Config."report.logBase" property is valid (if defined) with a
value = (e or 10).checkDependencies in interface BioModulecheckDependencies in class ScriptModuleImplConfigFormatException - if REPORT_LOG_BASE is not set to a valid option (e or 10)Exception - thrown if missing or invalid dependencies are foundpublic String getSummary() throws Exception
ScriptModuleImplgetSummary 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 String getLogBase()
protected void transform(File taxaTable) throws Exception
taxaTable - OTU raw count tableException - if unable to construct NormalizeTaxaTablesprotected static List<String> filterZeroSampleIDs(List<String> sampleIDs, Set<Integer> allZeroIndex)
sampleIDs - List of Sample IDsallZeroIndex - Table row index for all-zero rowsprotected static Set<Integer> findAllZeroIndex(List<List<Long>> data)
data - List of table rowsprotected static List<String> getOtuNames(String header)
header - Head line of tableprotected static void writeDataToFile(File inputFile, List<String> sampleNames, List<String> taxaNames, List<List<String>> taxaCounts) throws Exception
inputFile - Count tablesampleNames - SampletaxaNames - Taxa namestaxaCounts - Taxa countsException - if errors occur