Announcement

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

  • samtools mpileup and duplicate reads

    Hi,

    By default, samtools mpileup ignores reads flagged as duplicates (i.e., marked with bit flag 1024 in the BAM). Does anyone know of a way of getting samtools to include duplicates in the mpileup output without having to strip the 1024 flag from the original BAM first?

    Many thanks.

  • #2
    Looks like one way is to change the code for a "one-off" special purpose mission. Make a new copy of samtools. Keep it separate from the real samtools.

    Do this ....
    Edit bam_plp_init() function in bam_pileup.c

    bam_plp_t bam_plp_init(bam_plp_auto_f func, void *data)
    {
    bam_plp_t iter;
    iter = calloc(1, sizeof(struct __bam_plp_t));
    iter->mp = mp_init();
    iter->head = iter->tail = mp_alloc(iter->mp);
    iter->dummy = mp_alloc(iter->mp);
    iter->max_tid = iter->max_pos = -1;
    iter->flag_mask = BAM_DEF_MASK;
    iter->flag_mask &= ~BAM_FDUP; // ADD THIS LINE turn off dupe flag

    make and your ready. Just point to the right version.
    Last edited by Richard Finney; 08-23-2012, 01:21 PM.

    Comment


    • #3
      That's brilliant Richard, exactly what I needed. Will give it a go. Cheers!

      Comment

      Latest Articles

      Collapse

      • seqadmin
        Advanced Tools Transforming the Field of Cytogenomics
        by seqadmin


        At the intersection of cytogenetics and genomics lies the exciting field of cytogenomics. It focuses on studying chromosomes at a molecular scale, involving techniques that analyze either the whole genome or particular DNA sequences to examine variations in structure and behavior at the chromosomal or subchromosomal level. By integrating cytogenetic techniques with genomic analysis, researchers can effectively investigate chromosomal abnormalities related to diseases, particularly...
        09-26-2023, 06:26 AM
      • seqadmin
        How RNA-Seq is Transforming Cancer Studies
        by seqadmin



        Cancer research has been transformed through numerous molecular techniques, with RNA sequencing (RNA-seq) playing a crucial role in understanding the complexity of the disease. Maša Ivin, Ph.D., Scientific Writer at Lexogen, and Yvonne Goepel Ph.D., Product Manager at Lexogen, remarked that “The high-throughput nature of RNA-seq allows for rapid profiling and deep exploration of the transcriptome.” They emphasized its indispensable role in cancer research, aiding in biomarker...
        09-07-2023, 11:15 PM

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by seqadmin, Yesterday, 07:14 AM
      0 responses
      11 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 09-29-2023, 09:38 AM
      0 responses
      13 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 09-27-2023, 06:57 AM
      0 responses
      14 views
      0 likes
      Last Post seqadmin  
      Started by seqadmin, 09-26-2023, 07:53 AM
      0 responses
      31 views
      0 likes
      Last Post seqadmin  
      Working...
      X