Generating wrong consensus sequence using samtools + bcftools
0
0
Entering edit mode
9.0 years ago

Hi,

I am trying to generate consensus sequence using samtools (v1.2) and bcftools (v1.2). Everything is just following the manual suggests and bam file was generated by bowtie2.

samtools mpileup -uf ref.fa aln.bam | bcftools call -c | vcfutils.pl vcf2fq > cns.fq

or

samtools mpileup -uf ref.fa aln.bam | bcftools call -mv -Oz -o calls.vcf.gz
tabix calls.vcf.gz
cat ref.fa | bcftools consensus calls.vcf.gz > cns.fa

Unfortunately, none of them gave me the right results. First, the consensus is longer than my reference sequences and it was fulfil by reference in which reads didn't cover. Second, if characters reported by reads are different from the reference, it will choose the reference.

I have attempted to change a lot of parameters but nothing works, but then I used the old version of samtools and bcftools to the same bam file, and everything is fine. So I got no idea what happened now. Please help.

Thank you

next-gen Assembly sequence samtools bcftools • 2.8k views
ADD COMMENT

Login before adding your answer.

Traffic: 2431 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6