Skip to content

Commit

Permalink
add docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
jkanche committed Jan 22, 2024
1 parent a99676e commit 4dea976
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/rds2py/granges.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@


def as_granges(robj):
"""Parse an R object as a :py:class:`~genomicranges.GenomicRanges.GenomicRanges`.
Args:
robj:
Object parsed from the `RDS` file.
Usually the result of :py:func:`~rds2py.parser.read_rds`.
Returns:
A ``GenomicRanges`` object.
"""
_cls = get_class(robj)

if _cls not in ["GenomicRanges", "GRanges"]:
Expand Down Expand Up @@ -65,6 +76,17 @@ def as_granges(robj):


def _as_list(robj):
"""Parse an R object as a :py:class:`~list`.
Args:
robj:
Object parsed from the `RDS` file.
Usually the result of :py:func:`~rds2py.parser.read_rds`.
Returns:
A ``list`` of the Rle class.
"""
_cls = get_class(robj)

if _cls not in ["Rle"]:
Expand Down

0 comments on commit 4dea976

Please sign in to comment.