SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
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
samtools SNP Quality Scores in Depth alejo69 Bioinformatics 1 09-08-2011 08:34 AM
What is read depth -D100 means in samtools? ketan_bnf Bioinformatics 1 07-28-2011 06:54 PM
SAMTools showing incorrect depth for a given position rdeborja Bioinformatics 1 05-07-2011 03:25 PM

Reply
 
Thread Tools
Old 03-27-2012, 06:30 AM   #1
twaddlac
Member
 
Location: Pittsburgh, PA

Join Date: Feb 2011
Posts: 49
Question Problem with samtools depth?

I'm trying to plot the depth of coverage but when running samtools depth it seems to skip over bases which I presume have no alignments spanning those regions. However, it does report some bases where there are no alignments, though few and it nowhere near compensates for the bases that it omits.

After grepping through the file the number of bases for the reference provided by samtools depth is always less then the actual number of bases. I made sure that there would be no character incompatibilities (Ns etc.) and still no improvement. Has anyone noticed this before? Is this a bug or does it just not display positions with no alignments?

I'm using samtools version 0.1.18 (r982:295) and produced bam files from both SHRiMP and Bowtie.
twaddlac is offline   Reply With Quote
Old 03-27-2012, 07:10 AM   #2
Richard Finney
Senior Member
 
Location: bethesda

Join Date: Feb 2009
Posts: 700
Default

The samtools "depth" implementation has a low base quality filter AND a low mapping quality filter for the entire read.

Does this account for the discrepancy?
Richard Finney is offline   Reply With Quote
Old 03-27-2012, 07:17 AM   #3
twaddlac
Member
 
Location: Pittsburgh, PA

Join Date: Feb 2011
Posts: 49
Default

It doesn't seem to. I've toggled the '-q -Q' parameters from 1 to -10000 and still didn't see any improvement, unless I'm misunderstanding the BAQ and mapQ values (higher = more confidence).
twaddlac is offline   Reply With Quote
Old 03-27-2012, 03:42 PM   #4
Heisman
Senior Member
 
Location: St. Louis

Join Date: Dec 2010
Posts: 535
Default

Quote:
Originally Posted by twaddlac View Post
It doesn't seem to. I've toggled the '-q -Q' parameters from 1 to -10000 and still didn't see any improvement, unless I'm misunderstanding the BAQ and mapQ values (higher = more confidence).
Try setting the mapping one to 0.

That said, I don't know why you are observing this. There are other ways to get coverage if that is your real goal (I prefer GATK's DepthOfCoverage).
Heisman is offline   Reply With Quote
Old 03-27-2012, 03:52 PM   #5
twaddlac
Member
 
Location: Pittsburgh, PA

Join Date: Feb 2011
Posts: 49
Default

I tried setting that to 0 and that didn't seem to make a difference. I tried to use GATK as well but it won't accept a bam file without read groups. I haven't tried it yet but putting a read group into the bam file doesn't sound too hard thought it is an inconvenience. Thanks for the advice, though!
twaddlac is offline   Reply With Quote
Old 03-28-2012, 06:52 AM   #6
aggp11
Member
 
Location: Wisconsin

Join Date: Jun 2011
Posts: 87
Default

PicardTools AddorReplaceReadGroups does this easily and quickly. It takes a BAM file as input and you can provide the read group info. Following is the link:

http://picard.sourceforge.net/comman...laceReadGroups
aggp11 is offline   Reply With Quote
Old 01-19-2014, 11:58 PM   #7
maivantan
Member
 
Location: Vietnam

Join Date: Oct 2013
Posts: 51
Default

dear all,
Which command to calculate average of depth in samtools?
any suggestion please
maivantan is offline   Reply With Quote
Old 01-20-2014, 12:41 AM   #8
dpryan
Devon Ryan
 
Location: Freiburg, Germany

Join Date: Jul 2011
Posts: 3,480
Default

Quote:
Originally Posted by maivantan View Post
dear all,
Which command to calculate average of depth in samtools?
any suggestion please
depth (so, "samtools depth ..."). Please read the samtools manual next time.
dpryan is offline   Reply With Quote
Old 01-20-2014, 02:47 AM   #9
maivantan
Member
 
Location: Vietnam

Join Date: Oct 2013
Posts: 51
Default

Yes, Thank you very much Dpryan,
maivantan is offline   Reply With Quote
Reply

Tags
bam files, depth of coverage, samtools

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 12:10 AM.


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