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
                New Genomics Technologies Take Aim at Long-Standing Limits
                by SEQadmin2


                Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

                We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
                ...
                Yesterday, 10:25 AM
              • SEQadmin2
                How Immunogenomics Decodes Immunity’s Genetic Blueprint
                by SEQadmin2




                The immune system’s power comes from its genetic diversity, allowing myriad threats to be neutralized through first recognizing foreign antigens. That diversity is also what makes the immune system so difficult to study. Recent advances in sequencing technology and computational biology, however, are giving researchers new tools to understand immune responses and immune-related diseases in greater detail.

                This convergence of genetics, immunology, and computation...
                09-01-2026, 05:41 AM

              ad_right_rmr

              Collapse

              News

              Collapse

              Topics Statistics Last Post
              Started by SEQadmin2, Today, 09:51 AM
              0 responses
              10 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 09-25-2026, 09:06 AM
              0 responses
              32 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 09-23-2026, 11:05 AM
              0 responses
              27 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 09-18-2026, 11:37 AM
              1 response
              48 views
              0 reactions
              Last Post pekgio
              by pekgio
               
              Working...