From 2c11b7ba6bf3465845a77e33d5e0e1f6fb1ca20e Mon Sep 17 00:00:00 2001 From: Marco Galardini Date: Thu, 24 Aug 2023 11:49:50 +0200 Subject: [PATCH] Panfeed second pass should not do compression For some reason adding `--compress` to the second pass of panfeed results in a crash when using the helper scripts. This change avoids compressing panfeed's output, and we now make sure to delete them once the second pass is finished. --- workflow/Snakefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/workflow/Snakefile b/workflow/Snakefile index 5cd6e6a..00af78e 100644 --- a/workflow/Snakefile +++ b/workflow/Snakefile @@ -1021,8 +1021,8 @@ rule panfeed_downstream: fastadir2=config["references_fastas"], clusters="out/associations/{target}/panfeed_clusters.txt", targets="out/associations/{target}/panfeed_targets.txt", - k2h="out/associations/{target}/panfeed_second_pass/kmers_to_hashes.tsv.gz", - k="out/associations/{target}/panfeed_second_pass/kmers.tsv.gz", + k2h="out/associations/{target}/panfeed_second_pass/kmers_to_hashes.tsv", + k="out/associations/{target}/panfeed_second_pass/kmers.tsv", threads: 4 conda: "envs/panfeed.yaml" log: "out/logs/panfeed_second_pass_{target}.log" @@ -1048,7 +1048,7 @@ rule panfeed_downstream: -p {params.input} \ --upstream 250 --downstream 100 \ --no-filter \ - -v --compress \ + -v \ --genes {params.clusters} \ --targets {params.targets} \ --cores {threads} 2>> {log} && \ @@ -1058,6 +1058,7 @@ rule panfeed_downstream: -a {input.panfeed} \ -p {params.k2h} \ -k {params.k} 2>> {log} \ - | gzip > {output} + | gzip > {output} && \ + rm -rf {params.outdir} """