Does vcf-consensus support indels?
1
1
Entering edit mode
5.6 years ago
user230613 ▴ 310

Does anyone know if the tool vcf-consensus supports indels insertion in the consensus sequence?

Thanks

consensus vcf-consensus • 3.2k views
ADD COMMENT
0
Entering edit mode

It supports only SNVs and deletions. Not insertions

ADD REPLY
3
Entering edit mode
3.5 years ago
Johan Zicola ▴ 60

Not sure about vcftools-consensus but indels are taken into account with "bcftools consensus" and is probably faster than vcftools:

bcftools consensus --fasta-ref <reference.fasta> <file.vcf.b.gz> --sample <IND> -o <output_consensus.fasta>

See docs: https://samtools.github.io/bcftools/bcftools.html

ADD COMMENT
0
Entering edit mode

Hi! For some reason when I try bcf consensus, indels are not taken into account. When i do samtools mpileup and bcftools call to create a vcf file, it will annotate indels but with a 0/0 genotype. I think that has to do with bcftools consensus not including indels it in the consensus seq. Have you noticed this before? Thanks

This is my pipeline:

bbmap.sh index ref.fasta

bbmap.sh ref='ref.fasta' in='sample.fasta' out='output.sam'

samtools view -bS output.sam > output.bam

samtools sort output.bam > sorted.bam

samtools index sorted.bam

samtools mpileup -uf SA05sequence.fasta sorted.bam | bcftools call -c > vars.vcf

bgzip -c vars.vcf vars.vcf.gz

tabix -p vcf vars.vcf.gz

bcftools consensus --fasta-ref ref.fasta vars.vcf.gz -o consensus.fasta

ADD REPLY
0
Entering edit mode

Sorry guys, I figured it out. My problem was caused by the difference of indel representing by BBMap. I now call BBMap using sam=1.3 and for bcftools I use call -m (multiallelic) Figured it out using: http://seqanswers.com/forums/showthread.php?t=61535

ADD REPLY

Login before adding your answer.

Traffic: 1973 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