Skip to content

Commit

Permalink
Fix #431 'Chromosome blocks not continuous' error (#433)
Browse files Browse the repository at this point in the history
  • Loading branch information
dennishendriksen authored Jul 25, 2023
1 parent a095f85 commit 346ed3b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion modules/cram/templates/clair3_call.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ create_bed () {
# workaround for clair 3 issue where the ebi server is called to decode the cram
# https://github.com/HKU-BAL/Clair3/issues/180
convert_to_bam () {
${CMD_SAMTOOLS} view --reference "!{reference}" --bam --regions-file "!{bed}" --output "!{cram}.bam" --threads "!{task.cpus}" "!{cram}"
# workaround for samtools issue somtimes producing unsorted/incorrect output when running with multiple threads
# replace --threads "1" with --threads "!{task.cpus}" when https://github.com/samtools/samtools/issues/1890 is fixed
${CMD_SAMTOOLS} view --reference "!{reference}" --bam --regions-file "!{bed}" --output "!{cram}.bam" --threads "1" "!{cram}"
${CMD_SAMTOOLS} index "!{cram}.bam"
}

Expand Down
4 changes: 3 additions & 1 deletion modules/cram/templates/cutesv_call.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ set -euo pipefail
# workaround for cutesv
convert_to_bam () {
echo -e "!{bedContent}" > "!{bed}"
${CMD_SAMTOOLS} view --reference "!{reference}" --bam --regions-file "!{bed}" --output "!{cram}.bam" --threads "!{task.cpus}" "!{cram}"
# workaround for samtools issue somtimes producing unsorted/incorrect output when running with multiple threads
# replace --threads "1" with --threads "!{task.cpus}" when https://github.com/samtools/samtools/issues/1890 is fixed
${CMD_SAMTOOLS} view --reference "!{reference}" --bam --regions-file "!{bed}" --output "!{cram}.bam" --threads "1" "!{cram}"
${CMD_SAMTOOLS} index "!{cram}.bam"
}

Expand Down

0 comments on commit 346ed3b

Please sign in to comment.