From 4d246f5505b53322c97734c94e02db2e5b101ba7 Mon Sep 17 00:00:00 2001 From: Jayaram Kancherla Date: Thu, 11 Jul 2024 15:26:34 -0700 Subject: [PATCH] Fix types for `SeqInfo` objects (#42) --- src/rds2py/granges.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/rds2py/granges.py b/src/rds2py/granges.py index aed2de7..3347a4f 100644 --- a/src/rds2py/granges.py +++ b/src/rds2py/granges.py @@ -53,8 +53,10 @@ def as_granges(robj): _seqinfo_genome = robj["attributes"]["seqinfo"]["attributes"]["genome"]["data"] _seqinfo = SeqInfo( seqnames=_seqinfo_seqnames, - seqlengths=[None if x == -2147483648 else x for x in _seqinfo_seqlengths], - is_circular=[None if x == -2147483648 else x for x in _seqinfo_is_circular], + 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 + ], genome=_seqinfo_genome, )