Execution context
weave is capable of automatically distributing its pipeline jobs across a slurm cluster. The context for it's initial execution can be varied as well.
The context is also centrally related to the configuration and setup of a particular cluster. Right now weave is configured to work with NIH clusters skyline, biowulf, and bigsky.
Typical contexts of execution include:
srun (real time execution) (non-interactive)¶
The weave pipeline can be triggered from a head node in a non-interactive fashion:
Bigsky/Skyline¶
Note
Dependency files for skyline and bigsky differ
Bigsky: /gs1/RTS/OpenOmics/bin/dependencies.sh
Skyline: /data/openomics/bin/dependencies.sh
Note
srun by default exports all environmental variables from the executing environment and --export=ALL
can be left off
Biowulf¶
srun (real time execution) (interactive)¶
Bigsky/Skyline¶
Note
Dependency files for skyline and bigsky differ
Bigsky: /gs1/RTS/OpenOmics/bin/dependencies.sh
Skyline: /data/openomics/bin/dependencies.sh
> # <head node>
srun --pty bash
> # <compute node>
source ${dependencies}
weave run [keyword args] ${run_id}
Biowulf¶
> # <head node>
sinteractive
> # <compute node>
module purge
module load snakemake singularity
weave run [keyword args] ${run_id}
Biowulf uses environmental modules to control software. After executing the above you should see a message similar to:
[+] Loading snakemake 7.XX.X on cnXXXX
[+] Loading singularity 4.X.X on cnXXXX
sbatch (later time execution)¶
Bigsky/Skyline¶
sbatch tempalte¶
#!/bin/bash
#SBATCH --job-name=<job_name>
#SBATCH --export=ALL
#SBATCH --time=01-00:00:00
#SBATCH --cpus-per-task=1
#SBATCH --ntasks=1
#SBATCH --mem=8g
#SBATCH --output=<stdout_file>_%j.out
source ${dependencies}
weave run \
-s /sequencing/root/dir \
-o output_dir \
<run_id>
This above script can serve as a template to create an sbatch script for weave. Update the psuedo-variables in the script to suit your particular needs then execute using sbatch command:
Biowulf¶
sbatch tempalte¶
#!/bin/bash
#SBATCH --job-name=<job_name>
#SBATCH --export=ALL
#SBATCH --time=01-00:00:00
#SBATCH --cpus-per-task=1
#SBATCH --ntasks=1
#SBATCH --mem=8g
#SBATCH --output=<stdout_file>_%j.out
module purge
module load snakemake singularity
weave run \
-s /sequencing/root/dir \
-o output_dir \
<run_id>
Same sbatch execution as bigsky/skyline.