Skip to content
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

Support metakg queries with biolink model's semantic descendants #185

Closed
newgene opened this issue Mar 7, 2023 · 4 comments
Closed

Support metakg queries with biolink model's semantic descendants #185

newgene opened this issue Mar 7, 2023 · 4 comments
Assignees

Comments

@newgene
Copy link
Contributor

newgene commented Mar 7, 2023

Each edge in SmartAPI's metakg contains subject, object, predicate fields which are the terms based on the biolink model. We should add the metakg query support for searching on either of these fields by optionally expanding to include all descendant terms.

We can use biolink-model-toolkit to get the descendant of a given term.

In metakg's query handler, we can add explicit subject, object and predicate query parameters, and an optional expand parameter when can take values of subject, object and predicate (include their combinations), so that we can expand either or multiple fields when needed. Default is still not expanding these terms.

@newgene
Copy link
Contributor Author

newgene commented Mar 7, 2023

This is pending on the completion of #179

@NikkiBytes
Copy link
Collaborator

@newgene Is this related to the &expand option we added to the metakg and pathfinder?

@newgene
Copy link
Contributor Author

newgene commented Sep 26, 2024

@NikkiBytes yes, maybe you can add a brief usage comment of this expand parameter and then we can close this one.

@NikkiBytes
Copy link
Collaborator

Implemented feature in /metakg and and /metakg/paths endpoint, with &expand= option.
Currently it accepts 1 or more of the options: subject, object, predicate, node, edge, or all.
i.e https://smart-api.info/api/metakg/?subject=BiologicalEntity&object=BiologicalEntity&expand=subject

To view a summary of the terms that were found when expanded, use &rawquery=1:
https://smart-api.info/api/metakg/?subject=BiologicalEntity&object=BiologicalEntity&expand=subject&rawquery=1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants