I am interested in converting a VCF file into a FASTA file given a reference sequence with Python or R.
Samtools/BCFtools (Heng Li) provides a Perl script
vcfutils.pl which does this, the function
vcf2fq (lines 469-528)
This script has been modified by others to convert InDels as well, e.g. this by David Eccles
./vcf2fq.pl -f <input.fasta> <all-site.vcf> > <output.fastq>
Given that converting a VCF into a FASTA given some reference is a somewhat standard procedure in bioinformatics, are there standard R or Python implementations used by the community?