Skip to content

Commit 9bc4ac3

Browse files
committed
fix: fix rna search with no gene info
1 parent 47e5484 commit 9bc4ac3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

graphgen/models/searcher/db/rnacentral_searcher.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ def _rna_data_to_dict(
5858
acc = xref.get("accession", {})
5959
if s := acc.get("species"):
6060
organisms.add(s)
61-
if g := acc.get("gene", "").strip():
61+
gene_value = acc.get("gene")
62+
if gene_value and isinstance(gene_value, str) and (g := gene_value.strip()):
6263
gene_names.add(g)
6364
if m := xref.get("modifications"):
6465
modifications.extend(m)

0 commit comments

Comments
 (0)