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 Jul 14, 2024
1 parent 5377d5f commit 7dde91b
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/rds2py/granges.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,25 @@ def as_granges(robj):
_fstrand.extend([_strds[i]] * x)

_seqinfo_seqnames = robj["attributes"]["seqinfo"]["attributes"]["seqnames"]["data"]
_seqinfo_seqlengths = robj["attributes"]["seqinfo"]["attributes"]["seqlengths"]["data"]
_seqinfo_is_circular = robj["attributes"]["seqinfo"]["attributes"]["is_circular"]["data"]
_seqinfo_seqlengths = robj["attributes"]["seqinfo"]["attributes"]["seqlengths"][
"data"
]
_seqinfo_is_circular = robj["attributes"]["seqinfo"]["attributes"]["is_circular"][
"data"
]
_seqinfo_genome = robj["attributes"]["seqinfo"]["attributes"]["genome"]["data"]
_seqinfo = SeqInfo(
seqnames=_seqinfo_seqnames,
seqlengths=[None if x == -2147483648 else int(x) for x in _seqinfo_seqlengths],
is_circular=[None if x == -2147483648 else bool(x) for x in _seqinfo_is_circular],
is_circular=[
None if x == -2147483648 else bool(x) for x in _seqinfo_is_circular
],
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 Down

0 comments on commit 7dde91b

Please sign in to comment.