public abstract class ScriptModuleImpl extends BioModuleImpl implements ScriptModule
GZIP_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 |
|---|
ScriptModuleImpl() |
| Modifier and Type | Method and Description |
|---|---|
abstract List<List<String>> |
buildScript(List<File> files)
Return an inner list of lines to execute for each sample.
|
List<List<String>> |
buildScriptForPairedReads(List<File> files)
The default behavior is the same for paired or unpaired data.
|
void |
checkDependencies()
Validate module dependencies:
Require
Config. exists
Require Config. is positive integer
Require Config. is positive integer
Verify Config. is positive integer if set
Start the AWS DB sync to S3 if a novel DB has been configure and
"aws.copyDbToS3" is enabled
|
void |
executeTask()
Build the nested list of bash script lines that will be used by
BashScriptBuilder to build
the worker scripts. |
String[] |
getJobParams()
|
File |
getMainScript()
Get the main script file in the bioModule script directory, with prefix:
"MAIN_".
|
protected String |
getRuntimeParams(List<String> params,
String numThreadsParam)
Return all collectionProperty values separated by a space.
|
File |
getScriptDir()
Returns moduleDir/script which contains all scripts generated by the module.
|
List<String> |
getScriptErrors()
This method returns all of the lines from any failure files found in the script directory.
|
String |
getSummary()
Returns summary message to be displayed by Email module so must not contain confidential info.
|
Integer |
getTimeout()
Default behavior is for scripts to run indefinitely (no timeout).
|
List<String> |
getWorkerScriptFunctions()
Method returns bash script lines used to build the functions called by the worker scripts.
|
protected boolean |
hasScripts()
Check if module produced any scripts
|
Boolean |
isValidProp(String property) |
addGeneralProperty, addGeneralProperty, addGeneralProperty, addNewProperty, addNewProperty, cacheInputFiles, cleanUp, compareTo, equals, findModuleInputFiles, getAlias, getDescription, getDetails, getDockerImageOwner, getDockerImageTag, getFileCache, getID, getInputFiles, getLogDir, getMenuPlacement, getMetadata, getModuleDir, getOutputDir, getPostRequisiteModules, getPreRequisiteModules, getPropDefault, getPropDescMap, getPropType, getPropTypeMap, getResourceDir, getTempDir, getTitle, hashCode, init, isValidInputModule, listProps, setAlias, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitcleanUp, getAlias, getDockerImageName, getDockerImageOwner, getDockerImageTag, getID, getInputFiles, getLogDir, getMetadata, getModuleDir, getOutputDir, getPostRequisiteModules, getPreRequisiteModules, getPropDefault, getResourceDir, getTempDir, init, isValidInputModule, setAlias, versionpublic abstract List<List<String>> buildScript(List<File> files) throws Exception
buildScript in interface ScriptModulefiles - Files in the input directory that contain only forward readsException - if unable to generate script linespublic List<List<String>> buildScriptForPairedReads(List<File> files) throws Exception
buildScriptForPairedReads in interface ScriptModulefiles - Files in the input directory that contain only paired readsException - if unable to generate the script linespublic void checkDependencies()
throws Exception
Config. exists
Config. is positive integer
Config. is positive integer
Config. is positive integer if set
checkDependencies in interface BioModulecheckDependencies in class BioModuleImplException - thrown if missing or invalid dependencies are foundpublic void executeTask()
throws Exception
BashScriptBuilder to build
the worker scripts. PassBioModuleImpl.getInputFiles() to either buildScript(List) or
buildScriptForPairedReads(List) based on
Config."internal.pairedReads".executeTask in interface BioModuleexecuteTask in class BioModuleImplException - thrown if the module is unable to complete is taskpublic String[] getJobParams() throws Exception
ScriptModuleProcessor.Process using the parameters supplied by this method and executed in
the Runtime environment.getJobParams in interface ScriptModuleRuntime.exec(String) parametersExceptionpublic File getMainScript()
getMainScript in interface ScriptModulepublic File getScriptDir()
getScriptDir in interface ScriptModulepublic List<String> getScriptErrors() throws Exception
getScriptErrors in interface ScriptModuleException - if errors occur reading failure filespublic String getSummary() throws Exception
getSummary in interface BioModulegetSummary in class BioModuleImplException - if any error occurspublic Integer getTimeout() throws ConfigFormatException
getTimeout in interface ScriptModuleConfigFormatException - if the value is invalidpublic List<String> getWorkerScriptFunctions() throws Exception
ScriptModulegetWorkerScriptFunctions in interface ScriptModuleException - if errors occurprotected String getRuntimeParams(List<String> params, String numThreadsParam) throws ConfigException
params - Runtime parameternumThreadsParam - Number of threads parameter nameConfigException - if Configuration errors occurprotected boolean hasScripts()
public Boolean isValidProp(String property) throws Exception
isValidProp in class BioModuleImplException