Go Back   SEQanswers > Bioinformatics > Bioinformatics

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Estimate the Average Coverage per RAD Locus fcr De novo discovery 11 02-08-2012 01:58 AM
Average Read Coverage for 454 paired end read data lisa1102 Core Facilities 8 10-18-2011 08:40 AM
SOLID 5500 - average coverage - rare events nork SOLiD 0 07-21-2011 11:54 PM
NEw to Chip-seq and have .bam/.sam/.bam.bai files... then what? NGS newbie Bioinformatics 11 05-25-2011 07:48 AM
Extracting base coverage and quality values from BAM files unagaswamy Bioinformatics 9 11-11-2010 06:55 AM

Thread Tools
Old 05-11-2012, 01:20 AM   #1
Location: Netherlands

Join Date: Apr 2011
Posts: 15
Default How to get average coverage from BAM files?


I have a major DNA database of many BAM files.

Now, I would like to know the average coverage of each BAM file. Then, I can rank all those BAM files with on number 1 the BAM file with the highest average coverage.

My question is: Does someone know how to get the average coverage of a BAM file in its fastest way?
Martino is offline   Reply With Quote
Old 05-11-2012, 04:29 AM   #2
Senior Member
Location: Cambridge, UK

Join Date: May 2010
Posts: 311

What do you mean exactly by coverage? Is it just the total number of mapped reads divided by the size of the reference genome? If so you could get the number of mapped reads with:

samtools view -c -F 4 myfile.bam
And divide this number by the genome size.

If the bam files are indexed the fastest way to get the number of mapped reads on each chromosome is:

samtools idxstats myfile.bam
All the best
dariober is offline   Reply With Quote
Old 05-11-2012, 07:44 AM   #3
Location: USA

Join Date: Mar 2012
Posts: 21

GATK DepthOfCoverage module should do this for you and its pretty neat to use.
SeekAnswers 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 03:09 AM.

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