Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • rg_gis
    Junior Member
    • Mar 2010
    • 2

    Samtools flagstat on Tophat generated .bam file

    Hi,

    On running the samtools flagstat command on the accepted_hits.bam file generated by tophat, I get the following output:

    13414556 in total
    0 QC failure
    0 duplicates
    13414556 mapped (100.00%)
    0 paired in sequencing
    0 read1
    0 read2
    0 properly paired (nan%)
    0 with itself and mate mapped
    0 singletons (nan%)
    0 with mate mapped to a different chr
    0 with mate mapped to a different chr (mapQ>=5)


    I am not sure why the duplicates are 0, as this run of tophat allws upto 40 mismatches and there are reads which are mapped to several location on the genome.

    Could someone tell me if there is an alternate way to find out the number of unique reads and the distribution of multi mapped reads from the bam file?

    Thanks you.
  • kmcarr
    Senior Member
    • May 2008
    • 1181

    #2
    Samtools flagstat does not inspect the alignments itself when it reports these statistics, it only reads the status flag value associated with each alignment and summarizes that. The flag has a bit which indicates whether or not a read is a duplicate (x0400, or 1024 in decimal). This flag would need to have been set by some other tool which analyzes the S/BAM file for duplicates, e.g. Picard's markDuplicates.

    Also, it seems you are misunderstanding what is meant by a duplicate in NGS mapping experiments. A duplicate does not mean a read which maps to multiple location on the genome. Duplicates refer to multiple reads which map to the identical location on the genome.

    Comment

    • rg_gis
      Junior Member
      • Mar 2010
      • 2

      #3
      Thank you for the reply.. I did misunderstand the meaning of duplicates..

      As far as I have understood, The NH tag of a .sam file is what determines how many locations the read has mapped to ..

      Comment

      • telos
        Member
        • Jan 2010
        • 11

        #4
        Any idea why every single read appears as mapped? Is TopHat not outputting unaligned reads to the bam?

        Comment

        • Jon_Keats
          Senior Member
          • Mar 2010
          • 279

          #5
          Yes Tophat only output the alignments. You can do a line count of your input fastq file "wc -l sequences.fastq" to get total number of reads. Remember to divide the line by 4, as each read is encoded in four lines (read ID, Read Sequence, read ID, Quality values). The fun thing with single end reads is when you end up with 120% mapped! Love the fact that tophat prints the same read multiple times at different locations if the read maps to multiple locations.

          Comment

          • DavidMatthewsBristol
            Junior Member
            • Aug 2010
            • 7

            #6
            Hi all,

            I've been worrying about multihit reads as well. I've put up a workflow on Galaxy that attempts to deal with this by separating the multi hit reads form the unique ones - hope it helps.

            David

            Comment

            • archana2287
              Junior Member
              • Feb 2015
              • 5

              #7
              Originally posted by DavidMatthewsBristol View Post
              Hi all,

              I've been worrying about multihit reads as well. I've put up a workflow on Galaxy that attempts to deal with this by separating the multi hit reads form the unique ones - hope it helps.

              David

              please share link (workflow on galaxy ), that separates the multi hit reads form the unique ones.

              waiting for reply

              Comment

              Latest Articles

              Collapse

              • SEQadmin2
                Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
                by SEQadmin2



                Genomics studies in neuroscience face a special challenge due to the brain’s complexity and scarcity of samples. Mapping changes in cell type and state using conventional next-generation sequencing methods remains challenging. Advances in technologies like single-cell sequencing, spatial transcriptomics, and long-read sequencing have opened the door to deeper studies of the brain and diseases like Alzheimer’s, amyotrophic lateral sclerosis (ALS), and schizophrenia.
                ...
                07-09-2026, 11:10 AM
              • 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...
                07-08-2026, 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

              ad_right_rmr

              Collapse

              News

              Collapse

              Topics Statistics Last Post
              Started by SEQadmin2, 07-13-2026, 10:26 AM
              0 responses
              24 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 07-09-2026, 10:04 AM
              0 responses
              33 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 07-08-2026, 10:08 AM
              0 responses
              20 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 07-07-2026, 11:05 AM
              0 responses
              34 views
              0 reactions
              Last Post SEQadmin2  
              Working...