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

Add input as as ancestor of itself #41

Open
amykglen opened this issue Aug 13, 2021 · 6 comments
Open

Add input as as ancestor of itself #41

amykglen opened this issue Aug 13, 2021 · 6 comments
Assignees

Comments

@amykglen
Copy link

I noticed that the Biolink Lookup Service seems to return only proper ancestors (i.e., excluding the input item), but all descendants (i.e., including the input item).

for example, this ancestor query for MolecularMixture:

curl -X GET "https://bl-lookup-sri.renci.org/bl/MolecularMixture/ancestors?version=2.1.0" -H  "accept: application/json"

does not return MolecularMixture:

[
  "biolink:ChemicalMixture",
  "biolink:ChemicalEntity",
  "biolink:NamedThing",
  "biolink:Entity",
  "biolink:PhysicalEssence",
  "biolink:PhysicalEssenceOrOccurrent",
  "biolink:ChemicalOrDrugOrTreatment",
  "biolink:ChemicalEntityOrGeneOrGeneProduct",
  "biolink:ChemicalEntityOrProteinOrPolypeptide"
]

but this descendant query for MolecularMixture:

curl -X GET "https://bl-lookup-sri.renci.org/bl/MolecularMixture/descendants?version=2.1.0" -H  "accept: application/json"

does return MolecularMixture:

[
  "biolink:MolecularMixture",
  "biolink:Drug"
]

is this deliberate? the inconsistency seems a bit odd to me.

@cbizon
Copy link
Contributor

cbizon commented Sep 1, 2021

I think this is a duplicate - but let me know if that is wrong.

@cbizon cbizon closed this as completed Sep 1, 2021
@amykglen
Copy link
Author

amykglen commented Sep 1, 2021

@cbizon - sorry, what issue is this a duplicate for? It's not the same as #42 - doesn't involve mixins.

@cbizon
Copy link
Contributor

cbizon commented Sep 1, 2021

oops, thanks for pointing that out

@cbizon cbizon reopened this Sep 1, 2021
@cbizon
Copy link
Contributor

cbizon commented Sep 1, 2021

Ah, my reading comprehension needs some work - yes I agree that this is inconsistent. Do you have a preference on which direction we should standardize. I don't particularly.

@amykglen
Copy link
Author

amykglen commented Sep 1, 2021

I'd prefer that the input item is returned as an ancestor/descendant of itself, but I'm fine with either way (easy enough to add the input item to the returned items).

@cbizon cbizon changed the title Returns only proper ancestors, but all descendants Add input as as ancestor of itself Sep 1, 2021
@cbizon
Copy link
Contributor

cbizon commented Sep 1, 2021

I'm pretty sure that there's an option on the BMT calls for ancestor / descendant. Not sure if it shares this inconsistancy or not, but it's easy to fix up at the service level.

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

No branches or pull requests

3 participants