Go Back   SEQanswers > Bioinformatics > Bioinformatics

Similar Threads
Thread Thread Starter Forum Replies Last Post
SNP call by samtools, but ALT is "X" QUAL is "0" illuminaGA Bioinformatics 1 12-16-2015 11:25 PM
Samtools "is recognized as '*'" "truncated file" error axiom7 Bioinformatics 3 11-26-2014 02:53 AM
MiSeq gDNA reads still fail "Kmer content" and "per base seq content" after trimming" ysnapus Illumina/Solexa 4 11-12-2014 07:25 AM
Using Picard "CalculateHsMetrics" to find coverage stat serenaliao Bioinformatics 0 08-14-2013 10:11 AM
"allele balance ratio" and "quality by depth" in VCF files efoss Bioinformatics 2 10-25-2011 11:13 AM

Thread Tools
Old 07-31-2017, 03:51 PM   #1
Junior Member
Location: houston

Join Date: Feb 2013
Posts: 2
Default what does "average quality" mean in samtools stat

I used samtools stats to measure some basic metrics of a input bam file and got the following results:

raw total sequences: 1105415
filtered sequences: 80516
sequences: 1024899
is sorted: 1
1st fragments: 1024899
last fragments: 0
reads mapped: 940001
reads mapped and paired: 0 # paired-end technology bit set + both mates mapped
reads unmapped: 84898
reads properly paired: 0 # proper-pair bit set
reads paired: 0 # paired-end technology bit set
reads duplicated: 0 # PCR or optical duplicate bit set
reads MQ0: 14800 # mapped and MQ=0
reads QC failed: 0
non-primary alignments: 0
total length: 5395194643 # ignores clipping
bases mapped: 4998712634 # ignores clipping
bases mapped (cigar): 4531562523 # more accurate
bases trimmed: 0
bases duplicated: 0
mismatches: 688215582 # from NM fields
error rate: 1.518716e-01 # mismatches / bases mapped (cigar)
average quality: 19.8
insert size average: 0.0

How was wondering how's the average quality calculated? (It's a bit higher than I expected) Is it related to read's mean base quality? i.e. For each read, calculate its mean base quality, and then take the average of all reads?

Thanks in advance!
charon is offline   Reply With Quote
Old 08-01-2017, 11:20 PM   #2
Devon Ryan
Location: Freiburg, Germany

Join Date: Jul 2011
Posts: 3,480

The base qualities for the whole file are summed and then that's divided by the total number of bases in the file.
dpryan is offline   Reply With Quote
Old 08-02-2017, 10:24 AM   #3
Junior Member
Location: houston

Join Date: Feb 2013
Posts: 2

Makes sense. Thanks dpryan!
charon 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 07:44 PM.

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