Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • Many Ns in samtools mpileup

    Hi,

    I am trying to wrangle samtools into giving me a consensus, using reads mapped with bwa to a reference. After I generate a BAM, the results look pretty good using samtools tview:


    So, there is good coverage, etc.

    Now, when I try to generat a consensus, for example, by

    Code:
    samtools  pileup -6Aug sorted.bam |bcftools view -cg - | vcfutils.pl vcf2fq
    I get a whole lot of Ns in my consensus

    Code:
    @gi|159883886|emb|CU329670.1|
    nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
    nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
    nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
    nnnnnnnnnnnnnnnnnnnn
    +
    !!!!@@@@@@@@@@CEEEHHHHHHHHHHHHHHNKKNKQQQWWWWWWccux{{{{{~~~~~
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ~~~~~~~~~~~~~~~~~~~~
    I swear, I tried every combination of samtools and bcftools I could think of. Adding a reference sequence also doesn't make any difference. Any ideas would be most very much appreciated.

    Sasha

  • #2
    You didn't provide the reference sequences when calling pileup? If that's the case, all the ref bases are Ns and you probably wouldn't get the right consensus.

    Comment


    • #3
      Unfortunately, having a reference doesn't help:
      Code:
      samtools  mpileup -6Augf sequence.fasta -r "gi|159883886|emb|CU329670.1|:1-200"  sorted.bam |bcftools view -cg - | vcfutils.pl vcf2fq
      
      @gi|159883886|emb|CU329670.1|
      nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
      nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
      nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
      nnnnnnnnnnnnnnnnnnnn
      +
      !!!!@@@@@@@@@@CEEEHHHHHHHHHHHHHHNKKNKQQQWWWWWWccux{{{{{~~~~~
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      ~~~~~~~~~~~~~~~~~~~~

      Comment


      • #4
        I'm not sure about your pileup issue, but see the thread "samtools tview reference sequence" regarding the string of N's in your tview. For me, this was caused by having a colon character in the reference sequence fasta header.

        Comment


        • #5
          I think I figured out what it was -- I had an old from a previous bam file hanging around. I re-indexed the file and everything was OK.

          Comment


          • #6
            Originally posted by Tally View Post
            For me, this was caused by having a colon character in the reference sequence fasta header.
            Wow, this sentence has solved a problem I have been having all morning.Thanks so much!

            Comment

            Latest Articles

            Collapse

            • seqadmin
              Best Practices for Single-Cell Sequencing Analysis
              by seqadmin



              While isolating and preparing single cells for sequencing was historically the bottleneck, recent technological advancements have shifted the challenge to data analysis. This highlights the rapidly evolving nature of single-cell sequencing. The inherent complexity of single-cell analysis has intensified with the surge in data volume and the incorporation of diverse and more complex datasets. This article explores the challenges in analysis, examines common pitfalls, offers...
              Today, 07:15 AM
            • seqadmin
              Latest Developments in Precision Medicine
              by seqadmin



              Technological advances have led to drastic improvements in the field of precision medicine, enabling more personalized approaches to treatment. This article explores four leading groups that are overcoming many of the challenges of genomic profiling and precision medicine through their innovative platforms and technologies.

              Somatic Genomics
              “We have such a tremendous amount of genetic diversity that exists within each of us, and not just between us as individuals,”...
              05-24-2024, 01:16 PM

            ad_right_rmr

            Collapse

            News

            Collapse

            Topics Statistics Last Post
            Started by seqadmin, Today, 08:18 AM
            0 responses
            11 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, Today, 08:04 AM
            0 responses
            12 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 06-03-2024, 06:55 AM
            0 responses
            13 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 05-30-2024, 03:16 PM
            0 responses
            27 views
            0 likes
            Last Post seqadmin  
            Working...
            X