Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • av_d
    Member
    • Sep 2009
    • 12

    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.
  • av_d
    Member
    • Sep 2009
    • 12

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

    Comment

    • mixter
      Member
      • May 2010
      • 22

      #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

      • av_d
        Member
        • Sep 2009
        • 12

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

        Comment

        • gauravdube
          Junior Member
          • Feb 2014
          • 7

          #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

          • profbiot
            Junior Member
            • Oct 2015
            • 1

            #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

            ad_right_rmr

            Collapse

            News

            Collapse

            Topics Statistics Last Post
            Started by SEQadmin2, 06-05-2026, 10:09 AM
            0 responses
            19 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 06-04-2026, 08:59 AM
            0 responses
            34 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 06-02-2026, 12:03 PM
            0 responses
            55 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 06-02-2026, 11:40 AM
            0 responses
            24 views
            0 reactions
            Last Post SEQadmin2  
            Working...