CoNVaDING icon indicating copy to clipboard operation
CoNVaDING copied to clipboard

Resolved #28

Open creggian opened this issue 6 years ago • 0 comments

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

creggian avatar Jan 17 '19 12:01 creggian