Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • samtools pileup coverage

    I have a BAM with duplicates marked by picard. When I run pileup with concensus calling on the BAM, pileup reports coverages without the duplicates. I'm pretty certain about that because i did a "samtools view bam chrX:xxx-xxx | wc -l " to count the number of reads in a BAM and it's much more than what pileup reported

    I couldn't find any documentation that says samtools pileup excludes duplicated marked reads in its calculation of coverage. Is there anyway to make pileup include duplicates marked reads in the coverage?

    Thanks.

  • #2
    Originally posted by guavajuice View Post
    I have a BAM with duplicates marked by picard. When I run pileup with concensus calling on the BAM, pileup reports coverages without the duplicates. I'm pretty certain about that because i did a "samtools view bam chrX:xxx-xxx | wc -l " to count the number of reads in a BAM and it's much more than what pileup reported

    I couldn't find any documentation that says samtools pileup excludes duplicated marked reads in its calculation of coverage. Is there anyway to make pileup include duplicates marked reads in the coverage?

    Thanks.
    See the "-m" option that remove reads with certain bits set in the flag (like PCR duplicates). Modify however you want.

    Comment


    • #3
      samtools pileup process reads by pushing them in a pileup buffer. one of the conditions it goes through before pushing is to check the the read flag variable "flag_mask" in the pileup buffer structure

      The flag_mask is defined when
      1) mate is unmapped
      2) not primary alignment
      3) QC failture
      4) optical or PCR duplicate

      so it bascially won't include duplicates in a pileup unless you rewrite that condition and compile samtools yourself.

      For my case, if i want duplicates read to be reported in samtools, i'll have to run pileup on the BAM before marking it with duplicates.

      Comment


      • #4
        After apply MarkDuplicate on bam file from bwa alignment, samtools flagstat can detect the number of duplicates, how to setup the QC flag for samtools to detect? In my case samtools always detects 0 QC failure.

        Thanks

        Comment


        • #5
          use "-m 772"

          Comment

          Latest Articles

          Collapse

          • seqadmin
            Advancing Precision Medicine for Rare Diseases in Children
            by seqadmin




            Many organizations study rare diseases, but few have a mission as impactful as Rady Children’s Institute for Genomic Medicine (RCIGM). “We are all about changing outcomes for children,” explained Dr. Stephen Kingsmore, President and CEO of the group. The institute’s initial goal was to provide rapid diagnoses for critically ill children and shorten their diagnostic odyssey, a term used to describe the long and arduous process it takes patients to obtain an accurate...
            12-16-2024, 07:57 AM
          • seqadmin
            Recent Advances in Sequencing Technologies
            by seqadmin



            Innovations in next-generation sequencing technologies and techniques are driving more precise and comprehensive exploration of complex biological systems. Current advancements include improved accessibility for long-read sequencing and significant progress in single-cell and 3D genomics. This article explores some of the most impactful developments in the field over the past year.

            Long-Read Sequencing
            Long-read sequencing has seen remarkable advancements,...
            12-02-2024, 01:49 PM

          ad_right_rmr

          Collapse

          News

          Collapse

          Topics Statistics Last Post
          Started by seqadmin, 12-17-2024, 10:28 AM
          0 responses
          23 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 12-13-2024, 08:24 AM
          0 responses
          42 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 12-12-2024, 07:41 AM
          0 responses
          28 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 12-11-2024, 07:45 AM
          0 responses
          42 views
          0 likes
          Last Post seqadmin  
          Working...
          X