Hey, I'm for a way to write valid .vcf files - from scratch. From the 'pysam' documentation it's not entirely clear how I would/could do that.
The `test.vcf` that I want to generate:
##fileformat=VCFv4.2
##FILTER=<ID=PASS,Description="All filters passed">
#CHROM POS ID REF ALT QUAL FILTER INFO
chromA 100 snp1 C G . PASS .
chromA 202 snp2 T C . PASS .
So my initial idea was:
1. generate a list of `VariantRecords`
2. extract all the relevant info fields
3. write the `.vcf`
attempt 1:
from pysam import VariantRecord
vr = VariantRecord()
#TypeError: this class cannot be instantiated from Python
My second attempt using `VariantFile.add_record` failed as well. Help is appreciated!
Cheers, F