Closed cbizon closed 3 years ago
More proscriptively: inheritance between mixins and non-mixins should be used in get_descendants. One case where this is useful is when a query comes in as a mixin class, and the KP has to work out which of its non-mixin data is a valid response.
Now that 'gene or gene product' has become a mixin, our documentation is out of date. Brett Smith noticed that t.get_descendants('gene or gene product') now returns: ['gene or gene product', 'gene product mixin', 'gene product isoform mixin']
It might be helpful to add functionality to the toolkit methods, get_descendents and get_anscestors to allow the user to specify if they want mixins returned as well as parents in the is_a hierarchy.
Given a predicate like "precedes" I want to know what classes can be used for domain and range.
In this case, the domain and range are "occurrent", which is a mixin.
If I call bmt.get_decendants('occurrent'), I don't get e.g. Molecular Activity, which uses "occurrent" as a mixin.
So since sometimes domain will be a mixin and sometimes it won't, it's kind of annoying to handle this generically.
Should bmt.get_descendants('occurrent') return Molecular Activity?