Association
AssociationInterface
Bases: ABC
Abstract interface for associations in the Monarch KG
get_associations
abstractmethod
Retrieve paginated association records, with filter options
Parameters:
Name | Type | Description | Default |
---|---|---|---|
category |
str
|
Filter to only associations matching the specified category. Defaults to None. |
None
|
predicate |
str
|
Filter to only associations matching the specified predicate. Defaults to None. |
None
|
subject |
str
|
Filter to only associations matching the specified subject. Defaults to None. |
None
|
subject_closure |
str
|
Filter to only associations with the specified term ID as an ancestor of the subject. Defaults to None |
None
|
object |
str
|
Filter to only associations matching the specified object. Defaults to None. |
None
|
object_closure |
str
|
Filter to only associations with the specified term ID as an ancestor of the object. Defaults to None |
None
|
entity |
str
|
Filter to only associations where the specified entity is the subject or the object. Defaults to None. |
None
|
offset |
int
|
Result offset, for pagination. Defaults to 0. |
0
|
limit |
int
|
Limit results to specified number. Defaults to 20. |
20
|
Raises:
Type | Description |
---|---|
NotImplementedError
|
Use a specific implementation (see the documentation for a list of implementations) |
Returns:
Type | Description |
---|---|
AssociationResults
|
AssociationResults: Dataclass representing results of an association search. |