SEQanswers

Go Back   SEQanswers > Applications Forums > Genomic Resequencing



Similar Threads
Thread Thread Starter Forum Replies Last Post
Generate consensus sequence with Samtools mpileup? Heisman Bioinformatics 4 10-28-2013 05:57 PM
how to use samtools to get consensus sequence? f0415007 Bioinformatics 1 09-26-2011 11:59 PM
Why are there all these As in my consensus sequence: An issue with samtools pileup dagarfield Bioinformatics 3 02-03-2011 11:14 AM
question on SAMtools consensus calling orionzhou Bioinformatics 9 11-16-2010 03:42 PM
maq consensus sequence BertieWooster Bioinformatics 0 06-09-2010 10:25 AM

Reply
 
Thread Tools
Old 01-16-2011, 10:07 PM   #1
av_d
Member
 
Location: Pune, India

Join Date: Sep 2009
Posts: 12
Default 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 at 08:49 PM.
av_d is offline   Reply With Quote
Old 01-18-2011, 11:03 PM   #2
av_d
Member
 
Location: Pune, India

Join Date: Sep 2009
Posts: 12
Default

I got my answer.. "-v" should not be present with the "pileup" cmd.
av_d is offline   Reply With Quote
Old 05-30-2011, 04:51 AM   #3
mixter
Member
 
Location: Munich, Germany

Join Date: May 2010
Posts: 22
Default

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
mixter is offline   Reply With Quote
Old 05-30-2011, 04:59 AM   #4
av_d
Member
 
Location: Pune, India

Join Date: Sep 2009
Posts: 12
Default

check your reference file first, because human ref genome already have long stretches of "nnnnnnnnnnnnnnn"
av_d is offline   Reply With Quote
Old 10-03-2015, 10:04 AM   #5
gauravdube
Junior Member
 
Location: India

Join Date: Feb 2014
Posts: 7
Default

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.
gauravdube is offline   Reply With Quote
Old 10-18-2015, 04:44 AM   #6
profbiot
Junior Member
 
Location: Reading, MA

Join Date: Oct 2015
Posts: 1
Default

The lowercase letters have poor mapping quality. The non-ATGC letters are IUPAC codes for positions with more than one base observed.
http://www.bioinformatics.org/sms2/iupac.html
profbiot is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 12:37 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO