Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • yangjr
    Junior Member
    • Apr 2010
    • 6

    #1

    Making sense of tophat output "align_summary.txt"

    I run tophat2 with “-g 20" on some data. As a result, the "align_summary.txt" says
    Reads:
    Input: 92302015
    Mapped: 79916185 (86.6% of input)
    of these: 17726355 (22.2%) have multiple alignments (22103 have >20)
    86.6% overall read alignment rate.
    Then I run some manual checking on the numbers by using samtools on the output "accepted_hits.bam" and "unmapped.bam". I tried
    Code:
    samtools view unmapped.bam | wc -l
    Result is 12385846, looks close enough, although not perfect (12385846 + 79916185 = 92302031).

    Then I tried command (a)
    Code:
    samtools view -f 256 accepted_hits.bam | wc -l
    Result is 15255480

    I also tried command (b)
    Code:
    samtools view -f 256 accepted_hits.bam | cut -f1 | sort | uniq | wc -l
    Result is 13013262

    My understanding about tophat's behavior is that when there are multiple equally good hits, it will randomly pick one hit as "best", and all other hits will be assigned the 256 bit flag (secondary hits). So presumably, if the number 17726355 in "align_summary.txt" is the number of reads, then it should be similar to the result of (b). Or if 17726355 in "align_summary.txt" is the number of hits, it should be at least 2 times the result of (a). But none of my two guesses are correct.

    So my question is, what exactly does the number 17726355 means.

    Please let me know if I missed anything. Thanks all for any comments or suggestions!

    jianrong
  • 11xinqi
    Member
    • Mar 2011
    • 31

    #2
    Originally posted by yangjr View Post
    I run tophat2 with “-g 20" on some data. As a result, the "align_summary.txt" says


    Then I run some manual checking on the numbers by using samtools on the output "accepted_hits.bam" and "unmapped.bam". I tried
    Code:
    samtools view unmapped.bam | wc -l
    Result is 12385846, looks close enough, although not perfect (12385846 + 79916185 = 92302031).

    Then I tried command (a)
    Code:
    samtools view -f 256 accepted_hits.bam | wc -l
    Result is 15255480

    I also tried command (b)
    Code:
    samtools view -f 256 accepted_hits.bam | cut -f1 | sort | uniq | wc -l
    Result is 13013262

    My understanding about tophat's behavior is that when there are multiple equally good hits, it will randomly pick one hit as "best", and all other hits will be assigned the 256 bit flag (secondary hits). So presumably, if the number 17726355 in "align_summary.txt" is the number of reads, then it should be similar to the result of (b). Or if 17726355 in "align_summary.txt" is the number of hits, it should be at least 2 times the result of (a). But none of my two guesses are correct.

    So my question is, what exactly does the number 17726355 means.

    Please let me know if I missed anything. Thanks all for any comments or suggestions!

    jianrong
    Did you get the answer?

    Comment

    • CPCantalapiedra
      Member
      • Sep 2011
      • 38

      #3
      in my case, que I run

      samtools view accepted_hits.bam | cut -f1 | sort | uniq | wc -l

      without the -f 256, the number of reads matches the number stated at align_summary.txt.

      What doesn't make sense to me is the multiple mapping reads, since align_summary.txt number does not coincide with NH:i (>1) nor MAPQ counts.

      Comment

      • marika
        Junior Member
        • Nov 2016
        • 1

        #4
        Hi Guys,
        Is that the output for a paired end alignment?

        Comment

        Latest Articles

        Collapse

        • SEQadmin2
          16S/ITS Profiling vs. Shotgun Metagenomics: What Changes in Your Workflow?
          by SEQadmin2




          NGS has revolutionized clinical microbiology by offering new ways to identify and surveil pathogens without prior knowledge of the target. One popular approach is 16S rRNA and ITS amplicon sequencing, which targets specific microbial markers. But studies are increasingly incorporating shotgun metagenomics, a technique that sequences all DNA from a sample without targeting specific microbial markers. This approach allows more detailed taxonomic classification, detection...
          Today, 06:46 AM
        • 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

        ad_right_rmr

        Collapse

        News

        Collapse

        Topics Statistics Last Post
        Started by SEQadmin2, 10-28-2026, 09:57 AM
        0 responses
        22 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 10-28-2026, 09:51 AM
        0 responses
        14 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 10-22-2026, 11:13 AM
        0 responses
        67 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 10-22-2026, 10:48 AM
        0 responses
        47 views
        0 reactions
        Last Post SEQadmin2  
        Working...