Skip to content

Resolved #28#39

Open
creggian wants to merge 1 commit intomolgenis:masterfrom
creggian:issue-28
Open

Resolved #28#39
creggian wants to merge 1 commit intomolgenis:masterfrom
creggian:issue-28

Conversation

@creggian
Copy link
Copy Markdown

I got the same error when the BAM file had zero coverage in al least one (but not all) regions described in the BED file.

I solved by editing the samtools command by providing an additional "-a" option

my $extractcov = "samtools depth -r $chr:$start-$stop -a -a -q 0 -Q 0 $bam | awk '{sum+=$3} END {if (NR > 0) print sum/NR; else print 0;}'";

(see the my edit "-a" after the first "-a")

In this way samtools produces the expected output with 0 coverage in every position.

Versions

  • samtools v1.8 using htslib v1.8
  • CoNVaDING 1.2.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant