Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 22, 2024
1 parent 0f0b021 commit 10b253e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/rds2py/rdsutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ def get_class(robj: dict) -> str:
if is_integer:
if "dim" in obj_attr:
return "ndarray"
elif "class" in obj_attr:
elif "class" in obj_attr:
return obj_attr["class"]["data"][0]
else:
else:
return robj["class_name"]

if "class" in obj_attr:
Expand Down
1 change: 0 additions & 1 deletion src/rds2py/read_factor.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from .generics import _dispatcher
from .rdsutils import get_class

__author__ = "jkanche"
__copyright__ = "jkanche"
Expand Down
1 change: 0 additions & 1 deletion src/rds2py/read_rle.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from .generics import _dispatcher
from .rdsutils import get_class

__author__ = "jkanche"
__copyright__ = "jkanche"
Expand Down
13 changes: 12 additions & 1 deletion tests/test_granges.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,18 @@ def test_granges():
gr = read_rds("tests/data/granges.rds")

assert isinstance(gr, GenomicRanges)
assert gr.get_seqnames("list") == ['chr1', 'chr2', 'chr2', 'chr2', 'chr1', 'chr1', 'chr3', 'chr3', 'chr3', 'chr3']
assert gr.get_seqnames("list") == [
"chr1",
"chr2",
"chr2",
"chr2",
"chr1",
"chr1",
"chr3",
"chr3",
"chr3",
"chr3",
]
assert np.allclose(gr.get_start(), range(101, 111))


Expand Down

0 comments on commit 10b253e

Please sign in to comment.