public class TrimPrimers extends JavaModuleImpl implements SeqModule, ApiModule, ReadCounter
| 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 |
INPUT_TRIM_SEQ_FILE
Config property "trimPrimers.filePath" defines the file path to the file that defines the
primers as regular expressions. |
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_EXTLOG_DIR, MAIN_SCRIPT_PREFIX, NO_VERSION, OUTPUT_DIR, RES_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.
|
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.
|
protected Set<String> |
getPrimers()
Get the primers listed in the .
|
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. |
String |
getSummary()
Output the summary messages generated by the module.
|
void |
runModule()
Trims primers from fasta or fastq files.
|
buildScript, executeTask, getDockerImageName, getDockerImageOwner, getDockerImageTag, getWorkerScriptFunctions, isValidInputModule, markStatus, moduleComplete, moduleFailed, runBioLockJ_CMDbuildScriptForPairedReads, getJobParams, getMainScript, getRuntimeParams, getScriptDir, getScriptErrors, getTimeout, hasScripts, isValidPropaddGeneralProperty, addGeneralProperty, addGeneralProperty, addNewProperty, addNewProperty, cacheInputFiles, compareTo, equals, findModuleInputFiles, getAlias, getDescription, getDetails, getFileCache, getID, getInputFiles, getLogDir, getMenuPlacement, getMetadata, getModuleDir, getOutputDir, getPostRequisiteModules, getPreRequisiteModules, getPropDefault, getPropDescMap, getPropType, getPropTypeMap, getResourceDir, getTempDir, getTitle, hashCode, init, listProps, setAlias, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitbuildScript, buildScriptForPairedReads, getJobParams, getMainScript, getScriptDir, getScriptErrors, getTimeout, getWorkerScriptFunctionsexecuteTask, getAlias, getDockerImageName, getDockerImageOwner, getDockerImageTag, getID, getInputFiles, getLogDir, getMetadata, getModuleDir, getOutputDir, getPostRequisiteModules, getPreRequisiteModules, getPropDefault, getResourceDir, getTempDir, init, isValidInputModule, setAlias, versiongetDescription, getDetails, getMenuPlacement, getPropType, getTitle, isValidProp, listPropspublic static final String NUM_TRIMMED_READS
public static final String INPUT_TRIM_SEQ_FILE
Config property "trimPrimers.filePath" defines the file path to the file that defines the
primers as regular expressions.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 SequnceFormatException
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 filesSequnceFormatException - If Config."metadata.required" =
"Y" but sequence files found that do not have a corresponding record in the metadata
file or if invalid metadata prevents parsing SEQ files.public 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 filepublic String getDescription()
ApiModulegetDetails.getDescription in interface ApiModulepublic String getCitationString()
ApiModulegetCitationString in interface ApiModule