Extract data from VCF file
How can I extract below fields from a VCF file?
I am looking for python parser for VCF file.
'ALLELE_CALL', 'IS_HETEROZYGOUS', 'NUM_READS', 'TOTAL_READ_DEPTH'
My VCF file looks like:
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT MATERIAL1 MATERIAL2 MATERIAL..n
• 3,213 views
•
link
2 answers
They're probably in the INFO field. You can just use cut, or GATK VariantsToTable, or PyVCF. Lots of options!
• 0 views
•
link
Try @brentp 's cyvcf2 (cython + htslib == fast VCF and BCF processing), a fast python (2 and 3) parsing of VCF and BCF including region-queries, published on Bioinformatics.
• 0 views
•
link
Log in to answer this question.
what are VARIANT_TYPE, SEQUENCE,ALLELE_CALL,VALUE, etc... ? How can we know what you want to put in those columns ?
Updated the question.