public class GenMod extends ScriptModuleImpl implements ApiModule, InputDataModule
Modifier and Type | Field and Description |
---|---|
protected static String |
CODE_LINE |
protected static String |
LAUNCHER
Config property: "genMod.launcher" |
protected static String |
PARAM
Config property: "genMod.param" |
protected static String |
RESOURCES
Config property: "genMod.resources" |
protected static String |
SCRIPT
Config property: "genMod.scriptPath" |
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 |
---|
GenMod() |
Modifier and Type | Method and Description |
---|---|
List<List<String>> |
buildScript(List<File> files)
Return an inner list of lines to execute for each sample.
|
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
|
String |
getCitationString()
At a minimum, this should return the name and/or url for the wrapped tool.
|
String |
getDescription()
Briefly describe what this module does.
|
String |
getDetails()
A extension of
getDescription . |
String |
getDockerImageName()
To run the GenMod in docker, the user must supply a docker image name.
|
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.
|
Set<String> |
getInputDataTypes() |
protected String |
getLauncher() |
protected String |
getScriptParams() |
Boolean |
isValidProp(String property)
Tests to see if the value val is valid for property prop; primarily tests format.
|
protected void |
transferResources() |
protected String |
transferScript() |
String |
version()
Changes to a module class should be accompanied by a increment in version.
|
buildScriptForPairedReads, executeTask, getJobParams, getMainScript, getRuntimeParams, getScriptDir, getScriptErrors, getSummary, getTimeout, getWorkerScriptFunctions, hasScripts
addGeneralProperty, addGeneralProperty, addGeneralProperty, addNewProperty, addNewProperty, cacheInputFiles, cleanUp, compareTo, equals, findModuleInputFiles, getAlias, getDescription, 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
getDescription, getMenuPlacement, getPropType, getTitle, listProps
cleanUp, executeTask, getAlias, getID, getInputFiles, getLogDir, getMetadata, getModuleDir, getOutputDir, getPostRequisiteModules, getPreRequisiteModules, getPropDefault, getResourceDir, getSummary, getTempDir, init, isValidInputModule, setAlias
protected static final String LAUNCHER
Config
property: "genMod.launcher"protected static final String PARAM
Config
property: "genMod.param"protected static final String SCRIPT
Config
property: "genMod.scriptPath"protected static final String RESOURCES
Config
property: "genMod.resources"protected static final String CODE_LINE
public 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 Boolean isValidProp(String property) throws Exception
ApiModule
BioModule.checkDependencies()
. Using switch/case or a stack of if/else is recommended.
Within each case, call any/all method that is used by this module to access the value from the config file,
leveraging the checks in the Config.get* methods.
This method should never actually return false. If the value is not valid, it should throw an exception that
includes a helpful message about whats not valid. As part of a throwable, that message is passed along to
wherever the call started. Any time that "false" is actually the desired form, this method should be wrapped in
a try/catch.isValidProp
in interface ApiModule
isValidProp
in class ScriptModuleImpl
Exception
protected String getScriptParams()
protected String transferScript() throws ConfigPathException, IOException, Exception
ConfigPathException
IOException
Exception
protected void transferResources() throws ConfigPathException, IOException, Exception
ConfigPathException
IOException
Exception
public Set<String> getInputDataTypes()
getInputDataTypes
in interface InputDataModule
public String getDockerImageOwner()
BioModule
getDockerImageOwner
in interface BioModule
getDockerImageOwner
in class BioModuleImpl
public String getDockerImageName()
getDockerImageName
in interface BioModule
public String getDockerImageTag()
BioModule
getDockerImageTag
in interface BioModule
getDockerImageTag
in class BioModuleImpl
public String getDescription()
ApiModule
getDetails
.getDescription
in interface ApiModule
public String getDetails() throws API_Exception
ApiModule
getDescription
. Beyond the brief description, give details such as
the interaction between properties.getDetails
in interface ApiModule
getDetails
in class BioModuleImpl
API_Exception
public String getCitationString()
ApiModule
getCitationString
in interface ApiModule