Skip to content

Commit

Permalink
add docker, still experimental
Browse files Browse the repository at this point in the history
  • Loading branch information
colinbrislawn committed Nov 6, 2023
1 parent c279166 commit f82b43e
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,20 @@ snakemake --jobs 24 --slurm \
--rerun-incomplete --retries 3 \
--use-envmodules --latency-wait 10 \
--default-resources slurm_account=kawahara slurm_partition=hpg-milan
```

</details>

<details>
<summary>Run with Docker:</summary>

Say, in 'the cloud' using [FlowDeploy](https://flowdeploy.com/).

```bash
snakemake --jobs 12 \
--rerun-incomplete --retries 3 \
--use-singularity \
--default-resources
```

</details>
Expand Down
6 changes: 5 additions & 1 deletion config/config.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
# Qiime2 version number
# Qiime2 target version number
q2v: "2023.9"

# Software setup:
# Qiime2 conda environment
# Get full file from from https://github.com/qiime2/environment-files
q2env: "envs/qiime2-amplicon-2023.9-py38-linux-conda.yml"
# Or specify name of already installed Qiime2 environment
# q2env: "qiime2-amplicon-2023.9"
# Or load a pre-installed module
q2mod: "qiime2/2023.9"
# Or pull a pre-built docker container
q2docker: "docker://quay.io/qiime2/amplicon:2023.9"

# UNITE Major version listed in file names
version: "ver9"
Expand Down
11 changes: 10 additions & 1 deletion workflow/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ from snakemake.io import glob_wildcards, expand

configfile: "config/config.yaml"


include: "common.smk" # python helper functions


# Prevents the 'download' rule from running on worker nodes
localrules:
all,
Expand All @@ -19,6 +21,7 @@ localrules:
# load and set conda envs and modules from the config
Q2CONDA = config["q2env"]
Q2MOD = config["q2mod"]
Q2DOCKER = config["q2docker"]

GOALS = expand(
"results/unite_{ver}_{id}_{type}{date}-Q2-{q2v}.qza",
Expand Down Expand Up @@ -86,6 +89,8 @@ rule import_seqs:
Q2CONDA
envmodules:
Q2MOD,
container:
Q2DOCKER
shell:
"""
qiime tools import \
Expand All @@ -107,6 +112,8 @@ rule import_tax:
Q2CONDA
envmodules:
Q2MOD,
container:
Q2DOCKER
shell:
"""
qiime tools import \
Expand All @@ -129,10 +136,12 @@ rule train:
Q2CONDA
envmodules:
Q2MOD,
container:
Q2DOCKER
benchmark:
"logs/train_{ver}_{id}_{type}{date}-Q2-{q2v}.tsv"
resources:
mem_mb=get_mem_mb, # see function above
mem_mb=get_mem_mb, # see common.smk
runtime="24h", # hopefully not
shell:
"""
Expand Down

0 comments on commit f82b43e

Please sign in to comment.