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

Resolved #28 #39

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Resolved #28 #39

wants to merge 1 commit into from

Conversation

creggian
Copy link

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