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_OPTIONS
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 |
---|
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_CMD
buildScriptForPairedReads, getJobParams, getMainScript, getRuntimeParams, getScriptDir, getScriptErrors, getTimeout, hasScripts, isValidProp
addGeneralProperty, 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, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
buildScript, buildScriptForPairedReads, getJobParams, getMainScript, getScriptDir, getScriptErrors, getTimeout, getWorkerScriptFunctions
cleanUp, executeTask, getAlias, getDockerImageName, getDockerImageOwner, getDockerImageTag, getID, getInputFiles, getLogDir, getMetadata, getModuleDir, getOutputDir, getPostRequisiteModules, getPreRequisiteModules, getPropDefault, getResourceDir, getTempDir, init, isValidInputModule, setAlias, version
getDescription, getDetails, getMenuPlacement, getPropType, getTitle, isValidProp, listProps
protected static final String DO_GZIP
Config
boolean property: "multiplexer.gzip":public void checkDependencies() throws Exception
Email
)
Config
."internal.multiplexed" = "Y"checkDependencies
in interface BioModule
checkDependencies
in class ScriptModuleImpl
Exception
- thrown if missing or invalid dependencies are foundpublic List<File> getSeqFiles(Collection<File> files) throws SequnceFormatException
SeqModule
Config
."metadata.required" = "Y", an
error is thrown to list the files that cannot be matched to a metadata row.getSeqFiles
in interface SeqModule
files
- 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 BioModule
getSummary
in class ScriptModuleImpl
Exception
- if any error occurspublic void runModule() throws Exception
multiplex(File)
on each input filerunModule
in interface JavaModule
runModule
in class JavaModuleImpl
Exception
- 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()
ApiModule
getDetails
.getDescription
in interface ApiModule
public String getCitationString()
ApiModule
getCitationString
in interface ApiModule