GenMod#

Add to module run order:
#BioModule biolockj.module.diy.GenMod

Description#

Allows user to add their own scripts into the BioLockJ pipeline.

Properties#

Properties are the name=value pairs in the configuration file.

GenMod properties:#

Property Description
genMod.codeLine string
A line of code to create a one-line script. This is mutually exclusive with genMod.scriptPath. This is the preferred option for particularly simple scripts. This code will be executed using whatever system is specified by genMod.launcher.
default: null
genMod.launcher string
Define executable language command if it is not included in your $PATH
default: null
genMod.param string
parameters to pass to the user's script
default: null
genMod.resources list of file paths
path to one or more files to be copied to the module resource folder.
default: null
genMod.scriptPath file path
path to user script
default: null

General properties applicable to this module:#

Property Description
cluster.batchCommand string
Terminal command used to submit jobs on the cluster
default: null
cluster.jobHeader string
Header written at top of worker scripts
default: null
cluster.modules list
List of cluster modules to load at start of worker scripts
default: null
cluster.prologue string
To run at the start of every script after loading cluster modules (if any)
default: null
cluster.statusCommand string
Terminal command used to check the status of jobs on the cluster
default: null
docker.saveContainerOnExit boolean
If Y, docker run command will NOT include the --rm flag
default: null
docker.verifyImage boolean
In check dependencies, run a test to verify the docker image.
default: null
script.defaultHeader string
Store default script header for MAIN script and locally run WORKER scripts.
default: #!/bin/bash
script.numThreads integer
Used to reserve cluster resources and passed to any external application call that accepts a numThreads parameter.
default: 8
script.numWorkers integer
Set number of samples to process per script (if parallel processing)
default: 1
script.permissions string
Used as chmod permission parameter (ex: 774)
default: 770
script.timeout integer
Sets # of minutes before worker scripts times out.
default: null

Details#

version: 1.1.0

The specified script is executed using the modules script directory as the current working directory. A scriptPath is required. If specified, the launcher program (ie R, Python) will be used. If specified, any param will be listed as arguments to the script. If running in docker, dockerContainerName is required.

This is ideal for:

  • Custom analysis for a given pipeline, such as an R or python script
  • Any steps where an appropriate BioLockJ module does not exist

Any step in your analysis process that might otherwise have to be done manually can be stored as a custom script so that the entire process is as reproducible as possible.

It is STRONGLY encouraged that users write scripts using common module conventions:

  • use relative file paths (starting with . or ..)
  • put all generated output in the modules output directory (../output)
  • put any temporary files in the modules temp directory (../tmep).
  • the main pipeline directory would be ../.., and the output of a previous module such as PearMergedReads would be in ../../*_PearMergedReads/output

To use the GenMod module multiple times in a single pipeline, use the AS keyword to direct properties to the correct instance of the module.

For example:

#BioModule biolockj.module.diy.GenMod AS Part1                   
#<other modules>                   
#BioModule biolockj.module.diy.GenMod AS Part2                   

Part1.launcher=python                   
Part1.script=path/to/first/script.py                   

Part2.script=path/to/bash/script/doLast.sh                   

With this, script.py will be run using python. Then other modules will run. Then doLast.sh will be run using the default system (probably bash, unless it has a shebang line specifiying something else).

Adds modules#

pre-requisite modules
none found
post-requisite modules
none found

Docker#

If running in docker, this module will run in a docker container from this image:

biolockjdevteam/blj_basic:v1.3.18

This can be modified using the following properties:
GenMod.imageOwner
GenMod.imageName
GenMod.imageTag

Citation#

Module by Ivory Blakley.