nf-core / vipr

Assembly and intrahost / low-frequency variant calling for viral samples
https://nf-co.re/vipr
MIT License
14 stars 12 forks source link

Speed up consensus iteration #24

Open andreas-wilm opened 6 years ago

andreas-wilm commented 6 years ago

Use plain consensus rules for variant calling in consensus update. This will be much faster and we can live with a few FP / FN, since a final LoFreq call is done eventually anyway

andreas-wilm commented 6 years ago

The following as taken from http://samtools.github.io/bcftools/howtos/consensus-sequence.html, with --ploidy 1 added to call should work:

bcftools mpileup -Ou -f reference.fa alignments.bam | bcftools call -mv -Oz -o calls.vcf.gz
tabix calls.vcf.gz
cat reference.fa | bcftools consensus calls.vcf.gz > consensus.fa