public class Multiplexer extends JavaModuleImpl implements SeqModule
| Modifier and Type | Field and Description |
|---|---|
protected static String |
DO_GZIP
Config boolean property that if enabled will gzip the multiplexed output: "multiplexer.gzip": |
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 |
|---|
Multiplexer() |
| Modifier and Type | Method and Description |
|---|---|
void |
checkDependencies()
Validate module dependencies:
Validate this is the last module to run (excluding
Email)
If this module was completed on a previous run, update the property:
Config."internal.multiplexed" = "Y" |
protected String |
getHeader(File file,
List<String> seqLines)
Get the header for the sequence.
|
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()
Produce a summary message with counts on total number of reads and number reads multiplexed.
|
protected void |
multiplex(File sample)
Add file sequences to the multiplexed file.
|
void |
runModule()
Execute
multiplex(File) on each input file |
protected void |
validateModuleOrder()
This method ensures that the multiplexed data is not passed to other modules.
This must be the last module, or last module before the Email. |
buildScript, executeTask, getSource, getWorkerScriptFunctions, isValidInputModule, markStatus, moduleComplete, moduleFailedbuildScriptForPairedReads, getJobParams, getMainScript, getRuntimeParams, getScriptDir, getScriptErrors, getTimeout, hasScriptscacheInputFiles, cleanUp, 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, getWorkerScriptFunctionscleanUp, executeTask, getID, getInputFiles, getModuleDir, getOutputDir, getPostRequisiteModules, getPreRequisiteModules, getTempDir, init, isValidInputModuleprotected static final String DO_GZIP
Config boolean property that if enabled will gzip the multiplexed output: "multiplexer.gzip":public void checkDependencies()
throws Exception
Email)
Config."internal.multiplexed" = "Y"checkDependencies in interface BioModulecheckDependencies in class ScriptModuleImplException - thrown if missing or invalid dependencies are foundpublic 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
multiplex(File) on each input filerunModule in interface JavaModulerunModule in class JavaModuleImplException - thrown if any runtime error occursprotected String getHeader(File file, List<String> seqLines) throws Exception
file - Sequence file in fasta or fastq formatseqLines - Sequence lines for 1 readException - if errors occur while obtaining headerprotected void multiplex(File sample) throws Exception
sample - Sequence file in Fasta or Fastq formatException - if I/O errors occur creating multiplexed file