public class QiimeClosedRefClassifier extends QiimeClassifier implements ApiModule
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, CITE_QIIME, 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
LOG_DIR, MAIN_SCRIPT_PREFIX, NO_VERSION, OUTPUT_DIR, RES_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.numWorkers" |
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.
|
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.
|
String |
getCitationString()
At a minimum, this should return the name and/or url for the wrapped tool.
|
String |
getDescription()
Briefly describe what this module does.
|
String |
getDetails()
A extension of
getDescription . |
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, cleanUp, getClassifierExe, getClassifierParams, getDB, getDockerImageName, getDockerImageOwner, getDockerImageTag, getInputFileDir, getInputFiles, getParams, getPickOtuLines, getPreRequisiteModules, getSummary, getVsearchParams, isValidInputModule
getClassifierType, getDbCache, setDbCache, validateModuleOrder
getSeqFiles
buildScriptForPairedReads, getJobParams, getMainScript, getRuntimeParams, getScriptDir, getScriptErrors, getTimeout, hasScripts, isValidProp
addGeneralProperty, addGeneralProperty, addGeneralProperty, addNewProperty, addNewProperty, cacheInputFiles, compareTo, equals, findModuleInputFiles, getAlias, getDescription, getFileCache, getID, getLogDir, getMenuPlacement, getMetadata, getModuleDir, getOutputDir, getPropDefault, getPropDescMap, getPropType, getPropTypeMap, getResourceDir, getTempDir, getTitle, hashCode, init, listProps, setAlias, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getDescription, getMenuPlacement, getPropType, getTitle, isValidProp, listProps
cleanUp, getAlias, getDockerImageName, getDockerImageOwner, getDockerImageTag, getID, getInputFiles, getLogDir, getMetadata, getModuleDir, getOutputDir, getPreRequisiteModules, getPropDefault, getResourceDir, getSummary, getTempDir, init, isValidInputModule, setAlias, version
getSeqFiles
buildScriptForPairedReads, getJobParams, getMainScript, getScriptDir, getScriptErrors, getTimeout
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.numWorkers"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
ScriptModuleImpl.buildScriptForPairedReads(List)
based on
Config
."internal.pairedReads". Each worker script is already written
as a batch, so each batch = 1 worker script.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 List<String> getBatch(List<String> lines, int batchNum, int index) throws ConfigException
lines
- Batch script lines to copy fasta to batch_#/fastabatchNum
- Batch numberindex
- Start index used to break up mapping fileConfigException
- if error occurs batching samples for worker scriptsprotected File getBatchDir(int batchNum)
batchNum
- Batch numberprotected File getBatchFastaDir(int batchNum)
batchNum
- Batch numberpublic String getDescription()
ApiModule
getDetails
.getDescription
in interface ApiModule
public String getDetails()
ApiModule
getDescription
. Beyond the brief description, give details such as
the interaction between properties.getDetails
in interface ApiModule
getDetails
in class BioModuleImpl
public String getCitationString()
ApiModule
getCitationString
in interface ApiModule