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
              Genetic Variation in Immunogenetics and Antibody Diversity
              by seqadmin



              The field of immunogenetics explores how genetic variations influence immune responses and susceptibility to disease. In a recent SEQanswers webinar, Oscar Rodriguez, Ph.D., Postdoctoral Researcher at the University of Louisville, and Ruben Martínez Barricarte, Ph.D., Assistant Professor of Medicine at Vanderbilt University, shared recent advancements in immunogenetics. This article discusses their research on genetic variation in antibody loci, antibody production processes,...
              11-06-2024, 07:24 PM
            • seqadmin
              Choosing Between NGS and qPCR
              by seqadmin



              Next-generation sequencing (NGS) and quantitative polymerase chain reaction (qPCR) are essential techniques for investigating the genome, transcriptome, and epigenome. In many cases, choosing the appropriate technique is straightforward, but in others, it can be more challenging to determine the most effective option. A simple distinction is that smaller, more focused projects are typically better suited for qPCR, while larger, more complex datasets benefit from NGS. However,...
              10-18-2024, 07:11 AM

            ad_right_rmr

            Collapse

            News

            Collapse

            Topics Statistics Last Post
            Started by seqadmin, 11-08-2024, 11:09 AM
            0 responses
            33 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 11-08-2024, 06:13 AM
            0 responses
            28 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 11-01-2024, 06:09 AM
            0 responses
            32 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 10-30-2024, 05:31 AM
            0 responses
            23 views
            0 likes
            Last Post seqadmin  
            Working...
            X