Question: Extract data from VCF file
0
gravatar for inkprs
24 months 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.1k views
ADD COMMENTlink modified 24 months ago by shenwei3564.5k • written 24 months 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 24 months ago by Pierre Lindenbaum118k

Updated the question.

ADD REPLYlink written 24 months ago by inkprs60
1
gravatar for jzluo1
24 months 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 24 months ago • written 24 months ago by jzluo110
0
gravatar for shenwei356
24 months ago by
shenwei3564.5k
China
shenwei3564.5k 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 24 months ago by shenwei3564.5k
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: 940 users visited in the last hour