Skip to content

Commit

Permalink
docs: clarify sort order
Browse files Browse the repository at this point in the history
  • Loading branch information
clintval committed Aug 2, 2024
1 parent 351b563 commit 8556eb8
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions pybedlite/overlap_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,10 +346,10 @@ def get_overlaps(self, interval: Span) -> List[SpanType]:
list if no overlaps exist. The intervals will be returned sorted using the following
sort keys:
* The interval's start
* The interval's end
* The interval's strand (if defined)
* The interval's reference sequence name
* The interval's start (ascending)
* The interval's end (ascending)
* The interval's strand, positive or negative (assumed to be positive if undefined)
* The interval's reference sequence name (lexicographically)
"""
tree = self._refname_to_tree.get(interval.refname)
if tree is None:
Expand Down Expand Up @@ -392,10 +392,10 @@ def get_enclosing_intervals(self, interval: Span) -> List[SpanType]:
The list of intervals in this detector that enclose the query interval. The intervals
will be returned sorted using the following sort keys:
* The interval's start
* The interval's end
* The interval's strand (if defined)
* The interval's reference sequence name
* The interval's start (ascending)
* The interval's end (ascending)
* The interval's strand, positive or negative (assumed to be positive if undefined)
* The interval's reference sequence name (lexicographically)
"""
results = self.get_overlaps(interval)
return [i for i in results if interval.start >= i.start and interval.end <= i.end]
Expand All @@ -411,10 +411,10 @@ def get_enclosed(self, interval: Span) -> List[SpanType]:
The list of intervals in this detector that are enclosed within the query interval.
The intervals will be returned sorted using the following sort keys:
* The interval's start
* The interval's end
* The interval's strand (if defined)
* The interval's reference sequence name
* The interval's start (ascending)
* The interval's end (ascending)
* The interval's strand, positive or negative (assumed to be positive if undefined)
* The interval's reference sequence name (lexicographically)
"""
results = self.get_overlaps(interval)
return [i for i in results if i.start >= interval.start and i.end <= interval.end]
Expand Down

0 comments on commit 8556eb8

Please sign in to comment.