vcfparse.py
Parses a VCF file and extracts the specified regions.
vcfparse vcf_file [field1 field2 ... fieldN] [-h]
vcf_file: the VCF file to parsefields: a list of fields to extract from the VCF file.
--help, -h: print a helpful message and exit.
A command such as
vcfparse test.vcf gq dp sdp ad
will create four separate text files, one for each field. Each text file has a header of the form
Chromosome Position Value Sample
which is tab separated and each subsequent line will look something like this
chr10 181479 27 Sample4
Thanks to the people who have contributed to PyVCF for allowing me to write way less than one hundred lines of code:)