You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello developers,
This is a feature request. I feel that it would have been very helpful if the Locus object had a method that would calculate the length of the overlap with another locus. For doing this, most of the time, I have to rely on Pyranges or rarely on a quick but rather rusty method (converting loci to ranges and then to sets and then calculating the length of the intersection between the sets). I always felt that if I could do these operations using pyensembl that would simplify overlap analysis so much.
There could be a method that allows the calculation of the length of the overlap. The syntax could be something like
l1.overlap_length(l2)
# returns the length of the overlap
Additionally, there could be simple methods to get the length of a locus (l1.length), and then that could be used to calculate the fraction of the length of a locus that is overlapping (the syntax could be something like l1.overlap_length_fraction(l2)).
I hope these simple add-ons which I feel are essential would be integrated into pyensembl at some point in time. 🤞
The text was updated successfully, but these errors were encountered:
Hello developers,
This is a feature request. I feel that it would have been very helpful if the
Locus
object had a method that would calculate the length of the overlap with another locus. For doing this, most of the time, I have to rely onPyranges
or rarely on a quick but rather rusty method (converting loci to ranges and then to sets and then calculating the length of the intersection between the sets). I always felt that if I could do these operations usingpyensembl
that would simplify overlap analysis so much.For example, if there are two loci:
There could be a method that allows the calculation of the length of the overlap. The syntax could be something like
Additionally, there could be simple methods to get the length of a locus (
l1.length
), and then that could be used to calculate the fraction of the length of a locus that is overlapping (the syntax could be something likel1.overlap_length_fraction(l2)
).I hope these simple add-ons which I feel are essential would be integrated into
pyensembl
at some point in time. 🤞The text was updated successfully, but these errors were encountered: