Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • help calculating unique mapping rate for paired end

    Hi Everyone!

    I am writing down some stats for my RNAseq data.
    Briefly, I have used Tophat2+samtools+HTSeq count for mapping and gene counting (PE, GRCh37).

    When i check the samtools flagstat everything looks terrific...great mapping rates as well as pairing between reads.

    I was trying to get my unique mapping rates stats:
    I've been using the accepted_hits.bam file and run

    samtools view accepted_hits.bam | cut -f1 | sort | uniq | wc -l


    My naive question is:
    the number I get, is it considering the pair or the number of reads???

    Anyone has a better solution for counting unique mapping rate for PE?

    Thanks!

    Manu

  • #2
    If you're talking about unique with regards to mapping positions on both ends, how about marking duplicates using Picard's MarkDuplicates tool, then using samtools flagstat? You can subtract the duplicate reads from the mapped reads to get the number of non-duplicate mapped reads.

    Comment


    • #3
      I would strongly discourage you from marking duplicates in RNAseq data, as the alleged duplicates will primarily be false positives.

      Anyway, tophat2 will set the MAPQ to 0,1,2, or 50 (or something like that) depending on the number of best hits a read/pair has. If an alignment has a MAPQ of 50, then it maps uniquely (for some definitions of "uniquely mapping"). So just "samtools view -c -q 40 foo.bam" for the number of alignments. This counts both reads in a pair separately, so divide by 2 for an approximate number of read pairs ("approximate" in the case of singletons).

      Comment

      Latest Articles

      Collapse

      • seqadmin
        Latest Developments in Precision Medicine
        by seqadmin



        Technological advances have led to drastic improvements in the field of precision medicine, enabling more personalized approaches to treatment. This article explores four leading groups that are overcoming many of the challenges of genomic profiling and precision medicine through their innovative platforms and technologies.

        Somatic Genomics
        “We have such a tremendous amount of genetic diversity that exists within each of us, and not just between us as individuals,”...
        Yesterday, 01:16 PM
      • seqadmin
        Recent Advances in Sequencing Analysis Tools
        by seqadmin


        The sequencing world is rapidly changing due to declining costs, enhanced accuracies, and the advent of newer, cutting-edge instruments. Equally important to these developments are improvements in sequencing analysis, a process that converts vast amounts of raw data into a comprehensible and meaningful form. This complex task requires expertise and the right analysis tools. In this article, we highlight the progress and innovation in sequencing analysis by reviewing several of the...
        05-06-2024, 07:48 AM

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by seqadmin, Yesterday, 07:15 AM
      0 responses
      12 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 05-23-2024, 10:28 AM
      0 responses
      15 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 05-23-2024, 07:35 AM
      0 responses
      16 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 05-22-2024, 02:06 PM
      0 responses
      8 views
      0 likes
      Last Post seqadmin  
      Working...
      X