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 or None 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 return True. For example, bmt_tool.has_inverse('causes') evaluates as False
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:
- the input predicate has to use spaces, not underscores. Using underscore will lead to
AttributeError: 'NoneType' object has no attribute 'name'
- in some cases, the input predicate doesn't return the inverse, regardless of using spaces vs underscores. I get
None when using spaces and AttributeError: 'NoneType' object has no attribute 'name' when using underscores:
subclass of
quantifier qualifier: what SEMMEDDB:MEASURES maps to
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').inverseto retrieve the inverse predicate if it existed (and it would return nothing orNoneif 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 asFalseSecond, I searched in the repo, and I saw the method get_inverse.
It seems to return the inverse predicate if it exists, and return
Noneif there's no inverse because the input predicate was symmetrical.However, I've noticed:
AttributeError: 'NoneType' object has no attribute 'name'Nonewhen using spaces andAttributeError: 'NoneType' object has no attribute 'name'when using underscores:subclass ofquantifier qualifier: whatSEMMEDDB:MEASURESmaps to