SEQanswers

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

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

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

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

Code:
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:

Code:
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?

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

Join Date: Jul 2011
Posts: 3,480
Default

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
Reply

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:36 PM.


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