-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems retrieving inverse predicates #145
Comments
I tested with 1.1.0 and with 1.1.1 which just came out |
@colleenXu - you are correct, there are two methods. e.g. consequently, these test cases all pass:
the consequently, all these tests pass (note the upper case here is just python variable that is reused throughout the tests instead of a string version of the predicate name)
These methods are functioning as expected, but I can see where some tweaks to the name/docstrings will help! Per your other questions/statements:
I'd be happy to add as a feature, the ability to query slot names using underscores. |
I can't tell if this is an issue with the biolink-model or the toolkit, but I'm having issues retrieving inverse predicates for non-symmetrical predicates.
Previously (biolink-model 3.1.1, and maybe bmt 0.9.0), I could use statements like
bmt_tool.get_element('causes').inverse
to retrieve the inverse predicate if it existed (and it would return nothing orNone
if the inverse didn't exist). It looked like it took the input predicate with underscores, not spaces.However, now that kind of statement always returns nothing /
None
.First, I tried looking at the documentation, and I saw the method has_inverse. However, this function always seems to return
False
, even when I would expect it to returnTrue
. For example,bmt_tool.has_inverse('causes')
evaluates asFalse
Second, I searched in the repo, and I saw the method get_inverse.
It seems to return the inverse predicate if it exists, and return
None
if there's no inverse because the input predicate was symmetrical.However, I've noticed:
AttributeError: 'NoneType' object has no attribute 'name'
None
when using spaces andAttributeError: 'NoneType' object has no attribute 'name'
when using underscores:subclass of
quantifier qualifier
: whatSEMMEDDB:MEASURES
maps toThe text was updated successfully, but these errors were encountered: