Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • charon
    Junior Member
    • Feb 2013
    • 2

    #1

    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!
  • dpryan
    Devon Ryan
    • Jul 2011
    • 3478

    #2
    The base qualities for the whole file are summed and then that's divided by the total number of bases in the file.

    Comment

    • charon
      Junior Member
      • Feb 2013
      • 2

      #3
      Makes sense. Thanks dpryan!

      Comment

      Latest Articles

      Collapse

      • SEQadmin2
        Multiomic Liquid Biopsy: What DNA/RNA Panels Reveal That DNA Alone Can’t
        by SEQadmin2



        Tumors contain complex mixtures of cell populations that evolve in response to treatment and host-specific factors. Tissue biopsies provide only static snapshots of a tumor’s state. But what if we could follow that evolution over time using a minimally invasive technique?

        Liquid biopsies can detect tumor-derived material circulating in the bloodstream, providing a way to study treatment response, detect emerging resistance, and discover new biomarkers. Circulating
        ...
        10-14-2026, 09:55 AM
      • SEQadmin2
        New Genomics Technologies Take Aim at Long-Standing Limits
        by SEQadmin2


        Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

        We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
        ...
        09-28-2026, 10:25 AM

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by SEQadmin2, 10-22-2026, 11:13 AM
      0 responses
      27 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 10-22-2026, 10:48 AM
      0 responses
      20 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 10-15-2026, 10:52 AM
      0 responses
      36 views
      0 reactions
      Last Post SEQadmin2  
      Started by SEQadmin2, 10-14-2026, 05:39 AM
      0 responses
      43 views
      0 reactions
      Last Post SEQadmin2  
      Working...