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 Jan 22, 2024
1 parent 6371a0a commit a99676e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions src/rds2py/granges.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ def as_granges(robj):
genome=_seqinfo_genome,
)

_mcols = BiocFrame.from_pandas(as_pandas_from_dframe(robj["attributes"]["elementMetadata"]))
_mcols = BiocFrame.from_pandas(
as_pandas_from_dframe(robj["attributes"]["elementMetadata"])
)

_gr_names = None
if "NAMES" in robj["attributes"]:
Expand All @@ -73,7 +75,7 @@ def _as_list(robj):
if "attributes" in _attr_vals["values"]:
if "levels" in _attr_vals["values"]["attributes"]:
_levels_data = _attr_vals["values"]["attributes"]["levels"]["data"]
_data = [_levels_data[x-1] for x in _data]
_data = [_levels_data[x - 1] for x in _data]

if "lengths" in _attr_vals:
_final = []
Expand Down
2 changes: 1 addition & 1 deletion src/rds2py/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,4 +255,4 @@ def as_summarized_experiment(robj):
else:
raise TypeError(
"`robj` is neither a `SummarizedExperiment` nor `SingleCellExperiment`."
)
)
2 changes: 1 addition & 1 deletion tests/data/generate_files.R
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,4 @@ gr <- GRanges(
score = 1:10,
GC = seq(1, 0, length=10))

saveRDS(gr, file="granges.rds")
saveRDS(gr, file="granges.rds")
2 changes: 1 addition & 1 deletion tests/test_granges.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ def test_granges():

gr = as_granges(robj=robj)

assert isinstance(gr, GenomicRanges)
assert isinstance(gr, GenomicRanges)

0 comments on commit a99676e

Please sign in to comment.