Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • Why MAQ consensus seq better than SAMtools consensus ??

    Hi,
    I was trying to assemble whole genome illumina 36 bp reads using MAQ and generate consensus fastq seq. I've also used SAMtool to call SNP/indel and generate consensus seq from .map output of MAQ. But the quality of the consensus seq from MAQ is far better than that from SAMtool. What is wrong with SAMtools?

    Following SAMtool cmd used:

    maq2sam-long final.map > final.sam
    samtools view -bSt ref.fa.fai -o final.bam final.sam
    samtools sort final.bam final.sorted
    samtools index final.sorted.bam
    samtools pileup -vcf ref.fa final.sorted.bam > final.sorted.bam.cns
    samtools.pl pileup2fq -D 100 final.sorted.bam.cns > final.sorted.bam.fq


    First 20 lines from MAQ consensus fastq:
    @I
    nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
    nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
    nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
    nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
    nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
    nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
    nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnagcCTAAGCCTAA
    GCCTAAGCCTAAAAAATTGAGATAAGAAAACATTTTACTTtttcannnnnnnnnnnnnnn
    nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
    nnnnnnnnnngccaacctatatgctcctgtgtttaggcctaATACTAAGCCTAAGCctaa
    gcctaatactaagcctannnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
    nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnngcctaagactaagcctaa
    gcctaatactaagcctaagnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
    nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnactaagcctaagcctaagactaAgccTaa
    gCCtaaAagaATATGGTAGCTACAGAAACggtagtacactcttctgaaagnnnnnnnnnn
    ttgcaatttttaTAGCTAGGGCACTTTTTGTCTGCCCAWATATAGGCAACCAAaaataat
    tgccaagtttttaatgatttgttgcatattgannnnnnnnnnnnnnnnnnnnnnnnnnnn
    nnntatcgtagctacagaAACGGTTGtgcActcATCTGAAAGTTTGTTTTTCTTgttttc
    ttgcACTttgtgcagaATTCTTGATTCTTGATTCTTGCAGAAATTTGCAAGAaaattcgc


    First 20 lines from SAMtools consensus fastq:

    @I
    nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
    nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
    nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
    nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
    nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
    nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
    nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
    nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
    nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
    nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
    nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
    nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
    nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
    nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
    nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
    nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnWnnnnnnnnnnnnnnnnnnnnn
    nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
    nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
    nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
    Last edited by av_d; 01-18-2011, 08:49 PM.

  • #2
    I got my answer.. "-v" should not be present with the "pileup" cmd.

    Comment


    • #3
      Hi,

      I have run into the same problem, however, your solution of removing the -v option in the samtools pileup call did not work for me. I still get sequences consisting of long stretches of "nnnnnnnnnnnnnnn" in the FASTQ files, resulting in conversion failing and empty FASTA files being generated out of them.

      In my case, I am trying to generate consensus FASTA sequence from the mapped BAM files from the 1000 Genomes Project.

      name=HG00096
      file=HG00096.mapped.ILLUMINA.bwa.GBR.low_coverage.20101123
      samtools view -bSt /opt/genomes/hg18-chromosomes.fa.fai -o ${file}.bam ${file}.sam
      samtools sort ${file}.bam ${name}.final.sorted
      samtools index ${name}.final.sorted.bam
      samtools pileup -cf /gcm/opt/genomes/hg18-chromosomes.fa $file > ${name}.consensus.pileup
      /gcm/opt/samtools/samtools-0.1.7a/misc/samtools.pl pileup2fq -D 100 ${name}.consensus.pileup > ${name}.fq
      /gcm/opt/maq/maq-0.7.1/bin/fq_all2std.pl fq2fa ${name}.fastq > ${name}.fasta

      Alternatively I tried the FASTX toolkit with no luck:
      fastq_to_fasta -i ${name}.fq -o ${name}.fa


      Hope someone can help

      Comment


      • #4
        check your reference file first, because human ref genome already have long stretches of "nnnnnnnnnnnnnnn"

        Comment


        • #5
          Hi av_d,

          My fastq file consists of lot non-ATGC characters (you are too are getting in your file, you see that 'W' in your fastq ?). What are these characters and how to handle these?

          Commands used:
          bwa index ref.fa
          bwa aln -t 9 cocsa_ref.fa D2_R2.fastq -f D2_R2.sai && bwa aln -t 9 cocsa_ref.fa D2_R1.fastq -f D2_R1.sai
          bwa sampe ref.fa D2_R1.sai D2_R2.sai D2_R1.fq D2_R2.fq > D2-aln-pe2.sam
          samtools faidx cocsa_ref.fa
          samtools view -bt ref.fa.fai D2-aln-pe2.sam > D2-aln-pe2.bam
          samtools sort D2-aln-pe2.bam D2-aln-pe2.bam.srt
          samtools index D2-aln-pe2.bam.srt.bam
          samtools mpileup -uf ref.fa D2-aln-pe2.bam.srt.bam | bcftools view -cg - | vcfutils.pl vcf2fq > CONSENSUS.fq


          CONSENSUS.fq file looks like:
          @scaffold_1
          nnngtttggtggtagtattggtatttcaaacacgctaggtgtttgttggttttgagtagg
          tgtagctggagtagactctatctccatttctctatcagtttgggcctctggccctaggct
          ctcctgtctgttttcttgagtatttactacaatagtatcactgtctggcggcattttatt
          actaagctcttttcttagtaagcaactagatggtctgtgtgtttttgttttcgtgagtga
          gacgtgttcagattagctactttaccagcttctagctctatagcgcgtgggctgcacgag
          ttggcactagttgtaatcgatttcttgggatggatttgtatataattcgctaaaattaca
          cctattctgaaaaactcgnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
          nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
          nnnnnnnnTAATGTTACAAGTAAYAAGAAGGATYCTYTCCTTRACAAATRACGAGATGGC

          Please also convey, how to handle the small-case characters and 'N's ?

          Thanks in advance.

          Comment


          • #6
            The lowercase letters have poor mapping quality. The non-ATGC letters are IUPAC codes for positions with more than one base observed.

            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
            10 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, Yesterday, 06:07 PM
            0 responses
            9 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
            67 views
            0 likes
            Last Post seqadmin  
            Working...
            X