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
          Best Practices for Single-Cell Sequencing Analysis
          by seqadmin



          While isolating and preparing single cells for sequencing was historically the bottleneck, recent technological advancements have shifted the challenge to data analysis. This highlights the rapidly evolving nature of single-cell sequencing. The inherent complexity of single-cell analysis has intensified with the surge in data volume and the incorporation of diverse and more complex datasets. This article explores the challenges in analysis, examines common pitfalls, offers...
          06-06-2024, 07:15 AM
        • seqadmin
          Latest Developments in Precision Medicine
          by seqadmin



          Technological advances have led to drastic improvements in the field of precision medicine, enabling more personalized approaches to treatment. This article explores four leading groups that are overcoming many of the challenges of genomic profiling and precision medicine through their innovative platforms and technologies.

          Somatic Genomics
          “We have such a tremendous amount of genetic diversity that exists within each of us, and not just between us as individuals,”...
          05-24-2024, 01:16 PM

        ad_right_rmr

        Collapse

        News

        Collapse

        Topics Statistics Last Post
        Started by seqadmin, Yesterday, 06:58 AM
        0 responses
        13 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 06-06-2024, 08:18 AM
        0 responses
        20 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 06-06-2024, 08:04 AM
        0 responses
        18 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 06-03-2024, 06:55 AM
        0 responses
        13 views
        0 likes
        Last Post seqadmin  
        Working...
        X