Convert a VCF file to a customized data structure. Developed to facilitate data conversion for the Beacon project.
The current proto version converts VCF files from the 1k genome project to the Beacon V2 specification.
User needs to privde a definition.yaml
file, which describes the mapping of the desired terms and the corresponding VCF values. An example definition.yaml
is proivded.
from vcfConverter import vcfConverter
converter = vcfConverter(vcf_file = 'samples/HG00096.cnv.vcf')
beacon_struct = converter.convertVariants(def_file = 'definition/definition_cnv.yaml')
print(beacon_struct)
- only tested on 1k genome CNV data
- cannot customize VCF imports
- CLI
- convert samples
Please let me know other desired functions