public class TrimPrimers extends JavaModuleImpl implements SeqModule
| Modifier and Type | Field and Description |
|---|---|
protected static String |
INPUT_REQUIRE_PRIMER
Config property "trimPrimers.requirePrimer" is a boolean used to determine if sequences
without a primer should be kept or discarded |
static String |
NUM_TRIMMED_READS
Metadata column name for column that holds number of trimmed reads per sample: "Num_Trimmed_Reads"
|
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 |
|---|
TrimPrimers() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addBadFilesToSummary()
Update summaryMsgs with list of seq files that contained no reads with a valid primer.
|
void |
checkDependencies()
Validates the file that defines the REGEX primers.
|
void |
cleanUp()
Set "Num_Trimmed_Reads" as the number of reads field.
|
protected Set<String> |
getPrimers()
Get the primers listed in the "trimPrimers.filePath".
|
List<File> |
getSeqFiles(Collection<File> files)
Return only sequence files for sample IDs found in the metadata file.
If Config."metadata.required" = "Y", an
error is thrown to list the files that cannot be matched to a metadata row. |
static File |
getSeqPrimerFile()
Return the primer file.
|
String |
getSummary()
Output the summary messages generated by the module.
|
void |
runModule()
Trims primers from fasta or fastq files.
|
buildScript, executeTask, getSource, getWorkerScriptFunctions, isValidInputModule, markStatus, moduleComplete, moduleFailedbuildScriptForPairedReads, getJobParams, getMainScript, getRuntimeParams, getScriptDir, getScriptErrors, getTimeout, hasScriptscacheInputFiles, compareTo, equals, findModuleInputFiles, getFileCache, getID, getInputFiles, getModuleDir, getOutputDir, getPostRequisiteModules, getPreRequisiteModules, getTempDir, init, toString, validateFileNameUniqueclone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitbuildScript, buildScriptForPairedReads, getJobParams, getMainScript, getScriptDir, getScriptErrors, getTimeout, getWorkerScriptFunctionsexecuteTask, getID, getInputFiles, getModuleDir, getOutputDir, getPostRequisiteModules, getPreRequisiteModules, getTempDir, init, isValidInputModulepublic static final String NUM_TRIMMED_READS
protected static final String INPUT_REQUIRE_PRIMER
Config property "trimPrimers.requirePrimer" is a boolean used to determine if sequences
without a primer should be kept or discardedpublic void checkDependencies()
throws Exception
Demultiplexer must run as a prerequisite module
PearMergeReads is configured before this
module, "trimPrimers.filePath" must contain the reverse compliment of the reverse primer
with a REGEX line anchor "$" at the end.
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 List<File> getSeqFiles(Collection<File> files) throws Exception
SeqModuleConfig."metadata.required" = "Y", an
error is thrown to list the files that cannot be matched to a metadata row.getSeqFiles in interface SeqModulefiles - Module input filesException - if no input files are foundpublic String getSummary() throws Exception
getSummary in interface BioModulegetSummary in class ScriptModuleImplException - if any error occurspublic void runModule()
throws Exception
runModule in interface JavaModulerunModule in class JavaModuleImplException - thrown if any runtime error occursprotected void addBadFilesToSummary()
protected Set<String> getPrimers() throws Exception
Exception - if unable to read the file