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

raise subject entity produces errors when it should not #73

Open
cbizon opened this issue Nov 15, 2022 · 1 comment
Open

raise subject entity produces errors when it should not #73

cbizon opened this issue Nov 15, 2022 · 1 comment

Comments

@cbizon
Copy link
Collaborator

cbizon commented Nov 15, 2022

e.g. in automat-robokop, this test data:

(SequenceVariant)--[is_nearby_variant_of]->(Protein)
(CAID:CA15942114)--[biolink:is_nearby_variant_of]->(NCBIGene:1)

Generates an error in raise_subject_entity:

🚫 trapi.request.invalid
context: raise_subject_entity() test predicate CAID:CA15942114[biolink:SequenceVariant]
reason: has no 'is_a' parent since it is either not an ontology term or does not map onto a parent ontology term.

I don't think this should be an error. Not everything has a superclass, but that doesn't make it an error.

@RichardBruskiewich
Copy link
Collaborator

RichardBruskiewich commented Jan 10, 2023

Hi @cbizon, if we know a priori that a given category/predicate is not ontological - i.e. doesn't have a superclass - then this test simply ought to be excluded (there is a markup of test data that allows for this).

I think the original test was already written to fail if no superclass is available, but we could check that (in historical code).

Alternately, as you seem to hint here, do we recode things to only attempt validation where a given term has a superclass - thus just running the test if the superclass concept/predicate exists - but passing (or, I guess, perhaps inferring skipping of the test, with rationale) so as only to fail if the query outcome is unsuccessful (with the superclass concept/predicate used in the query)?

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

2 participants