Skip to content

Commit

Permalink
add docker user option
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjaynagi committed Oct 1, 2024
1 parent 11f63c6 commit 4f588c7
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
*.smk linguist-language=Python
Snakefile linguist-language=Python
# GitHub syntax highlighting
pixi.lock linguist-language=YAML

4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,6 @@ config/samples.tsv
workflow/scripts/misc
.test/workflow/scripts/
.ipynb_checkpoints
workflow/scripts/snpEff
workflow/scripts/snpEff# pixi environments
.pixi

1 change: 1 addition & 0 deletions .test/config/config_paired_end.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
metadata: config/samples.tsv
pipeline: cpu
parabricks-docker-user: 1006:1006 # only if using parabricks pipeline at LSTM, otherwise ignore

# Dataset name
dataset: 'Test-GithubActionsCI'
Expand Down
1 change: 1 addition & 0 deletions .test/config/config_single_end.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
metadata: config/samples.tsv
pipeline: cpu
parabricks-docker-user: 1006:1006 # only if using parabricks pipeline at LSTM, otherwise ignore

# Dataset name
dataset: 'Test-GithubActionsCI'
Expand Down
3 changes: 2 additions & 1 deletion config/exampleconfig.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# RNA-Seq-Pop
pipeline: parabricks #parabricks or cpu
metadata: config/samples.tsv # samplesheet metadata file
pipeline: cpu # parabricks or cpu
parabricks-docker-user: 1006:1006 # only if using parabricks pipeline at LSTM, otherwise ignore

dataset: 'Ag_Bouake' # Dataset name: Can be anything, will be used to name some main output files

Expand Down
8 changes: 5 additions & 3 deletions workflow/rules/star-haplotypecaller.smk
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,11 @@ rule fq2bam:
resources:
all_gpus = 1
params:
wkdir=wkdir
wkdir=wkdir,
docker_user = config['parabricks-docker-user']
shell:
"""
docker run --user 1006:1006 --rm --gpus all --volume {wkdir}:/workdir --workdir /workdir nvcr.io/nvidia/clara/clara-parabricks:4.3.0-1 \
docker run --user {params.docker_user} --rm --gpus all --volume {wkdir}:/workdir --workdir /workdir nvcr.io/nvidia/clara/clara-parabricks:4.3.0-1 \
pbrun rna_fq2bam \
--in-fq /workdir/{input.reads[0]} /workdir/{input.reads[1]} \
--genome-lib-dir /workdir/resources/reference/star_index\
Expand Down Expand Up @@ -75,10 +76,11 @@ rule haplotype_caller:
all_gpus = 1
params:
wkdir=wkdir,
docker_user = config['parabricks-docker-user'],
ploidy=config['VariantAnalysis']['ploidy']
shell:
"""
docker run --user 1006:1006 --rm --gpus all --volume {wkdir}:/workdir -w /workdir nvcr.io/nvidia/clara/clara-parabricks:4.3.0-1 \
docker run --user {params.docker_user} --rm --gpus all --volume {wkdir}:/workdir -w /workdir nvcr.io/nvidia/clara/clara-parabricks:4.3.0-1 \
pbrun haplotypecaller \
--rna \
--ref /workdir/{input.ref_fasta} \
Expand Down

0 comments on commit 4f588c7

Please sign in to comment.