Skip to content

Commit c0bd1b9

Browse files
committed
Use lookup for TRNASCANSE models only if needed
1 parent 2da41cf commit c0bd1b9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

rnacentral_pipeline/databases/mgnify/prepare.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,10 @@ def prepare_mgnify_data(data, conn_str):
103103
entry["taxonId"] = f"NCBITaxon:{taxid}"
104104

105105
## Add the type of the sequence
106-
entry["soTermId"] = so_type[entry["sourceModel"].split(":")[1]]
106+
if entry["sourceModel"].startswith("TRNASCANSE"):
107+
entry["soTermId"] = transcanse_so_lookup[entry["sourceModel"]]
108+
else:
109+
entry["soTermId"] = so_type[entry["sourceModel"].split(":")[1]]
107110

108111
prepared_data.append(entry)
109112

0 commit comments

Comments
 (0)