Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • StefanP
    Member
    • Oct 2011
    • 10

    #1

    samtools mpileup consensus calls A instead of a gap

    Hello,

    I'm using samtools with the following command to call the consensus of my mapping:

    samtools mpileup -uf Ref SEQ | bcftools view -cg - | vcfutils.pl vcf2fq > SEQ.fq

    The problem is that I have sequences that have 1 and some have 2 copies of a short repeat - the reference has 2. If I use the reference with 2 copies I end up with 2 copies in the consensus since it sometimes maps the reads to the first and sometimes to the second copy of the repeat. So I exchanged one copy in the reference with N's., but end up with A's instead of the gap in the consensus.

    Example:

    Ref AANNNTATTATTA
    Read1 AA---TATTATTA
    Read2 AA---TATTATTA

    it calls AAAAATATTATTA instead of AATATTATTA.

    I also get the following error if I use the reference with N's instead of the second copy (that I don't get if I use the reference with 2 copies):

    Unknown command "vcf2fq".


    I've had the same problem with the previous pileup function!

    Any idea how to change that?

    Cheers,
    Stefan
  • maubp
    Peter (Biopython etc)
    • Jul 2009
    • 1544

    #2
    I wonder if this is an issue with treating N in the reference as A, or down to the fact that the reads have an A before the gap? Do you have some other examples with different bases used instead of the N's?

    Comment

    • StefanP
      Member
      • Oct 2011
      • 10

      #3
      Hi,

      Replacing "N" by "-" seams to help. It looks like it's really reading N's as A's.

      Thanks!

      Stefan

      Comment

      • maubp
        Peter (Biopython etc)
        • Jul 2009
        • 1544

        #4
        So if you replaced the "N" with "C" or "T" or "G" do you get those letters instead of "A"? That would pretty much confirm the nature of this bug / design limitation, and give a good clue about where in the code to start looking.

        Reminds me of this tweet from Vince Buffalo,
        ‏@vsbuffalo: Any time you only handle A, T, C, or G, the members of IUPAC kill an innocent kitten. We've all done it. #bioinfo
        Any time you only handle A, T, C, or G, the members of IUPAC kill an innocent kitten. We've all done it. #bioinfo
        Last edited by maubp; 12-01-2012, 06:16 AM. Reason: formatting

        Comment

        • StefanP
          Member
          • Oct 2011
          • 10

          #5
          Hi,

          Yes, I checked and it calls the reference in case the position is not covered by any read.

          I should probably report that as a bug.

          Thanks!

          Stefan

          Comment

          • StefanP
            Member
            • Oct 2011
            • 10

            #6
            It seams they changed it a little bit since the pileup function, which also interprets "-" as "A", but didn't fully resolve the problem.

            Cheers,
            Stefan

            Comment

            • StefanP
              Member
              • Oct 2011
              • 10

              #7
              It seams to be a problem only when positions are "covered" by gaps in the read. Since it's calling N in the consensus if the position is not covered by a single read.

              Stefan

              Comment

              Latest Articles

              Collapse

              • SEQadmin2
                Multiomic Liquid Biopsy: What DNA/RNA Panels Reveal That DNA Alone Can’t
                by SEQadmin2



                Tumors contain complex mixtures of cell populations that evolve in response to treatment and host-specific factors. Tissue biopsies provide only static snapshots of a tumor’s state. But what if we could follow that evolution over time using a minimally invasive technique?

                Liquid biopsies can detect tumor-derived material circulating in the bloodstream, providing a way to study treatment response, detect emerging resistance, and discover new biomarkers. Circulating
                ...
                10-14-2026, 09:55 AM
              • SEQadmin2
                New Genomics Technologies Take Aim at Long-Standing Limits
                by SEQadmin2


                Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

                We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
                ...
                09-28-2026, 10:25 AM

              ad_right_rmr

              Collapse

              News

              Collapse

              Topics Statistics Last Post
              Started by SEQadmin2, Yesterday, 11:13 AM
              0 responses
              17 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, Yesterday, 10:48 AM
              0 responses
              18 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 10-15-2026, 10:52 AM
              0 responses
              36 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 10-14-2026, 05:39 AM
              0 responses
              42 views
              0 reactions
              Last Post SEQadmin2  
              Working...