I want to be able to look up candidate subclass(es) descendant of biolink:Association associated with a given subject and object categories (predicates too, if it helps? Plus any other desired metadata you think may help?), something like the following(?).
associations: Optional[List[str]] = bmt.get_associations(
subject_categories=subject_categories, # Optional[List[str]] = None
predicates=predicates, # Optional[List[str]] = None
object_categories=object_categories, # Optional[List[str]] = None
# I don't know if there is any other metadata that could be
# given to the method to further constrain the search
formatted=True
)
The "formatted" boolean flag is to ask the method to return CURIES not simple names (like other similar methods in the Toolkit)
Note that usually at least one of the subject_categories, predicates or object_categories are assumed necessary to resolve the specific association subclasses, but some of the matches can be 'wildcard' when some of those parameters have value None (not sure how open ended the search should be if all the values are None).
I guess when this is the case, the method defaults to the behaviour of bmt.get_all_associations().
The main use case here is to be able to use the specified biolink:Association subclass details in validation of a given edge, e.g. to access association-subclass-specific qualifier value range datatypes.
I'm assuming for the time being that the lists returned will be a specific as all the parameters constrain them to be, but perhaps a future iteration of this use case might pre-filter the subject and object categories list to only filter against the most specific node category, that is, (optionally, with a strict: bool flag?) not to filter using the parent (ancestral) categories?
I want to be able to look up candidate subclass(es) descendant of
biolink:Association
associated with a given subject and object categories (predicates too, if it helps? Plus any other desired metadata you think may help?), something like the following(?).The "formatted" boolean flag is to ask the method to return CURIES not simple names (like other similar methods in the Toolkit)
Note that usually at least one of the
subject_categories
,predicates
orobject_categories
are assumed necessary to resolve the specific association subclasses, but some of the matches can be 'wildcard' when some of those parameters have valueNone
(not sure how open ended the search should be if all the values areNone
).I guess when this is the case, the method defaults to the behaviour of
bmt.get_all_associations()
.The main use case here is to be able to use the specified
biolink:Association
subclass details in validation of a given edge, e.g. to access association-subclass-specific qualifier valuerange
datatypes.I'm assuming for the time being that the lists returned will be a specific as all the parameters constrain them to be, but perhaps a future iteration of this use case might pre-filter the subject and object categories list to only filter against the most specific node category, that is, (optionally, with a
strict: bool
flag?) not to filter using the parent (ancestral) categories?