public abstract class JavaModuleImpl extends ScriptModuleImpl implements JavaModule
Modifier and Type | Field and Description |
---|---|
protected static String |
BLJ_OPTIONS
Docker environment variable holding the Docker program switches: "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 |
---|
JavaModuleImpl() |
Modifier and Type | Method and Description |
---|---|
List<List<String>> |
buildScript(List<File> files)
Java script only require 2 lines, one to run the blj_config to update our $PATH and gain access to environment
variables, and then the direct call to the BioLockJ.jar.
|
void |
executeTask()
JavaModules run pure Java code.
If in Direct mode, execute runModule() to run the module functionality; another BioLockJ instance
is the manager that has launched this instance to run this module.Otherwise, this instance is the manager, If Config ."pipeline.detachJavaModules"="Y" execute
BioModule.executeTask() to build the bash scripts to launch a secondary instance in direct mode to run this module.Otherwise (if "pipeline.detachJavaModules"="N"), execute runModule() to run the Java code to execute module functionality within the manager instance. |
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.
|
List<String> |
getWorkerScriptFunctions()
If in Docker mode, set "BLJ_OPTIONS" which will be reference in every worker script when running BioLockJ
in direct mode.
|
boolean |
isValidInputModule(BioModule module)
If module is a
SeqModule input must contain sequence data. |
protected void |
markStatus(String status)
This method sets the module status by saving the indicator file to the module root dir.
|
void |
moduleComplete()
This method will create the success flag file so the next module can run.
|
void |
moduleFailed()
This method will create the fail flag file so the pipeline can move on..
|
protected String |
runBioLockJ_CMD()
Get the java command to launch a module directly.
|
abstract void |
runModule()
This method executes the modules primary Java routine.
|
buildScriptForPairedReads, checkDependencies, getJobParams, getMainScript, getRuntimeParams, getScriptDir, getScriptErrors, getSummary, 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
buildScriptForPairedReads, getJobParams, getMainScript, getScriptDir, getScriptErrors, getTimeout
checkDependencies, cleanUp, getAlias, getID, getInputFiles, getLogDir, getMetadata, getModuleDir, getOutputDir, getPostRequisiteModules, getPreRequisiteModules, getPropDefault, getResourceDir, getSummary, getTempDir, init, setAlias, version
protected static final String BLJ_OPTIONS
public List<List<String>> buildScript(List<File> files) throws Exception
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 executeTask() throws Exception
runModule()
to run the module functionality; another BioLockJ instance
is the manager that has launched this instance to run this module.Config
."pipeline.detachJavaModules"="Y" execute
BioModule.executeTask()
to build the bash scripts to launch a secondary instance in direct mode to run this module.runModule()
to run the Java code to execute module functionality within the manager instance.executeTask
in interface BioModule
executeTask
in class ScriptModuleImpl
Exception
- thrown if the module is unable to complete is taskpublic List<String> getWorkerScriptFunctions() throws Exception
getWorkerScriptFunctions
in interface ScriptModule
getWorkerScriptFunctions
in class ScriptModuleImpl
Exception
- if errors occurpublic boolean isValidInputModule(BioModule module)
SeqModule
input must contain sequence data.isValidInputModule
in interface BioModule
isValidInputModule
in class BioModuleImpl
module
- BioModule that ran before the current BioModulepublic void moduleComplete() throws Exception
JavaModule
moduleComplete
in interface JavaModule
Exception
- thrown if any runtime error occurspublic void moduleFailed() throws Exception
JavaModule
moduleFailed
in interface JavaModule
Exception
- thrown if any runtime error occurspublic abstract void runModule() throws Exception
JavaModule
runModule
in interface JavaModule
Exception
- thrown if any runtime error occursprotected void markStatus(String status) throws Exception
status
- Success or FailuresException
- if unable to set the statusprotected final String runBioLockJ_CMD()
Exception
- if unable to determine sourcepublic String getDockerImageOwner()
BioModule
getDockerImageOwner
in interface BioModule
getDockerImageOwner
in class BioModuleImpl
public String getDockerImageName()
BioModule
getDockerImageName
in interface BioModule
public String getDockerImageTag()
BioModule
getDockerImageTag
in interface BioModule
getDockerImageTag
in class BioModuleImpl