Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • 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?

  • #2
    Bumpety-bump.

    Comment


    • #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


      • #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

        • seqadmin
          Strategies for Sequencing Challenging Samples
          by seqadmin


          Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
          03-22-2024, 06:39 AM
        • seqadmin
          Techniques and Challenges in Conservation Genomics
          by seqadmin



          The field of conservation genomics centers on applying genomics technologies in support of conservation efforts and the preservation of biodiversity. This article features interviews with two researchers who showcase their innovative work and highlight the current state and future of conservation genomics.

          Avian Conservation
          Matthew DeSaix, a recent doctoral graduate from Kristen Ruegg’s lab at The University of Colorado, shared that most of his research...
          03-08-2024, 10:41 AM

        ad_right_rmr

        Collapse

        News

        Collapse

        Topics Statistics Last Post
        Started by seqadmin, Yesterday, 06:37 PM
        0 responses
        11 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, Yesterday, 06:07 PM
        0 responses
        10 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 03-22-2024, 10:03 AM
        0 responses
        51 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 03-21-2024, 07:32 AM
        0 responses
        68 views
        0 likes
        Last Post seqadmin  
        Working...
        X