public abstract class R_Module extends ScriptModuleImpl
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 |
|---|
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, isValidPropaddGeneralProperty, 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, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetAlias, getID, getInputFiles, getLogDir, getMetadata, getModuleDir, getOutputDir, getPostRequisiteModules, getPreRequisiteModules, getPropDefault, getResourceDir, getTempDir, init, isValidInputModule, setAlias, versionpublic void executeTask()
throws Exception
executeTask in interface BioModuleexecuteTask in class ScriptModuleImplException - thrown if the module is unable to complete is taskpublic List<List<String>> buildScript(List<File> files) throws Exception
ScriptModuleImplbuildScript in interface ScriptModulebuildScript in class ScriptModuleImplfiles - Files in the input directory that contain only forward readsException - if unable to generate script linespublic void checkDependencies()
throws Exception
ScriptModuleImplConfig. exists
Config. is positive integer
Config. is positive integer
Config. is positive integer if set
checkDependencies in interface BioModulecheckDependencies in class ScriptModuleImplException - thrown if missing or invalid dependencies are foundpublic Integer getTimeout() throws ConfigFormatException
getTimeout in interface ScriptModulegetTimeout in class ScriptModuleImplConfigFormatExceptionprotected int calcTimeout(List<File> inputs)
inputs - protected File getFunctionLib() throws IOException, BioLockJException
IOExceptionBioLockJExceptionpublic static File getFunctionLib(BioModule module) throws IOException, BioLockJException
IOExceptionBioLockJExceptionprotected File getModuleRScript() throws IOException, BioLockJException
IOExceptionBioLockJExceptionprotected abstract String getModuleRScriptName()
public String getDockerImageOwner()
BioModulegetDockerImageOwner in interface BioModulegetDockerImageOwner in class BioModuleImplpublic String getDockerImageName()
BioModulepublic String getDockerImageTag()
BioModulegetDockerImageTag in interface BioModulegetDockerImageTag in class BioModuleImplprotected String getCustomScriptProp()
protected abstract String getModulePrefix()
public void cleanUp()
throws Exception
BioModuleImplcleanUp in interface BioModulecleanUp in class BioModuleImplException - thrown if any runtime error occurs