adding merge_direct_overlaps() method #131
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Greetings dear developers,
I have been using intervaltree for my project which is about biology.
But when I use merge_overlaps() method, it merges all intervals that overlap directly or indirectly.
Assume there are three regions in a genome called
intervalA
,intervalB
, andintervalC
.intervalB
overlaps with bothintervalA
andintervalC
but these two are not.So what I needed to merged them like this:
intervalAB
andintervalBC
. And I wrote a method calledmerge_direct_overlaps()
. I have tested it with four additional test function for mentioned python version and it passed all.I tried to make the insertion as smooth as possible; such as copying the structure of
merge_overlaps()
method for this new method, adding 4 test functions which is highly similar to test functions ofmerge_overlaps()
, and lastly adding a brief info about the method to README.md file.Feedback is welcome