Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • TabeaK
    Member
    • Oct 2012
    • 48

    #1

    Samtools mpileup - why does it call an "N" when there ARE correct alignments?

    Hi all!

    Happy 2013!

    I am having a bit of an issue with generating consensus sequences from an Alignment BAM file.

    The alignment was done with Stampy. It is a mix of single end and paired end data. Looking at the BAM in IGV shows me I have good coverage across the board and reasonable mapping qualites.

    I then do the routine samtools mpileup (using -u -f -r paramters; also tried the -A); then bcftools view (- c -g ); followed by conversion to fastq and ultimately fasta.

    In my consensus fasta however; I have an inordinate amount of Ns; even in positions; where I can clearly see correct alignment/mapping.

    Does anyone know when mpileup is calling an N and what I might be doing wrong?

    Funnily enough; I have aligned the exact same data with BWA and done the same process; even though BWA maps less reads properly; with lower mapping quality and coverage; calling the consensus only spits out Ns if there is either no coverage at a given position or there is already an N in the reference.

    So, why is this not working from my stampy-generated BAM?
    Argh!

    Any other recommendations for tools to generate consensus sequences?
  • TabeaK
    Member
    • Oct 2012
    • 48

    #2
    Bumpety-bump.

    Comment

    • TabeaK
      Member
      • Oct 2012
      • 48

      #3
      Ha! I think this is the problem: http://seqanswers.com/forums/showthread.php?t=17486

      I also get only 'N' in the ref column...no I just need to figure out what the hell is going on.

      Comment

      • TabeaK
        Member
        • Oct 2012
        • 48

        #4
        Okay, problem solved...

        This little thing:

        11.2 Parsing NCBI fasta files

        NCBI fasta files use a >gi|nnn|ref|xxx identifier. By default
        Stampy parses this and uses only the "xxx" part. Use --noparseNCBI
        to switch off this behaviour and use the full NCBI identifier.


        from the stampy manual broke my neck. In the BAM file created with Stampy; the identifiers were parse. While creating the fasta index; however samtools; DOES NOT parse. Ergo the identifers did not match.

        I had to do some rather elaborate messing around with the reference fasta to get the strings to match...*sigh*
        All good in the end....just in case anyone runs into this problem in the future.

        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, 10-22-2026, 11:13 AM
        0 responses
        26 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 10-22-2026, 10:48 AM
        0 responses
        20 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
        43 views
        0 reactions
        Last Post SEQadmin2  
        Working...