kipoi / kipoiseq

Standard set of data-loaders for training and making predictions for DNA sequence-based models.

Home Page:https://kipoi.org/kipoiseq/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implement `Variant` and `Interval` classes. Use them instead of `cyvcf2.Variant` and `pybedtools.Interval`

Avsecz opened this issue · comments

Currently, the VariantSeqExtractor expects interval to be pybedtools.Interval and variants to be cyvcf2.Variant. Since both packages use Cython to define the classes it's super difficult to instantiate them in the case one uses another vcf parser or would like to manually introduce some variants not present in the vcf file. Hence, I suggest that we implement our own Interval and Variant classes and implement two conversion classmethods on them: from_pybedtools and from_cyvcf2.