SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
base coverage per position on scaffolds boetsie Bioinformatics 5 01-23-2014 04:44 AM
Per base sequence coverage from sam/bam file? ewilbanks Bioinformatics 7 06-06-2012 01:03 PM
samtools pileup vs mpileup for computing per-base coverage SamH Bioinformatics 5 08-10-2011 02:14 PM
Base coverage from Bam ElMichael Bioinformatics 4 12-01-2010 09:18 AM
Histogram and per-base genome coverage quinlana Bioinformatics 0 10-20-2009 06:28 PM

Reply
 
Thread Tools
Old 07-19-2011, 02:22 PM   #1
cristae8
Junior Member
 
Location: San Francisco

Join Date: Jun 2011
Posts: 6
Question *** Per base coverage ***

Hi,
This seems like a silly question, but I can't quite find the answer for it anywhere. I have a list of single nucleotide position, ie,
chr 1 72342
chr 2 32912
chr X 184343
etc,
to which I would like to find their coverage, ie, how many reads cover that position and what are those bases.
This is almost like calling SNP, but not quite because I just like to know the coverage even if no SNP is present. For this reason, I can't just use a SNP caller. Does anyone have a solution for this?
Thanks so much.
cristae8 is offline   Reply With Quote
Old 07-19-2011, 05:20 PM   #2
kwatts59
Member
 
Location: nevada

Join Date: Apr 2011
Posts: 46
Default

I loaded all my short read data into an SQL database so that this information can be pulled out with a quick query.

For example, to find how many reads cover position 72342 of chr 1, just type in the following query. This assumes 50bp reads.

select count(*) from short_reads
where (chromosome = 'chr1')
and (start_position >= 72293)
and (start_position <= 72342)

To perform this query for many SNPs, a PERL script can be written.
kwatts59 is offline   Reply With Quote
Old 07-19-2011, 08:26 PM   #3
PeteH
Member
 
Location: Melbourne

Join Date: Jun 2010
Posts: 64
Default

The coverageBed function in bedtools (http://code.google.com/p/bedtools/) should be able to do what you want.
PeteH is offline   Reply With Quote
Old 07-19-2011, 09:55 PM   #4
tanmoy63
Junior Member
 
Location: New Delhi

Join Date: Feb 2011
Posts: 1
Default

you can use samtools pileup -c from on sorted indexed bam file of your alignment..this pileup consensus will give you read depth in each position and base composition in each also
tanmoy63 is offline   Reply With Quote
Old 07-21-2011, 02:50 PM   #5
cristae8
Junior Member
 
Location: San Francisco

Join Date: Jun 2011
Posts: 6
Default

Thanks, everyone. bedTools seems to work the best and it's fully documented so very easy to use! Much thanks to Aaron (the author) & Pete.
cristae8 is offline   Reply With Quote
Old 07-21-2011, 04:11 PM   #6
Michael.James.Clark
Senior Member
 
Location: Palo Alto

Join Date: Apr 2009
Posts: 213
Default

Alternatively:

samtools view -b <in.bam> <chr>:<pos>-<pos> | samtools pileup - | grep <pos> | awk '{print $4}'
__________________
Mendelian Disorder: A blogshare of random useful information for general public consumption. [Blog]
Breakway: A Program to Identify Structural Variations in Genomic Data [Website] [Forum Post]
Projects: U87MG whole genome sequence [Website] [Paper]
Michael.James.Clark is offline   Reply With Quote
Reply

Tags
per base coverage

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 08:22 AM.


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