import cyvcf2 vcf = cyvcf2.VCF('input.vcf') vcf.add_info_to_header({'DP': 'Total depth of reads at the site'})
import cyvcf2 vcf = cyvcf2.VCF('input.vcf') info_fields = { 'DP': 'Total depth of reads at the site', 'AF': 'Allele frequency' } vcf.add_info_to_header(info_fields)This example adds two new INFO fields - "DP" and "AF" - along with their descriptions, to the header of an input VCF file. Overall, cyvcf2 is a powerful library that enables easy manipulation of VCF files, including the addition of new INFO fields to the header using the add_info_to_header method.