So I have been using PyVCF library in python for parsing and working with VCF files. Mostly just for filtering out variants that overlap with bed intervals, converting them to a tab-separated file for excel, that sort of thing, and I have been using Gemini as a database for doing various analyses on my data. However, I want to combine various analyses that I am doing into a coherent framework that works for me. Because an indexed VCF file is often much quicker to access and search through than a database setup, keeping my analyses working with VCF files would be a plus, and save on duplicating my data into yet another large format and using up disk space.
To do that I would need to create new entries and annotations within a VCF file. Adding new fields, putting in new entries (spoofing exome targeted regions coverage data as structural variants for instance), that sort of thing. PyVCF is great, but it doesn't seem to allow me to add new records in to its data structure, or at least not in a very straightforward way. It could be modified but I'd be interested to know if anyone has worked with other VCF libraries that allow this, particularly ones in Python.