Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #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


    • #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


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

        Comment

        Latest Articles

        Collapse

        • seqadmin
          Quality Control Essentials for Next-Generation Sequencing Workflows
          by seqadmin




          Like all molecular biology applications, next-generation sequencing (NGS) workflows require diligent quality control (QC) measures to ensure accurate and reproducible results. Proper QC begins at nucleic acid extraction and continues all the way through to data analysis. This article outlines the key QC steps in an NGS workflow, along with the commonly used tools and techniques.

          Nucleic Acid Quality Control
          Preparing for NGS starts with isolating the...
          02-10-2025, 01:58 PM
        • seqadmin
          An Introduction to the Technologies Transforming Precision Medicine
          by seqadmin


          In recent years, precision medicine has become a major focus for researchers and healthcare professionals. This approach offers personalized treatment and wellness plans by utilizing insights from each person's unique biology and lifestyle to deliver more effective care. Its advancement relies on innovative technologies that enable a deeper understanding of individual variability. In a joint documentary with our colleagues at Biocompare, we examined the foundational principles of precision...
          01-27-2025, 07:46 AM

        ad_right_rmr

        Collapse

        News

        Collapse

        Topics Statistics Last Post
        Started by seqadmin, 02-07-2025, 09:30 AM
        0 responses
        72 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 02-05-2025, 10:34 AM
        0 responses
        113 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 02-03-2025, 09:07 AM
        0 responses
        90 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 01-31-2025, 08:31 AM
        0 responses
        49 views
        0 likes
        Last Post seqadmin  
        Working...
        X