From 5db09352abdcb2af41ae5b72250b26c547951877 Mon Sep 17 00:00:00 2001 From: Thomas Battenfeld <46334240+thomasbtf@users.noreply.github.com> Date: Wed, 16 Feb 2022 08:05:01 +0100 Subject: [PATCH] fix: canu and porechop logging --- workflow/rules/long_read.smk | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/workflow/rules/long_read.smk b/workflow/rules/long_read.smk index d4d70afa6..d356d8053 100644 --- a/workflow/rules/long_read.smk +++ b/workflow/rules/long_read.smk @@ -80,7 +80,7 @@ rule porechop_primer_trimming: "logs/{date}/trimmed/porechop/primer_clipped/{sample}.log", threads: 2 shell: - "(porechop -i {input.fastq_in} -o {output} --no_split --end_size 35 --extra_end_trim 0 -t {threads} -v 1) 2> {log}" + "(porechop -i {input.fastq_in} -o {output} --no_split --end_size 35 --extra_end_trim 0 -t {threads} -v 1) > {log} 2>&1" rule nanofilt: @@ -117,24 +117,21 @@ rule canu_correct: "../envs/canu.yaml" threads: 16 shell: - """ - ( if [ -d {params.outdir} ]; then rm -Rf {params.outdir}; fi && - canu -correct -nanopore {input} -p {wildcards.sample} -d {params.outdir} genomeSize=30k minOverlapLength=10 minReadLength=200 \ - useGrid=false {params.for_testing} \ - corMMapMerSize=10 corOutCoverage=50000 corMinCoverage=0 maxInputCoverage=20000 \ - corOverlapper=minimap utgOverlapper=minimap obtOverlapper=minimap \ - corConcurrency={params.concurrency} \ - cormhapConcurrency={params.concurrency} cormhapThreads={params.concurrency} \ - cormmapConcurrency={params.concurrency} cormmapThreads={params.concurrency} \ - obtmmapConcurrency={params.concurrency} obtmmapThreads={params.concurrency} \ - utgmmapConcurrency={params.concurrency} utgmmapThreads={params.concurrency} \ - redConcurrency={params.concurrency} redThreads={params.concurrency} \ - ovbConcurrency={params.concurrency} \ - ovsConcurrency={params.concurrency} \ - oeaConcurrency={params.concurrency} - ) - 2> {log} - """ + "( if [ -d {params.outdir} ]; then rm -Rf {params.outdir}; fi &&" + " canu -correct -nanopore {input} -p {wildcards.sample} -d {params.outdir} genomeSize=30k minOverlapLength=10 minReadLength=200" + " useGrid=false {params.for_testing}" + " corMMapMerSize=10 corOutCoverage=50000 corMinCoverage=0 maxInputCoverage=20000" + " corOverlapper=minimap utgOverlapper=minimap obtOverlapper=minimap" + " corConcurrency={params.concurrency}" + " cormhapConcurrency={params.concurrency} cormhapThreads={params.concurrency}" + " cormmapConcurrency={params.concurrency} cormmapThreads={params.concurrency}" + " obtmmapConcurrency={params.concurrency} obtmmapThreads={params.concurrency}" + " utgmmapConcurrency={params.concurrency} utgmmapThreads={params.concurrency}" + " redConcurrency={params.concurrency} redThreads={params.concurrency}" + " ovbConcurrency={params.concurrency}" + " ovsConcurrency={params.concurrency}" + " oeaConcurrency={params.concurrency})" + "> {log} 2>&1" # rule medaka_consensus_reference: