pyranges icon indicating copy to clipboard operation
pyranges copied to clipboard

Method which reports distance to nearest interval in self?

Open endrebak opened this issue 5 years ago • 0 comments

It would be convenient to have a method which reports the distance to the nearest and previous interval, without necessarily knowing which interval that is. When looking at ranges I often have trouble eyeballing how far the different intervals are apart.

This could return a df of two columns, NextDistance and PreviousDistance:

gr.distances(how=None, # or "previous", "next"
                      overlap=False,  # or True
                      strandedness=None) # or "same"/"opposite"

endrebak avatar Jan 27 '20 09:01 endrebak