Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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.

  • #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


    • #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


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

        Comment


        • #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


          • #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


            • #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

              • seqadmin
                Strategies for Sequencing Challenging Samples
                by seqadmin


                Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
                03-22-2024, 06:39 AM
              • seqadmin
                Techniques and Challenges in Conservation Genomics
                by seqadmin



                The field of conservation genomics centers on applying genomics technologies in support of conservation efforts and the preservation of biodiversity. This article features interviews with two researchers who showcase their innovative work and highlight the current state and future of conservation genomics.

                Avian Conservation
                Matthew DeSaix, a recent doctoral graduate from Kristen Ruegg’s lab at The University of Colorado, shared that most of his research...
                03-08-2024, 10:41 AM

              ad_right_rmr

              Collapse

              News

              Collapse

              Topics Statistics Last Post
              Started by seqadmin, 03-27-2024, 06:37 PM
              0 responses
              12 views
              0 likes
              Last Post seqadmin  
              Started by seqadmin, 03-27-2024, 06:07 PM
              0 responses
              11 views
              0 likes
              Last Post seqadmin  
              Started by seqadmin, 03-22-2024, 10:03 AM
              0 responses
              53 views
              0 likes
              Last Post seqadmin  
              Started by seqadmin, 03-21-2024, 07:32 AM
              0 responses
              69 views
              0 likes
              Last Post seqadmin  
              Working...
              X