Skip to content

Commit

Permalink
chore: normalize docstrings throughout
Browse files Browse the repository at this point in the history
  • Loading branch information
clintval committed Aug 2, 2024
1 parent 19e85ec commit 351b563
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 @@ -8,7 +8,7 @@
* `refname` (str): The reference sequence name
* `start` (int): A 0-based start position
* `end` (int): A 0-based exclusive end position
* `end` (int): A 0-based half-open end position
This contract is described by the :class:`~pybedlite.overlap_detector.Span` protocol.
Expand Down Expand Up @@ -95,7 +95,7 @@ def start(self) -> int:

@property
def end(self) -> int:
"""A 0-based open-ended position."""
"""A 0-based open-ended end position."""


class StrandedSpan(Span, Protocol):
Expand All @@ -119,7 +119,7 @@ class Interval:
Attributes:
refname (str): the refname (or chromosome)
start (int): the 0-based start position
end (int): the 0-based end position (exclusive)
end (int): the 0-based half-open end position
negative (bool): true if the interval is negatively stranded, False if the interval is
unstranded or positively stranded
name (Optional[str]): an optional name assigned to the interval
Expand Down Expand Up @@ -247,19 +247,19 @@ def from_ucsc(
class OverlapDetector(Generic[SpanType], Iterable[SpanType]):
"""Detects and returns overlaps between a set of regions and another region on a reference.
The overlap detector may contain any interval-like Python objects that have the following
properties:
The overlap detector may contain a collection of interval-like Python objects that have the
following properties:
* `refname`: The reference sequence name
* `start`: A 0-based start position
* `end`: A 0-based exclusive end position
* `refname` (str): The reference sequence name
* `start` (int): A 0-based start position
* `end` (int): A 0-based half-open end position
Interval-like Python objects may also contain strandedness information which will be used
for sorting the return of :func:`~pybedlite.overlap_detector.OverlapDetector.get_overlaps`. This
additional sort key will only be used if the following property on the interval-like object is
present:
for sorting them in :func:`~pybedlite.overlap_detector.OverlapDetector.get_overlaps` using
the following property if it is present:
* `negative (bool)`: Whether or not the feature is negative stranded or not
* `negative (bool)`: True if the interval is negatively stranded, False if the interval is
unstranded or positively stranded
The same interval may be added multiple times, but only a single instance will be returned
when querying for overlaps.
Expand Down

0 comments on commit 351b563

Please sign in to comment.