public abstract class R_Module extends ScriptModuleImpl
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 |
---|
R_Module() |
Modifier and Type | Method and Description |
---|---|
List<List<String>> |
buildScript(List<File> files)
Return an inner list of lines to execute for each sample.
|
protected int |
calcTimeout(List<File> inputs)
Use this to estimate the max time needed to process a given list of inputs.
|
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 |
cleanUp()
If metadata exists in module output directory, refresh MetaUtil.
|
void |
executeTask()
Builds an R script by calling sub-methods to builds the BaseScript and creates the MAIN script shell that sources
the BaseScript, calls runProgram(), reportStatus() and main() which can only be implemented in a subclass.
|
protected String |
getCustomScriptProp() |
String |
getDockerImageName()
Get the docker image to use for this module.
|
String |
getDockerImageOwner()
Get the name of the docker hub user that owns the image to use for this module.
|
String |
getDockerImageTag()
Get the version / tag to use for the docker image.
|
protected File |
getFunctionLib() |
static File |
getFunctionLib(BioModule module) |
protected abstract String |
getModulePrefix()
Returns that prefix to use for property names.
|
protected File |
getModuleRScript() |
protected abstract String |
getModuleRScriptName() |
Integer |
getTimeout()
The R Script should run quickly, timeout = 10 minutes appears to work well.
|
protected void |
grapRUsedProps() |
protected Map<String,String> |
requiredRPackages() |
buildScriptForPairedReads, getJobParams, getMainScript, getRuntimeParams, getScriptDir, getScriptErrors, getSummary, getWorkerScriptFunctions, hasScripts, isValidProp
addGeneralProperty, addGeneralProperty, addGeneralProperty, addNewProperty, addNewProperty, cacheInputFiles, 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, isValidInputModule, listProps, setAlias, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getAlias, getID, getInputFiles, getLogDir, getMetadata, getModuleDir, getOutputDir, getPostRequisiteModules, getPreRequisiteModules, getPropDefault, getResourceDir, getTempDir, init, isValidInputModule, setAlias, version
public void executeTask() throws Exception
executeTask
in interface BioModule
executeTask
in class ScriptModuleImpl
Exception
- thrown if the module is unable to complete is taskpublic List<List<String>> buildScript(List<File> files) throws Exception
ScriptModuleImpl
buildScript
in interface ScriptModule
buildScript
in class ScriptModuleImpl
files
- Files in the input directory that contain only forward readsException
- if unable to generate script linespublic void checkDependencies() throws Exception
ScriptModuleImpl
Config
. exists
Config
. is positive integer
Config
. is positive integer
Config
. is positive integer if set
checkDependencies
in interface BioModule
checkDependencies
in class ScriptModuleImpl
Exception
- thrown if missing or invalid dependencies are foundpublic Integer getTimeout() throws ConfigFormatException
getTimeout
in interface ScriptModule
getTimeout
in class ScriptModuleImpl
ConfigFormatException
protected int calcTimeout(List<File> inputs)
inputs
- protected File getFunctionLib() throws IOException, BioLockJException
IOException
BioLockJException
public static File getFunctionLib(BioModule module) throws IOException, BioLockJException
IOException
BioLockJException
protected File getModuleRScript() throws IOException, BioLockJException
IOException
BioLockJException
protected abstract String getModuleRScriptName()
public String getDockerImageOwner()
BioModule
getDockerImageOwner
in interface BioModule
getDockerImageOwner
in class BioModuleImpl
public String getDockerImageName()
BioModule
public String getDockerImageTag()
BioModule
getDockerImageTag
in interface BioModule
getDockerImageTag
in class BioModuleImpl
protected String getCustomScriptProp()
protected abstract String getModulePrefix()
public void cleanUp() throws Exception
BioModuleImpl
cleanUp
in interface BioModule
cleanUp
in class BioModuleImpl
Exception
- thrown if any runtime error occurs