Closed brettasmi closed 1 month ago
Hi @brettasmi - which version of Biolink Model (via biolink-model-toolkit) are you instantiating with your tool? The get_descendents
method does call get_element
as its first step, so you should be able to call get_descendents
without first a call to get_element
.
The get_element
method does walk through the aliases in the model to try and match the string supplied by the user to an actual element in the model, but I think in this case, it isn't currently smart enough to translate biolink:realized_in_response_to
, into realized in response to
before doing so. This is the same situation with biolink:ameliorates
(ameliorates
is an alias of biolink:ameliorates_condition
in v4.1.5, the default version of Biolink Model that BMT currently uses).
I'll use this ticket to update BMT to query aliases formatted in snake case as well.
@sierra-moxon , the tools are using 4.1.4 and the interactive testing that I pasted in the ticket was using 4.1.5. Both were with BMT 1.2.1.
Thanks for taking a look at this. In the meantime then, the suggestion is to do the string manipulation to remove the underscores and the biolink:
prefix?
Hi @sierra-moxon, checking to see if you agree with my proposed workaround ☝️ for now. Thanks!
Hi @brettasmi - sorry for the delay, I was able to release a fresh BMT with support for "biolink" prefixed aliases checked against non-biolink-prefixed aliases.
Can you please try updating and let me know if you have issues? thanks, Sierra
We use bmt to search biolink for compatible descendants when our components receive a query. Recently, a user attempted to query one of our systems with
biolink:ameliorates
, but they kept getting error messages. It turns out bmt was raising on "not a valid biolink component" for theameliorates
term. Please find below two examples of this behavior:Is this expected behavior?
If so, is the recommended implementation to always search for a canonical name via
get_element
before callingget_descendants
?Thanks--bmt is very helpful for us!