Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • repinementer
    Member
    • Dec 2009
    • 80

    How to count number of mapped paired-end and single-end rna-seq reads

    Does any one know know, how to count number of mapped paired-end and single-end rna-seq reads using BAM files.
    It seems samtools idx stats does not give exactly mapped reads information ? Any suggestion will be appreciated!
  • rdeborja
    Member
    • Aug 2008
    • 42

    #2
    Try using samtools flagstat.

    Comment

    • repinementer
      Member
      • Dec 2009
      • 80

      #3
      that gives the no.of mapped loci but not mapped reads.

      Comment

      • rdeborja
        Member
        • Aug 2008
        • 42

        #4
        It generates a summary of reads based on the SAM FLAG in column 2 of the BAM file:

        4255310402 + 0 in total (QC-passed reads + QC-failed reads)
        0 + 0 duplicates
        4252238423 + 0 mapped (99.93%:nan%)
        4255310402 + 0 paired in sequencing
        2102851470 + 0 read1
        2152458932 + 0 read2
        362406042 + 0 properly paired (8.52%:nan%)
        4217472878 + 0 with itself and mate mapped
        34765545 + 0 singletons (0.82%:nan%)
        3616654841 + 0 with mate mapped to a different chr
        3273787 + 0 with mate mapped to a different chr (mapQ>=5)

        Comment

        • repinementer
          Member
          • Dec 2009
          • 80

          #5
          99.93% mapping ? I think it is not referring 99.93% of your reads are mapped. 100% mapping is not possible or at least too good be true.

          Comment

          • rdeborja
            Member
            • Aug 2008
            • 42

            #6
            Yes, 99.93% read mapping, although it doesn't include the quality of the mapping. You'll have to look that up in the BAM file independently.
            Last edited by rdeborja; 01-05-2013, 03:42 PM.

            Comment

            • repinementer
              Member
              • Dec 2009
              • 80

              #7
              If you look at any published studies (2010-12), you will typically see 80-90% but not ~100%. What thats tells ? Tophat always reports 100%. Something wrong isn't it ?

              Comment

              • dariober
                Senior Member
                • May 2010
                • 311

                #8
                Originally posted by repinementer View Post
                If you look at any published studies (2010-12), you will typically see 80-90% but not ~100%. What thats tells ? Tophat always reports 100%. Something wrong isn't it ?
                There's nothing wrong there. If I remember correctly Tophat produces bam files containing only the mapped reads (accepted_hits.bam). The unmapped reads are written to a separate file I think. That's the reason why the bam files have 100% mapped reads (in fact it shoud be 100% not ~99%).

                Dario

                Comment

                • kopi-o
                  Senior Member
                  • Feb 2008
                  • 319

                  #9
                  I find it helpful to use bam_stat.py from RSeQC or Picard's CollectAlignmentSummaryMetrics to get the number of reads that mapped one or more times (which you don't get from flagstat)

                  Comment

                  Latest Articles

                  Collapse

                  • SEQadmin2
                    Cancer Drug Resistance: The Lingering Barrier to Rising Survival
                    by SEQadmin2



                    Cancer survival rates have significantly increased in the last few decades in the United States, reaching a combined 70% 5-year survival rate by 2021. Behind this number, there are years of research to find new therapies, drug targets, and early detection methods. But there is one core challenge that keeps slowing down these advances, and it’s about drug resistance.

                    There is no single reason why many patients don’t respond to treatment as expected. Cancer is...
                    Yesterday, 05:17 AM
                  • GATTACAT
                    Reply to Nine Things a Sample Prep Scientist Thinks About Before Sequencing
                    by GATTACAT
                    Love this - good data definitely starts from good input, and poor input can only give relatively poor data. I particularly like the mention of Nanodrop/absorbance based methods for quantification. It's such a toss up if you'll get an accurate reading or what amounts to a randomly generated number, and a lot of library/sequencing related issues can be traced back to poor quant.
                    07-01-2026, 11:43 AM
                  • SEQadmin2
                    Nine Things a Sample Prep Scientist Thinks About Before Sequencing
                    by SEQadmin2


                    I’m not a sequencing expert. I’m a purification scientist who uses NGS to evaluate workflows my group develops. With this perspective, we think about the sample first and the NGS workflow second. The sequencer is an exceptionally honest reporter, but it can only report on what you give it, so whether you get clean, interpretable data from an NGS workflow is largely determined before you begin.

                    Here are nine questions we think about, in roughly the order they matter, before...
                    06-18-2026, 07:11 AM

                  ad_right_rmr

                  Collapse

                  News

                  Collapse

                  Topics Statistics Last Post
                  Started by SEQadmin2, Yesterday, 10:08 AM
                  0 responses
                  6 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, 07-07-2026, 11:05 AM
                  0 responses
                  8 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, 07-02-2026, 11:08 AM
                  0 responses
                  31 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, 06-30-2026, 05:37 AM
                  0 responses
                  29 views
                  0 reactions
                  Last Post SEQadmin2  
                  Working...