Question: Extract data from VCF file
0
gravatar for inkprs
2.7 years ago by
inkprs60
inkprs60 wrote:

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
sequencing • 1.4k views
ADD COMMENTlink modified 2.7 years ago by shenwei3565.0k • written 2.7 years ago by inkprs60

what are VARIANT_TYPE, SEQUENCE,ALLELE_CALL,VALUE, etc... ? How can we know what you want to put in those columns ?

ADD REPLYlink written 2.7 years ago by Pierre Lindenbaum124k

Updated the question.

ADD REPLYlink written 2.7 years ago by inkprs60
1
gravatar for jzluo1
2.7 years ago by
jzluo110
Danville, PA
jzluo110 wrote:

They're probably in the INFO field. You can just use cut, or GATK VariantsToTable, or PyVCF. Lots of options!

ADD COMMENTlink modified 2.7 years ago • written 2.7 years ago by jzluo110
0
gravatar for shenwei356
2.7 years ago by
shenwei3565.0k
China
shenwei3565.0k wrote:

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.

ADD COMMENTlink written 2.7 years ago by shenwei3565.0k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1926 users visited in the last hour