Unconfigured Ad

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

    #1

    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
                Beyond CRISPR/Cas9: Understand, Choose, and Use the Right Genome Editing Tool
                by SEQadmin2



                CRISPR/Cas9 sparked the gene editing revolution for both research and therapeutics.1 But this system still showed severe issues that limited its applications. The most prominent were the heavy reliance on PAM sequences, delivery limitations, double-stranded breaks that prompt unintended edits and cell death, and editing inefficiency (both in targeting and in knock-in reliability).

                Despite this, “CRISPR helped turn genome editing from a specialized technique into
                ...
                Yesterday, 11:01 AM
              • SEQadmin2
                Proteomic Platforms: How to Choose the Right Analytical Strategy to Improve Detection and Clinical Applications
                by SEQadmin2


                Proteomics platforms are evolving rapidly, with advances in mass spectrometry and affinity-based approaches expanding what researchers can detect and at what scale. As the field moves toward deeper proteome coverage and clinical applications, scientists face an increasingly complex landscape of tools. This article will explore how researchers are navigating these choices to find the right platform for their work.

                The systematic characterization of the human proteome has
                ...
                07-20-2026, 11:48 AM
              • 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

              ad_right_rmr

              Collapse

              News

              Collapse

              Topics Statistics Last Post
              Started by SEQadmin2, Yesterday, 02:55 AM
              0 responses
              9 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 07-24-2026, 12:17 PM
              0 responses
              12 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 07-23-2026, 11:41 AM
              0 responses
              12 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 07-20-2026, 11:10 AM
              0 responses
              24 views
              0 reactions
              Last Post SEQadmin2  
              Working...