public interface ScriptModule extends BioModule
Modifier and Type | Field and Description |
---|---|
static String |
SCRIPT_BATCH_SIZE
Config Integer property: "script.batchSize"Set number of samples to process per script (if parallel processing) |
static String |
SCRIPT_DEFAULT_HEADER
Config List property: "script.defaultHeader"Store default script header for MAIN script and locally run WORKER scripts. |
static String |
SCRIPT_NUM_THREADS
Config Integer property: "script.numThreads"Used to reserve cluster resources and passed to any external application call that accepts a numThreads parameter. |
static String |
SCRIPT_PERMISSIONS
Config String property: "script.permissions"Used as chmod permission parameter (ex: 774) |
static String |
SCRIPT_TIMEOUT
Config Integer property: "script.timeout"Sets # of minutes before worker scripts times out. |
MAIN_SCRIPT_PREFIX, OUTPUT_DIR, TEMP_DIR
Modifier and Type | Method and Description |
---|---|
List<List<String>> |
buildScript(List<File> files)
Method returns a nested list of bash script lines to classify samples containing forward reads only.
|
List<List<String>> |
buildScriptForPairedReads(List<File> files)
Method returns a nested list of bash script lines to classify samples containing paired reads.
The inner list contains the bash script lines required to classify 1 sample. |
String[] |
getJobParams()
|
File |
getMainScript()
Method returns MAIN module script that calls each of the worker scripts.
|
File |
getScriptDir()
ScriptModules that generate scripts to complete their task, create script files in this directory.
The main script must begin with prefix and there must only be one main script. The main script executes, or submits to the job queue, each of the other scripts in this directory. The # subscripts generated by the ScriptModule depends upon "script.batchSize". |
List<String> |
getScriptErrors()
Return a list of the error messages saved the failure scripts in the module script directory.
|
Integer |
getTimeout()
ScriptModule that run scripts can opt to set a timeout (such as used by the R script).
|
List<String> |
getWorkerScriptFunctions()
Method returns bash script lines used to build the functions called by the worker scripts.
|
checkDependencies, cleanUp, executeTask, getID, getInputFiles, getModuleDir, getOutputDir, getPostRequisiteModules, getPreRequisiteModules, getSummary, getTempDir, init, isValidInputModule
static final String SCRIPT_BATCH_SIZE
Config
Integer property: "script.batchSize"static final String SCRIPT_DEFAULT_HEADER
Config
List property: "script.defaultHeader"static final String SCRIPT_NUM_THREADS
Config
Integer property: "script.numThreads"static final String SCRIPT_PERMISSIONS
Config
String property: "script.permissions"static final String SCRIPT_TIMEOUT
Config
Integer property: "script.timeout"List<List<String>> buildScript(List<File> files) throws Exception
files
- Files in the input directory that contain only forward readsException
- if unable to generate script linesList<List<String>> buildScriptForPairedReads(List<File> files) throws Exception
files
- Files in the input directory that contain only paired readsException
- if unable to generate the script linesString[] getJobParams() throws Exception
Processor
.Process
using the parameters supplied by this method and executed in
the Runtime
environment.Runtime.exec(String)
parametersException
- if unable to build the job parametersFile getMainScript() throws Exception
Exception
- if errors occurFile getScriptDir()
List<String> getScriptErrors() throws Exception
Exception
- if runtime errors occurInteger getTimeout() throws ConfigFormatException
ConfigFormatException
- if the "script.timeout" value is invalid