RohanKarthikeyan commited on
Commit
c8b6532
·
verified ·
1 Parent(s): 6e7e0bb

Explicit removal of NoneType CURIE Ids

Browse files
Files changed (1) hide show
  1. oaklib_utils.py +2 -1
oaklib_utils.py CHANGED
@@ -20,5 +20,6 @@ def get_candidates(term: str, top_k: int = 10) -> list[tuple[str, str]]:
20
 
21
  # Keep both URI and standard terms for "explainable" output
22
  # But first convert CURIE IDs to URIs
23
- candidates = list((adapter.curie_to_uri(curie), term) for (curie, term) in labels)
 
24
  return candidates
 
20
 
21
  # Keep both URI and standard terms for "explainable" output
22
  # But first convert CURIE IDs to URIs
23
+ # Add explicit if clause because I saw sometimes the curies were None
24
+ candidates = list((adapter.curie_to_uri(curie), term) for (curie, term) in labels if curie is not None)
25
  return candidates