Skip to content

Commit

Permalink
fix: canu and porechop logging
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasbtf authored Feb 16, 2022
1 parent c5b9f6c commit 5db0935
Showing 1 changed file with 16 additions and 19 deletions.
35 changes: 16 additions & 19 deletions workflow/rules/long_read.smk
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 5db0935

Please sign in to comment.