public class QiimeClosedRefClassifier extends QiimeClassifier
Modifier and Type | Field and Description |
---|---|
protected static String |
BATCH_MAPPING
Name of each batch mapping file (each in its own batch directory)
|
protected static String |
FUNCTION_CREATE_BATCH_MAPPING
Name of the bash function that prepares a batch of seqs for processing: "createBatchMapping"
|
static String |
PICK_OTU_SCRIPT
Closed reference OTU picking script: "pick_closed_reference_otus.py"
|
ALPHA_DIV_NULL_VALUE, ALPHA_DIVERSITY_TABLE, COMBINED_FNA, EXE_VSEARCH, EXE_VSEARCH_PARAMS, OTU_SUMMARY_FILE, OTU_TABLE, QIIME_PARAMS, QIIME_PYNAST_ALIGN_DB, QIIME_REF_SEQ_DB, QIIME_REMOVE_CHIMERAS, QIIME_TAXA_DB, REP_SET, SCRIPT_ADD_ALPHA_DIVERSITY, SCRIPT_ADD_LABELS, SCRIPT_CALC_ALPHA_DIVERSITY, SCRIPT_FILTER_OTUS, SCRIPT_PRINT_CONFIG, SCRIPT_SUMMARIZE_BIOM, SCRIPT_SUMMARIZE_TAXA, SUMMARIZE_TAXA_SUPPRESS_BIOM
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 |
---|
QiimeClosedRefClassifier() |
Modifier and Type | Method and Description |
---|---|
List<List<String>> |
buildScript(List<File> files)
Create bash script lines to split up the QIIME mapping and fasta files into batches of size
Config ."script.batchSize" |
void |
checkDependencies()
Call
QiimeClassifier checkOtuPickingDependencies() method to verify OTU
picking script parameters. |
protected String |
copyBatchOtuTableToOutputDir(File batchDir,
Integer batchNum)
The method returns 1 bash script line that will copy the batch
"otu_table.biom" from the batchDir to the output directory.
|
protected boolean |
doAddNextBatch(int sampleCount)
Return true if the sample count indicates we have a full batch
|
void |
executeTask()
Build the nested list of bash script lines that will be used by
BashScriptBuilder to build
the worker scripts. |
protected List<String> |
getBatch(List<String> lines,
int batchNum,
int index)
Method returns batch script lines for one batch.
|
protected File |
getBatchDir(int batchNum)
Get the pipeline/module/temp/batch_# dir.
|
protected File |
getBatchFastaDir(int batchNum)
Get the pipeline/module/temp/batch_#/fasta directory.
|
List<String> |
getPostRequisiteModules()
If paired reads found, return prerequisite module:
PearMergeReads . |
List<String> |
getWorkerScriptFunctions()
Method returns bash script lines used to build the functions called by the worker scripts.
|
buildQiimeDockerConfigLines, buildScriptForPairedReads, cleanUp, getClassifierExe, getClassifierParams, getDB, getDockerDB, getInputFileDir, getInputFiles, getParams, getPickOtuLines, getPreRequisiteModules, getSummary, getVsearchParams, isValidInputModule, validateFileNameUnique
getClassifierType, validateModuleOrder
getSeqFiles
getJobParams, getMainScript, getRuntimeParams, getScriptDir, getScriptErrors, getTimeout, hasScripts
cacheInputFiles, compareTo, equals, findModuleInputFiles, getFileCache, getID, getModuleDir, getOutputDir, getTempDir, init, toString
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getSeqFiles
getJobParams, getMainScript, getScriptDir, getScriptErrors, getTimeout
getID, getModuleDir, getOutputDir, getTempDir, init
public static final String PICK_OTU_SCRIPT
protected static final String BATCH_MAPPING
protected static final String FUNCTION_CREATE_BATCH_MAPPING
public List<List<String>> buildScript(List<File> files) throws Exception
Config
."script.batchSize"buildScript
in interface ScriptModule
buildScript
in class QiimeClassifier
files
- Files in the input directory that contain only forward readsException
- if unable to generate script linespublic void checkDependencies() throws Exception
QiimeClassifier
checkOtuPickingDependencies() method to verify OTU
picking script parameters.checkDependencies
in interface BioModule
checkDependencies
in class QiimeClassifier
Exception
- thrown if missing or invalid dependencies are foundpublic void executeTask() throws Exception
BashScriptBuilder
to build
the worker scripts. PassQiimeClassifier.getInputFiles()
to either buildScript(List)
or
QiimeClassifier.buildScriptForPairedReads(List)
based on
Config
."internal.pairedReads".executeTask
in interface BioModule
executeTask
in class ScriptModuleImpl
Exception
- thrown if the module is unable to complete is taskpublic List<String> getPostRequisiteModules() throws Exception
PearMergeReads
.getPostRequisiteModules
in interface BioModule
getPostRequisiteModules
in class QiimeClassifier
Exception
- if invalid Class names are returned as post-requisitespublic List<String> getWorkerScriptFunctions() throws Exception
ScriptModule
getWorkerScriptFunctions
in interface ScriptModule
getWorkerScriptFunctions
in class QiimeClassifier
Exception
- if errors occurprotected String copyBatchOtuTableToOutputDir(File batchDir, Integer batchNum)
batchDir
- Batch directorybatchNum
- Batch number used to name biom file, or null if processing 1 batchprotected boolean doAddNextBatch(int sampleCount) throws Exception
sampleCount
- Current number of samples processed so farException
- if batch size is undefined or invalidprotected List<String> getBatch(List<String> lines, int batchNum, int index) throws Exception
lines
- Batch script lines to copy fasta to batch_#/fastabatchNum
- Batch numberindex
- Start index used to break up mapping fileException
- if unable to get batch script linesprotected File getBatchDir(int batchNum)
batchNum
- Batch numberprotected File getBatchFastaDir(int batchNum)
batchNum
- Batch number