Skip to content

Commit 27c1e5e

Browse files
committed
feat: add execution context documentation
1 parent 74c84e8 commit 27c1e5e

File tree

1 file changed

+111
-0
lines changed

1 file changed

+111
-0
lines changed

docs/execution.md

+111
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
**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.
2+
3+
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**.
4+
5+
6+
Typical contexts of execution include:
7+
8+
# srun (real time execution) (non-interactive)
9+
10+
The **weave** pipeline can be triggered from a head node in a non-interactive fashion:
11+
12+
## Bigsky/Skyline
13+
14+
!!! Note
15+
Dependency files for skyline and bigsky differ
16+
Bigsky: `/gs1/RTS/OpenOmics/bin/dependencies.sh`
17+
Skyline: `/data/openomics/bin/dependencies.sh`
18+
19+
```bash
20+
source ${dependencies}
21+
srun --export=ALL "weave run [keyword args] ${run_id}"
22+
```
23+
24+
!!! Note
25+
srun (by default)[https://slurm.schedmd.com/srun.html#OPT_export] exports all environmental variables from the executing environment and `--export=ALL` can be left off
26+
27+
## Biowulf
28+
29+
```bash
30+
srun --export=ALL "module load snakemake singularity; weave run [keyword args] ${run_id}"
31+
```
32+
33+
# srun (real time execution) (interactive)
34+
35+
## Bigsky/Skyline
36+
37+
!!! Note
38+
Dependency files for skyline and bigsky differ
39+
Bigsky: `/gs1/RTS/OpenOmics/bin/dependencies.sh`
40+
Skyline: `/data/openomics/bin/dependencies.sh`
41+
42+
```bash
43+
> # <head node>
44+
srun --pty bash
45+
> # <compute node>
46+
source ${dependencies}
47+
weave run [keyword args] ${run_id}
48+
```
49+
50+
## Biowulf
51+
52+
```bash
53+
> # <head node>
54+
sinteractive
55+
> # <compute node>
56+
module purge
57+
module load snakemake singularity
58+
weave run [keyword args] ${run_id}
59+
```
60+
61+
Biowulf uses environmental modules to control software. After executing the above you should see a message similar to:
62+
63+
> [+] Loading snakemake 7.XX.X on cnXXXX<br />
64+
> [+] Loading singularity 4.X.X on cnXXXX<br />
65+
66+
# sbatch (later time execution)
67+
68+
## Bigsky/Skyline
69+
70+
### sbatch tempalte
71+
```bash title="<b>bigsky-skyline sbatch template</b>"
72+
#!/bin/bash
73+
#SBATCH --job-name=<job_name>
74+
#SBATCH --export=ALL
75+
#SBATCH --time=01-00:00:00
76+
#SBATCH --cpus-per-task=1
77+
#SBATCH --ntasks=1
78+
#SBATCH --mem=8g
79+
#SBATCH --output=<stdout_file>_%j.out
80+
source ${dependencies}
81+
weave run \
82+
-s /sequencing/root/dir \
83+
-o output_dir \
84+
<run_id>
85+
```
86+
87+
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:
88+
89+
```bash
90+
sbatch weave_script.sbatch
91+
```
92+
93+
## Biowulf
94+
95+
### sbatch tempalte
96+
```bash title="<b>biowulf sbatch template</b>"
97+
#!/bin/bash
98+
#SBATCH --job-name=<job_name>
99+
#SBATCH --export=ALL
100+
#SBATCH --time=01-00:00:00
101+
#SBATCH --cpus-per-task=1
102+
#SBATCH --ntasks=1
103+
#SBATCH --mem=8g
104+
#SBATCH --output=<stdout_file>_%j.out
105+
module purge
106+
module load snakemake singularity
107+
weave run \
108+
-s /sequencing/root/dir \
109+
-o output_dir \
110+
<run_id>
111+
```

0 commit comments

Comments
 (0)