jamescasbon / PyVCF

A Variant Call Format reader for Python.
http://pyvcf.readthedocs.org/en/latest/index.html
Other
404 stars 200 forks source link

Pandas dataframe integration #324

Open hkmztrk opened 4 years ago

hkmztrk commented 4 years ago

Hello,

Is there an easy way to create a data frame from the records? Something like below?

vcf_reader = vcf.Reader(open(somatic, 'r'))
lines = [el for el in vcf_reader]
df_vcf = pd.DataFrame(lines)

Thanks!