-
Notifications
You must be signed in to change notification settings - Fork 46
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
Accessing children of a relationship #177
Comments
The warning is a little confusing, and I think it's actually a red herring/false positive. The issue here is that GO changed since the documentation was written, and this term has no direct part-of relationships any more. The actual return value of Try another term, it will give results, without warning: >>> list(go['GO:0060887'].objects(go.get_relationship('part_of')))
[Term('GO:0060173', name='limb development')] FWIW, I usually do this: >>> [r for r in go['GO:0060887'].relationships]
[Relationship('part_of', name='part of')] See also #119 |
Hi @cmungall thanks for the detailed response and the examples, and sorry for the super-late answer. I tried your example and indeed it works. However, I think my question was not well formulated, I meant to ask whether it was possible to get the inverse relationship (what I would think of as a child). For example, for the term GO:0006366, get all these children and the relationship that links them to GO:0006366: |
HI @cmungall any advise on this? |
Is it possible to access the children of a relationship? For example, with the method
term.subclasses()
I can access all the inverseis_a
relationships. Is there a way to access other relationships this way? E.gregulates
in GO?I am new to the use of ontologies, so I am not sure if that's the case, but this example from the documentation seems to be doing exactly that.
However, when I run it I get this:
Any tips on this?
The text was updated successfully, but these errors were encountered: