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
*** Per base coverage *** cristae8 Bioinformatics 5 07-21-2011 04:11 PM
Extracting base coverage and quality values from BAM files unagaswamy Bioinformatics 9 11-11-2010 06:55 AM
Histogram and per-base genome coverage quinlana Bioinformatics 0 10-20-2009 06:28 PM

Reply
 
Thread Tools
Old 11-19-2010, 07:37 AM   #1
ElMichael
Member
 
Location: UK

Join Date: Jun 2009
Posts: 31
Default Base coverage from Bam

Hi,
I wonder if there is any option in, e.g., samtools to display regions (positions) with the base coverage >= given threshold. Something opposite to the mpileup option (when we have positions and want to see base coverage and quality). I have very small number of reads mapped to the genome and I want to see those tens or hundreds regions covered by, at least, 10-15 reads.
Thanks.
ElMichael is offline   Reply With Quote
Old 11-19-2010, 08:09 AM   #2
adamdeluca
Member
 
Location: Iowa City, IA

Join Date: Jul 2010
Posts: 95
Default

you could use genomeCoverageBed/Bam from bedtools with the -bg option to produce a bedgraph file, that can be filtered easily: awk '($4>-10)'
adamdeluca is offline   Reply With Quote
Old 11-19-2010, 08:10 AM   #3
drio
Senior Member
 
Location: 4117'49"N / 24'42"E

Join Date: Oct 2008
Posts: 323
Default

Assuming you used (-c):
Code:
$ awk '{if ($8>4) print}' my.pileup
__________________
-drd
drio is offline   Reply With Quote
Old 11-19-2010, 11:20 AM   #4
ElMichael
Member
 
Location: UK

Join Date: Jun 2009
Posts: 31
Default

adamdeluca, drio, thanks a lot!
ElMichael is offline   Reply With Quote
Old 12-01-2010, 09:18 AM   #5
ElMichael
Member
 
Location: UK

Join Date: Jun 2009
Posts: 31
Default

I ran genomeCoverageBed from the bedtools and it was fine. However, I noticed rather strange detail. To run genomeCoverageBed you need to provide a genome file in the following format:
<chromName><TAB><chromSize>

I work with a masked reference genome. Firstly, I provided actual sizes (number of unmasked bases + number of Ns (masked)). In addition, I also made a genome file with sizes without masked bases.
After running genomeCoverageBed with these two different genome files I got the same results.
E.g.,
chr_name 100 102 37
(that is, bases at the positions 101 and 102 on the given chr are covered with 37 reads).
I checked results using IGV, and found out they are true: the count for the bases 101 and 102 is really 37.
The question is: what is the purpose of the genome file, and why the chromSize value doesn't influence on the output (at least, it's my, perhaps, wrong impression)?
ElMichael 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 04:19 PM.


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