seq-lang / seq

A high-performance, Pythonic language for bioinformatics
https://seq-lang.org
Apache License 2.0
697 stars 50 forks source link

Support for vcf file #227

Closed MuhammedHasan closed 3 years ago

MuhammedHasan commented 3 years ago

Dear Seq Team,

This is awesome project. Thanks for your effort.

Can you provide support reading and processing vcf files (something similar to https://github.com/brentp/cyvcf2)?

arshajii commented 3 years ago

Hi @MuhammedHasan, thanks for the kind words. We actually already support VCF, e.g.

from bio import *
for record in VCF('test/data/toy.vcf'):
    print(record.chrom, record.qual, record.ref, list(record.alts))

More info about the VCF records here: https://docs.seq-lang.org/stdlib/bio/vcf.html#bio.vcf.VCFRecord. Let me know if this is what you were looking for!