Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: canu and porechop porechop #473

Merged
merged 14 commits into from
Feb 18, 2022
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