You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have sets of strings which are not yet in HPO form, but should be translated into HPO terms. In many cases they are (when comparing strings) already very close.
What would be the best way to map these strings to their corresponding HPO term (with uncertainty estimate maybe aka number of character mismatches)?
If I search via
for term in Ontology.search(MYOWNTERM):
print(term.name)
will I get the best matches or are they sorted alphabetically?
Any pointers in general?
The text was updated successfully, but these errors were encountered:
Hi,
If Ontology.search performs a substring match on all term names and synonyms. This will only work if your term is a substring. It does not work for strings with character mismatches.
The order it returns results is random and not sorted. This was done for performance reasons, i.e. you will get your first result even though it did not yet finish checking all HPO terms in the Ontology.
For your use case you'd have to implement a matching/search function yourself. You would have to do something like
Get all names and synonyms for every HPO term
Search this list of strings, allowing for mismatches
Hi,
I have sets of strings which are not yet in HPO form, but should be translated into HPO terms. In many cases they are (when comparing strings) already very close.
What would be the best way to map these strings to their corresponding HPO term (with uncertainty estimate maybe aka number of character mismatches)?
If I search via
for term in Ontology.search(MYOWNTERM):
print(term.name)
will I get the best matches or are they sorted alphabetically?
Any pointers in general?
The text was updated successfully, but these errors were encountered: