Go Back   SEQanswers > Bioinformatics > Bioinformatics

Similar Threads
Thread Thread Starter Forum Replies Last Post
Samtools Depth Jeromek Bioinformatics 2 08-06-2014 02:14 AM
Problem with samtools depth? twaddlac Bioinformatics 8 01-20-2014 02:47 AM
Help! Strange discrepancy in the mapping output diagen Bioinformatics 2 10-30-2012 02:10 AM
samtools depth vs mpileup output question Kennels Bioinformatics 3 02-08-2012 04:48 PM
Maximum read Depth in Samtools Anjali Bioinformatics 2 01-16-2012 02:15 AM

Thread Tools
Old 08-03-2016, 06:57 AM   #1
Location: Barcelona

Join Date: Feb 2012
Posts: 49
Default samtools depth -Q 0 and -Q 1 output discrepancy

I have an exons_merged.bed file of total regions length 81036853:
awk 'BEGIN{sum=0}{sum+=$3-$2}END{print sum}' exons_merged.bed
Based on this merged BED file I do:
samtools depth -Q 1 -a rmdup.bam -b exons_merged.bed > depth_Q1_MERGED_rmdup.dep

samtools depth -a rmdup.bam -b exons_merged.bed > depth_MERGED_rmdup.dep
I use option "-a" because I want to keep ALL positions that are in my BED file
however then I obtain:

wc -l depth_*
  81025877 depth_MERGED_rmdup.dep
  80783802 depth_Q1_MERGED_rmdup.dep
Why non of above numbers are the same like the total number of the bases in BED file? I expected to list all positions from my MERGED.BED file, but instead of I get only some subset...

Why it's like this?

thedamian is offline   Reply With Quote
Old 08-03-2016, 01:26 PM   #2
Devon Ryan
Location: Freiburg, Germany

Join Date: Jul 2011
Posts: 3,480

Try "-a -a" rather than "-a" and see if that makes the difference. "-a" alone won't include BED entries that completely lack overlaps, but "-a -a" should.
dpryan is offline   Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

All times are GMT -8. The time now is 10:24 AM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO