Skip to content

Commit d048dc6

Browse files
committed
update ols search url
1 parent 2a4d446 commit d048dc6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmat/trait_mapping/ols.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,8 @@ def get_uri_from_exact_match(text, ontology='EFO'):
165165
:param ontology: ID of target ontology to query (default EFO)
166166
:return: URI of matching term or None if not found
167167
"""
168-
search_url = os.path.join(OLS_BASE_URL, f'search?ontology={ontology}&q={text}&queryFields=label&exact=true')
168+
# V2 of the OLS API does not support search currently, so for now use V1
169+
search_url = f'https://www.ebi.ac.uk/ols4/api/search?ontology={ontology}&q={text}&queryFields=label&exact=true'
169170
response = requests.get(search_url)
170171
response.raise_for_status()
171172
data = response.json()

0 commit comments

Comments
 (0)