Skip to content

Commit

Permalink
feat: make tmp-dir a param that can be set
Browse files Browse the repository at this point in the history
  • Loading branch information
padraicc authored Feb 19, 2024
1 parent 06c2ad9 commit 667cf2d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions workflow/rules/pbrun.smk
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ rule pbrun_deepvariant:
cuda=get_cuda_devices,
extra=config.get("pbrun_deepvariant", {}).get("extra", ""),
num_gpus=lambda wildcards: get_num_gpus("pbrun_deepvariant", wildcards),
tmp=config.get("pbrun_deepvariant", {}).get("tmp_dir", "/tmp"),
log:
"parabricks/pbrun_deepvariant/{sample}_{type}.vcf.log",
benchmark:
Expand All @@ -40,6 +41,7 @@ rule pbrun_deepvariant:
"--in-bam {input.bam} "
"--num-gpus {params.num_gpus} "
"--out-variants {output.vcf} "
"--tmp-dir {params.tmp} "
"{params.extra} &> {log}"


Expand All @@ -55,6 +57,7 @@ rule pbrun_fq2bam:
extra=config.get("pbrun_fq2bam", {}).get("extra", ""),
in_fq=get_in_fq,
num_gpus=lambda wildcards: get_num_gpus("pbrun_fq2bam", wildcards),
tmp=config.get("pbrun_fq2bam", {}).get("tmp_dir", "/tmp"),
log:
"parabricks/pbrun_fq2bam/{sample}_{type}.bam.log",
benchmark:
Expand All @@ -80,6 +83,7 @@ rule pbrun_fq2bam:
"--in-fq {params.in_fq} "
"--num-gpus {params.num_gpus} "
"--out-bam {output.bam} "
"--tmp-dir {params.tmp} "
"{params.extra} &> {log}"


Expand All @@ -97,6 +101,7 @@ rule pbrun_fq2bam_recal:
extra=config.get("pbrun_fq2bam_recal", {}).get("extra", ""),
in_fq=get_in_fq,
num_gpus=lambda wildcards: get_num_gpus("pbrun_fq2bam_recal", wildcards),
tmp=config.get("pbrun_fq2bam_recal", {}).get("tmp_dir", "/tmp"),
log:
"parabricks/pbrun_fq2bam_recal/{sample}_{type}.bam.log",
benchmark:
Expand Down Expand Up @@ -124,6 +129,7 @@ rule pbrun_fq2bam_recal:
"--num-gpus {params.num_gpus} "
"--out-bam {output.bam} "
"--out-recal-file {output.recal} "
"--tmp-dir {params.tmp} "
"{params.extra} &> {log}"

rule pbrun_mutectcaller_t:
Expand All @@ -138,6 +144,7 @@ rule pbrun_mutectcaller_t:
cuda=get_cuda_devices,
extra=config.get("pbrun_mutectcaller_t", {}).get("extra", ""),
num_gpus=lambda wildcards: get_num_gpus("pbrun_mutectcaller_t", wildcards),
tmp=config.get("pbrun_mutectcaller_t", {}).get("tmp_dir", "/tmp"),
log:
"parabricks/pbrun_mutectcaller_t/{sample}_T.vcf.log",
benchmark:
Expand Down Expand Up @@ -165,6 +172,7 @@ rule pbrun_mutectcaller_t:
"--in-tumor-recal-file {input.recal_t} "
"--num-gpus {params.num_gpus} "
"--out-vcf {output.vcf} "
"--tmp-dir {params.tmp} "
"{params.extra} &> {log}"


Expand All @@ -183,6 +191,7 @@ rule pbrun_mutectcaller_tn:
cuda=get_cuda_devices,
extra=config.get("pbrun_mutectcaller_tn", {}).get("extra", ""),
num_gpus=lambda wildcards: get_num_gpus("pbrun_mutectcaller_tn", wildcards),
tmp=config.get("pbrun_mutectcaller_tn", {}).get("tmp_dir", "/tmp"),
log:
"parabricks/pbrun_mutectcaller_tn/{sample}.vcf.log",
benchmark:
Expand Down Expand Up @@ -213,6 +222,7 @@ rule pbrun_mutectcaller_tn:
"--in-normal-recal-file {input.recal_n} "
"--num-gpus {params.num_gpus} "
"--out-vcf {output.vcf} "
"--tmp-dir {params.tmp} "
"{params.extra} &> {log}"


Expand All @@ -227,6 +237,7 @@ rule pbrun_rna_fq2bam:
extra=config.get("pbrun_rna_fq2bam", {}).get("extra", ""),
in_fq=get_in_fq,
num_gpus=lambda wildcards: get_num_gpus("pbrun_rna_fq2bam", wildcards),
tmp=config.get("pbrun_rna_fq2bam", {}).get("tmp_dir", "/tmp"),
log:
"parabricks/pbrun_rna_fq2bam/{sample}_{type}.bam.log",
benchmark:
Expand Down Expand Up @@ -256,4 +267,5 @@ rule pbrun_rna_fq2bam:
"--out-bam {output.bam} "
"--out-prefix {wildcards.sample}_{wildcards.type} "
"{params.extra} "
"--tmp-dir {params.tmp} "
"--logfile {log}"

0 comments on commit 667cf2d

Please sign in to comment.