From 419fadbe1fffbe9eab07b55a82d4e7ff3bd007c2 Mon Sep 17 00:00:00 2001 From: Thomas Battenfeld Date: Wed, 16 Feb 2022 08:09:02 +0100 Subject: [PATCH 1/9] fix logging --- workflow/rules/long_read.smk | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/workflow/rules/long_read.smk b/workflow/rules/long_read.smk index d356d8053..d4d70afa6 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) > {log} 2>&1" + "(porechop -i {input.fastq_in} -o {output} --no_split --end_size 35 --extra_end_trim 0 -t {threads} -v 1) 2> {log}" rule nanofilt: @@ -117,21 +117,24 @@ 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})" - "> {log} 2>&1" + """ + ( 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} + """ # rule medaka_consensus_reference: From 8263f4f9bd8031020ac7b53467cd923a6bf5d533 Mon Sep 17 00:00:00 2001 From: Thomas Battenfeld Date: Wed, 16 Feb 2022 08:12:20 +0100 Subject: [PATCH 2/9] add redirect --- 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: From 5928e5a1a225b80cfe204c28f5b4793afe627ea6 Mon Sep 17 00:00:00 2001 From: Thomas Battenfeld Date: Wed, 16 Feb 2022 08:13:43 +0100 Subject: [PATCH 3/9] ... --- 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: From 35d0b56753ce68327ef43b6fa2828ff6c1a35fce Mon Sep 17 00:00:00 2001 From: Alexander Thomas <77535027+alethomas@users.noreply.github.com> Date: Wed, 16 Feb 2022 15:17:35 +0100 Subject: [PATCH 4/9] Update long_read.smk add temp flags for different directories --- workflow/rules/long_read.smk | 41 +++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/workflow/rules/long_read.smk b/workflow/rules/long_read.smk index d356d8053..e2877196f 100644 --- a/workflow/rules/long_read.smk +++ b/workflow/rules/long_read.smk @@ -52,7 +52,7 @@ rule customize_primer_porechop: input: get_artic_primer, output: - "results/.indicators/replacement_notice.txt", + temp("results/.indicators/replacement_notice.txt"), conda: "../envs/primechop.yaml" log: @@ -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) > {log} 2>&1" + "(porechop -i {input.fastq_in} -o {output} --no_split --end_size 35 --extra_end_trim 0 -t {threads} -v 1) 2> {log}" rule nanofilt: @@ -104,6 +104,8 @@ rule canu_correct: "results/{date}/trimmed/nanofilt/{sample}.fastq", output: "results/{date}/corrected/{sample}/{sample}.correctedReads.fasta.gz", + temp(directory("results/{date}/corrected/{sample}/correction")), + temp(directory("results/{date}/corrected/{sample}/{sample}.seqStore")), log: "logs/{date}/canu/assemble/{sample}.log", params: @@ -113,25 +115,30 @@ rule canu_correct: for_testing=lambda w, threads: get_if_testing( f"corThreads={threads} redMemory=6 oeaMemory=6" ), + resources: + parallel_correction_processes=1, conda: "../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})" - "> {log} 2>&1" + """ + ( 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: From 095d223b47afd59e319157e7d560630910b03001 Mon Sep 17 00:00:00 2001 From: Alexander Thomas <77535027+alethomas@users.noreply.github.com> Date: Wed, 16 Feb 2022 15:23:11 +0100 Subject: [PATCH 5/9] Update long_read.smk --- workflow/rules/long_read.smk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflow/rules/long_read.smk b/workflow/rules/long_read.smk index e2877196f..548634cb2 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: From 63ae2468f44ab7a5c1ca1059a91f75344a73e05f Mon Sep 17 00:00:00 2001 From: Alexander Thomas <77535027+alethomas@users.noreply.github.com> Date: Wed, 16 Feb 2022 15:24:24 +0100 Subject: [PATCH 6/9] Update long_read.smk --- workflow/rules/long_read.smk | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/workflow/rules/long_read.smk b/workflow/rules/long_read.smk index 548634cb2..291545a78 100644 --- a/workflow/rules/long_read.smk +++ b/workflow/rules/long_read.smk @@ -121,24 +121,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} - ) - > {log} 2>&1 - """ + "( 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: From 7b77c0637f3c2c9c0edc9a6ddd4d40d935344c47 Mon Sep 17 00:00:00 2001 From: Alexander Thomas Date: Wed, 16 Feb 2022 15:46:58 +0100 Subject: [PATCH 7/9] Revert "Update long_read.smk" This reverts commit 63ae2468f44ab7a5c1ca1059a91f75344a73e05f. --- workflow/rules/long_read.smk | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/workflow/rules/long_read.smk b/workflow/rules/long_read.smk index 291545a78..548634cb2 100644 --- a/workflow/rules/long_read.smk +++ b/workflow/rules/long_read.smk @@ -121,21 +121,24 @@ 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})" - "> {log} 2>&1" + """ + ( 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: From 52bbfb3f63c1c66482b108ebea64d02704219a6e Mon Sep 17 00:00:00 2001 From: Alexander Thomas Date: Wed, 16 Feb 2022 15:47:07 +0100 Subject: [PATCH 8/9] Revert "Update long_read.smk" This reverts commit 095d223b47afd59e319157e7d560630910b03001. --- workflow/rules/long_read.smk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflow/rules/long_read.smk b/workflow/rules/long_read.smk index 548634cb2..e2877196f 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) > {log} 2>&1" + "(porechop -i {input.fastq_in} -o {output} --no_split --end_size 35 --extra_end_trim 0 -t {threads} -v 1) 2> {log}" rule nanofilt: From 45a8f0dfd0a24eec0038f9a9af2994c11b36b7b0 Mon Sep 17 00:00:00 2001 From: Alexander Thomas Date: Wed, 16 Feb 2022 15:47:13 +0100 Subject: [PATCH 9/9] Revert "Update long_read.smk" This reverts commit 35d0b56753ce68327ef43b6fa2828ff6c1a35fce. --- workflow/rules/long_read.smk | 41 +++++++++++++++--------------------- 1 file changed, 17 insertions(+), 24 deletions(-) diff --git a/workflow/rules/long_read.smk b/workflow/rules/long_read.smk index e2877196f..d356d8053 100644 --- a/workflow/rules/long_read.smk +++ b/workflow/rules/long_read.smk @@ -52,7 +52,7 @@ rule customize_primer_porechop: input: get_artic_primer, output: - temp("results/.indicators/replacement_notice.txt"), + "results/.indicators/replacement_notice.txt", conda: "../envs/primechop.yaml" log: @@ -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: @@ -104,8 +104,6 @@ rule canu_correct: "results/{date}/trimmed/nanofilt/{sample}.fastq", output: "results/{date}/corrected/{sample}/{sample}.correctedReads.fasta.gz", - temp(directory("results/{date}/corrected/{sample}/correction")), - temp(directory("results/{date}/corrected/{sample}/{sample}.seqStore")), log: "logs/{date}/canu/assemble/{sample}.log", params: @@ -115,30 +113,25 @@ rule canu_correct: for_testing=lambda w, threads: get_if_testing( f"corThreads={threads} redMemory=6 oeaMemory=6" ), - resources: - parallel_correction_processes=1, conda: "../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} - ) - > {log} 2>&1 - """ + "( 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: