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

use lofreq call-parallel; option to output positions not called #339

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 26 additions & 5 deletions pipes/WDL/tasks/tasks_intrahost.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ task lofreq {
input {
File aligned_bam
File reference_fasta
Boolean? output_all_positions = false # note that this may not output *all* positions (i.e. gVCF) as lofreq does not currently support full output

String out_basename = basename(aligned_bam, '.bam')
String docker = "quay.io/biocontainers/lofreq:2.1.5--py38h588ecb2_4"
Expand All @@ -117,10 +118,30 @@ task lofreq {
samtools faidx "~{reference_fasta}"
samtools index "~{aligned_bam}"

lofreq call \
OUTPUT_ALL_POS="~{true='output_all' false='' output_all_positions}"
if [ -n "$OUTPUT_ALL_POS" ]; then
lofreq call-parallel --pp-threads $(nproc --all) --no-default-filter --bonf 1 --sig 1 \
-f "~{reference_fasta}" \
-o "~{out_basename}.vcf" \
-o "~{out_basename}.unfiltered.vcf.gz" \
"~{aligned_bam}"
lofreq filter --print-all \
--cov-min 10 \
--af-min 0.01 \
--sb-mtc bonf \
--sb-no-compound \
--sb-incl-indels \
--indelqual-mtc bonf \
--snvqual-ntests 0.5 \
--indelqual-mtc bonf \
--indelqual-ntests 0.5 \
--in "~{out_basename}.unfiltered.vcf.gz" \
--out "~{out_basename}.vcf"
else
lofreq call-parallel --pp-threads $(nproc --all) \
-f "~{reference_fasta}" \
-o "~{out_basename}.vcf" \
"~{aligned_bam}"
fi
>>>

output {
Expand All @@ -129,10 +150,10 @@ task lofreq {
}
runtime {
docker: docker
cpu: 2
memory: "3 GB"
cpu: 8
memory: "30 GB"
disks: "local-disk 200 HDD"
dx_instance_type: "mem1_ssd1_v2_x2"
dx_instance_type: "mem2_ssd1_v2_x8"
}
}

Expand Down