public class Multiplexer extends JavaModuleImpl implements SeqModule, ApiModule
| Modifier and Type | Field and Description |
|---|---|
protected static String |
DO_GZIP
Config boolean property: "multiplexer.gzip": |
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 |
|---|
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" |
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 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, getDockerImageName, getDockerImageOwner, getDockerImageTag, getWorkerScriptFunctions, isValidInputModule, markStatus, moduleComplete, moduleFailed, runBioLockJ_CMDbuildScriptForPairedReads, getJobParams, getMainScript, getRuntimeParams, getScriptDir, getScriptErrors, getTimeout, hasScripts, isValidPropaddGeneralProperty, addGeneralProperty, addGeneralProperty, addNewProperty, addNewProperty, cacheInputFiles, cleanUp, 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, getWorkerScriptFunctionscleanUp, executeTask, getAlias, getDockerImageName, getDockerImageOwner, getDockerImageTag, getID, getInputFiles, getLogDir, getMetadata, getModuleDir, getOutputDir, getPostRequisiteModules, getPreRequisiteModules, getPropDefault, getResourceDir, getTempDir, init, isValidInputModule, setAlias, versiongetDescription, getDetails, getMenuPlacement, getPropType, getTitle, isValidProp, listPropsprotected static final String DO_GZIP
Config boolean property: "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 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
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 fileprotected void validateModuleOrder()
throws Exception
public String getDescription()
ApiModulegetDetails.getDescription in interface ApiModulepublic String getCitationString()
ApiModulegetCitationString in interface ApiModule