Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rjp
    Junior Member
    • Jan 2011
    • 2

    #1

    mpileup with -r option reports different number of reads at a site depending on regio

    Hi,

    I am using mpileup (samtools v0.1.16 (r963:234)) with the -r option to specify the size of a region for which the pileup should be generated. Thereby, I noticed that the number of reads covering a position of interest changes with increasing size of the specified region.

    For example if I'm interested in the bases and qualities at position 119121582 on chromosome 12 I get for

    a single position:
    Code:
    samtools mpileup -f reference-genome.fa -r chr12:11912[COLOR="DarkSlateGray"]1582[/COLOR]-11912[COLOR="DarkSlateGray"]1582[/COLOR] input.bam | grep 119121582 | awk '{print $4}'
    > 8007 reads covering that site


    a region of 10 bases:
    Code:
    samtools mpileup -f reference-genome.fa -r chr12:11912[COLOR="DarkSlateGray"]1580[/COLOR]-11912[COLOR="DarkSlateGray"]1590[/COLOR] input.bam | grep 119121582 | awk '{print $4}'
    > 7584 reads covering that site


    region of 1000 bases:
    Code:
    samtools mpileup -f reference-genome.fa -r chr12:11912[COLOR="DarkSlateGray"]1000[/COLOR]-11912[COLOR="DarkSlateGray"]2000[/COLOR] input.bam | grep 119121582 | awk '{print $4}'
    > 6661 reads covering that site

    This ultimately also means that when running mpileup without the -r option on the whole bam file, 6661 reads at that site are being reported while in total 8007 seem to cover it.
    I would have assumed that no matter which size of a region I choose around a site, this particular site will always be covered by the same number of reads which are reported in the pileup format. Could anyone explain to me why this is not the case?

    Thanks a lot in advance
  • DZhang
    Senior Member
    • Jun 2010
    • 177

    #2
    Hi rjp,

    The original author(s) may give you the definite answer. It may have something to do with whether to include reads only partially aligned to the specified region. You may try 100 bases and 500 bases. My guess is that once the region gets big enough (say twice of the read length), the read count will stay the same. Give it a try and let us know!

    Douglas

    Comment

    • lh3
      Senior Member
      • Feb 2008
      • 686

      #3
      That is because of BAQ and a technical issue when loading the reference. If you just do counting, use "-ABQ0" or better the "depth" command.

      Comment

      • rjp
        Junior Member
        • Jan 2011
        • 2

        #4
        I tried -ABQ0 and also the depth command, but both give me the same results as described above. Can it be that there is something wrong with my bam file?

        I'm interested in the nucleotides and qualities at a position so only having the depth is not enough.
        Last edited by rjp; 06-09-2011, 10:38 PM.

        Comment

        Latest Articles

        Collapse

        • SEQadmin2
          The Factors Reshaping Genome Assembly
          by SEQadmin2



          When the Human Genome Project declared the human genome finished in 2003, portions of the sequence were still missing, including many of its most repetitive and structurally complex regions.1 Still, for the next two decades, researchers analyzed their sequencing data against the single linear reference that came out of this effort. Released in 2013 as GRCh38, that reference has powered countless discoveries, but it has gaps and cannot capture the genetic diversity of the world’s...
          11-24-2026, 07:04 AM
        • SEQadmin2
          16S/ITS Profiling vs. Shotgun Metagenomics: What Changes in Your Workflow?
          by SEQadmin2





          NGS has revolutionized clinical microbiology by offering new ways to identify and surveil pathogens without prior knowledge of the target. One popular approach is 16S rRNA and ITS amplicon sequencing, which targets specific microbial markers. But studies are increasingly incorporating shotgun metagenomics, a technique that sequences all DNA from a sample without targeting specific microbial markers. This approach allows more detailed taxonomic classification,...
          10-30-2026, 06:46 AM

        ad_right_rmr

        Collapse

        News

        Collapse

        Topics Statistics Last Post
        Started by SEQadmin2, 11-23-2026, 11:11 AM
        0 responses
        28 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 11-17-2026, 06:27 AM
        0 responses
        41 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 11-12-2026, 07:59 AM
        0 responses
        61 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 11-05-2026, 09:25 AM
        0 responses
        67 views
        0 reactions
        Last Post SEQadmin2  
        Working...