From 77c842ff2b0cb76756e944620772477c3afdda76 Mon Sep 17 00:00:00 2001 From: Manuel Holtgrewe Date: Tue, 10 Jan 2023 12:15:54 +0100 Subject: [PATCH] revert: not using parallel --workdir (#328) This actually overrides TMPDIR in the called bash functions. --- snappy_wrappers/wrappers/bcftools/call_joint/wrapper.py | 2 -- snappy_wrappers/wrappers/bcftools_call/wrapper.py | 2 +- snappy_wrappers/wrappers/gatk3_hc/wrapper.py | 2 +- snappy_wrappers/wrappers/gatk3_ug/wrapper.py | 2 +- snappy_wrappers/wrappers/gatk4_hc/combine_gvcfs/wrapper.py | 2 +- snappy_wrappers/wrappers/gatk4_hc/discover/wrapper.py | 2 +- snappy_wrappers/wrappers/gatk4_hc/genotype/wrapper.py | 2 +- snappy_wrappers/wrappers/gatk4_hc/joint/wrapper.py | 3 +-- snappy_wrappers/wrappers/varscan/call_joint/wrapper.py | 2 -- 9 files changed, 7 insertions(+), 12 deletions(-) diff --git a/snappy_wrappers/wrappers/bcftools/call_joint/wrapper.py b/snappy_wrappers/wrappers/bcftools/call_joint/wrapper.py index b65bb2b86..65ed3c912 100644 --- a/snappy_wrappers/wrappers/bcftools/call_joint/wrapper.py +++ b/snappy_wrappers/wrappers/bcftools/call_joint/wrapper.py @@ -50,7 +50,6 @@ export TMPDIR=$(mktemp -d) trap "rm -rf $TMPDIR" EXIT -mkdir -p $TMPDIR/parallel snappy-genome_windows \ --fai-file $REF.fai \ @@ -58,7 +57,6 @@ {args_ignore_chroms} \ | parallel \ --plain \ - --workdir $TMPDIR/parallel \ --keep-order \ --verbose \ --max-procs {snakemake.config[step_config][somatic_variant_calling][bcftools_joint][num_threads]} \ diff --git a/snappy_wrappers/wrappers/bcftools_call/wrapper.py b/snappy_wrappers/wrappers/bcftools_call/wrapper.py index 914c7323d..fc24ad7f0 100644 --- a/snappy_wrappers/wrappers/bcftools_call/wrapper.py +++ b/snappy_wrappers/wrappers/bcftools_call/wrapper.py @@ -128,7 +128,7 @@ mkdir -p $TMPDIR/parallel num_threads={snakemake.config[step_config][variant_calling][gatk4_hc_joint][num_threads]} cat $TMPDIR/final_intervals.txt \ -| parallel --plain --workdir $TMPDIR/parallel -j $num_threads 'run-shard {{#}} {{}}' +| parallel --plain -j $num_threads 'run-shard {{#}} {{}}' # Merge the individual shards' output VCF bcftools concat \ diff --git a/snappy_wrappers/wrappers/gatk3_hc/wrapper.py b/snappy_wrappers/wrappers/gatk3_hc/wrapper.py index 58701a8ef..7825d7736 100644 --- a/snappy_wrappers/wrappers/gatk3_hc/wrapper.py +++ b/snappy_wrappers/wrappers/gatk3_hc/wrapper.py @@ -111,7 +111,7 @@ mkdir -p $TMPDIR/parallel num_threads={snakemake.config[step_config][variant_calling][gatk3_hc][num_threads]} cat $TMPDIR/final_intervals.txt \ -| parallel --plain --workdir $TMPDIR/parallel -j $num_threads 'run-shard {{#}} {{}}' +| parallel --plain -j $num_threads 'run-shard {{#}} {{}}' # Merge the individual shards' output VCF bcftools concat \ diff --git a/snappy_wrappers/wrappers/gatk3_ug/wrapper.py b/snappy_wrappers/wrappers/gatk3_ug/wrapper.py index 52cc88fd7..7cf663a92 100644 --- a/snappy_wrappers/wrappers/gatk3_ug/wrapper.py +++ b/snappy_wrappers/wrappers/gatk3_ug/wrapper.py @@ -112,7 +112,7 @@ mkdir -p $TMPDIR/parallel num_threads={snakemake.config[step_config][variant_calling][gatk3_ug][num_threads]} cat $TMPDIR/final_intervals.txt \ -| parallel --plain --workdir $TMPDIR/parallel -j $num_threads 'run-shard {{#}} {{}}' +| parallel --plain -j $num_threads 'run-shard {{#}} {{}}' # Merge the individual shards' output VCF bcftools concat \ diff --git a/snappy_wrappers/wrappers/gatk4_hc/combine_gvcfs/wrapper.py b/snappy_wrappers/wrappers/gatk4_hc/combine_gvcfs/wrapper.py index 25e85cd10..a05d7a25b 100644 --- a/snappy_wrappers/wrappers/gatk4_hc/combine_gvcfs/wrapper.py +++ b/snappy_wrappers/wrappers/gatk4_hc/combine_gvcfs/wrapper.py @@ -113,7 +113,7 @@ mkdir -p $TMPDIR/parallel num_threads={snakemake.config[step_config][variant_calling][gatk4_hc_gvcf][num_threads]} cat $TMPDIR/final_intervals.txt \ -| parallel --workdir $TMPDIR/parallel --plain -j $num_threads 'run-shard {{#}} {{}}' +| parallel --plain -j $num_threads 'run-shard {{#}} {{}}' # Merge the individual shards' output VCF bcftools concat \ diff --git a/snappy_wrappers/wrappers/gatk4_hc/discover/wrapper.py b/snappy_wrappers/wrappers/gatk4_hc/discover/wrapper.py index 6167215cd..876b669b1 100644 --- a/snappy_wrappers/wrappers/gatk4_hc/discover/wrapper.py +++ b/snappy_wrappers/wrappers/gatk4_hc/discover/wrapper.py @@ -116,7 +116,7 @@ mkdir -p $TMPDIR/parallel num_threads={snakemake.config[step_config][variant_calling][gatk4_hc_gvcf][num_threads]} cat $TMPDIR/final_intervals.txt \ -| parallel --workdir $TMPDIR/parallel --plain -j $num_threads 'run-shard {{#}} {{}}' +| parallel --plain -j $num_threads 'run-shard {{#}} {{}}' # Merge the individual shards' output VCF bcftools concat \ diff --git a/snappy_wrappers/wrappers/gatk4_hc/genotype/wrapper.py b/snappy_wrappers/wrappers/gatk4_hc/genotype/wrapper.py index 60d92cee0..cec8a758f 100644 --- a/snappy_wrappers/wrappers/gatk4_hc/genotype/wrapper.py +++ b/snappy_wrappers/wrappers/gatk4_hc/genotype/wrapper.py @@ -109,7 +109,7 @@ mkdir -p $TMPDIR/parallel num_threads={snakemake.config[step_config][variant_calling][gatk4_hc_gvcf][num_threads]} cat $TMPDIR/final_intervals.txt \ -| parallel --workdir $TMPDIR/parallel --plain -j $num_threads 'run-shard {{#}} {{}}' +| parallel --plain -j $num_threads 'run-shard {{#}} {{}}' # Merge the individual shards' output VCF bcftools concat \ diff --git a/snappy_wrappers/wrappers/gatk4_hc/joint/wrapper.py b/snappy_wrappers/wrappers/gatk4_hc/joint/wrapper.py index e441ed9fb..f8a153656 100644 --- a/snappy_wrappers/wrappers/gatk4_hc/joint/wrapper.py +++ b/snappy_wrappers/wrappers/gatk4_hc/joint/wrapper.py @@ -111,10 +111,9 @@ export -f run-shard # Perform parallel execution -mkdir -p $TMPDIR/parallel num_threads={snakemake.config[step_config][variant_calling][gatk4_hc_joint][num_threads]} cat $TMPDIR/final_intervals.txt \ -| parallel --plain --workdir $TMPDIR/parallel -j $num_threads 'run-shard {{#}} {{}}' +| parallel -j $num_threads 'run-shard {{#}} {{}}' # Merge the individual shards' output VCF bcftools concat \ diff --git a/snappy_wrappers/wrappers/varscan/call_joint/wrapper.py b/snappy_wrappers/wrappers/varscan/call_joint/wrapper.py index 40f6c73da..f2ef101b0 100644 --- a/snappy_wrappers/wrappers/varscan/call_joint/wrapper.py +++ b/snappy_wrappers/wrappers/varscan/call_joint/wrapper.py @@ -108,12 +108,10 @@ }} -mkdir -p $TMPDIR/parallel for vartype in snp indel; do generate_intervals \ | parallel \ --plain \ - --workdir $TMPDIR/parallel --keep-order \ --verbose \ --max-procs {snakemake.config[step_config][somatic_variant_calling][varscan_joint][num_cores]} \