Closed Avsecz closed 5 years ago
We have these in MMSplice, can be easily adapted here: https://github.com/gagneurlab/MMSplice/blob/1a59ee7198fb9397b8793017a615c32dfe430045/mmsplice/interval_tree.py#L10 https://github.com/gagneurlab/MMSplice/blob/1a59ee7198fb9397b8793017a615c32dfe430045/mmsplice/generic.py#L65
Currently, the
VariantSeqExtractor
expectsinterval
to bepybedtools.Interval
andvariants
to becyvcf2.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 ownInterval
andVariant
classes and implement two conversion classmethods on them:from_pybedtools
andfrom_cyvcf2
.