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_EXTLOG_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, isValidPropaddGeneralProperty, 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, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitbuildScriptForPairedReads, getJobParams, getMainScript, getScriptDir, getScriptErrors, getTimeoutcheckDependencies, cleanUp, getAlias, getID, getInputFiles, getLogDir, getMetadata, getModuleDir, getOutputDir, getPostRequisiteModules, getPreRequisiteModules, getPropDefault, getResourceDir, getSummary, getTempDir, init, setAlias, versionprotected static final String BLJ_OPTIONS
public List<List<String>> buildScript(List<File> files) throws Exception
buildScript in interface ScriptModulebuildScript in class ScriptModuleImplfiles - 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 BioModuleexecuteTask in class ScriptModuleImplException - thrown if the module is unable to complete is taskpublic List<String> getWorkerScriptFunctions() throws Exception
getWorkerScriptFunctions in interface ScriptModulegetWorkerScriptFunctions in class ScriptModuleImplException - if errors occurpublic boolean isValidInputModule(BioModule module)
SeqModule input must contain sequence data.isValidInputModule in interface BioModuleisValidInputModule in class BioModuleImplmodule - BioModule that ran before the current BioModulepublic void moduleComplete()
throws Exception
JavaModulemoduleComplete in interface JavaModuleException - thrown if any runtime error occurspublic void moduleFailed()
throws Exception
JavaModulemoduleFailed in interface JavaModuleException - thrown if any runtime error occurspublic abstract void runModule()
throws Exception
JavaModulerunModule in interface JavaModuleException - 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()
BioModulegetDockerImageOwner in interface BioModulegetDockerImageOwner in class BioModuleImplpublic String getDockerImageName()
BioModulegetDockerImageName in interface BioModulepublic String getDockerImageTag()
BioModulegetDockerImageTag in interface BioModulegetDockerImageTag in class BioModuleImpl