TranslatorSRI / SRI_testing

MIT License
0 stars 1 forks source link

raise subject entity produces errors when it should not #73

Open cbizon opened 1 year ago

cbizon commented 1 year ago

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 commented 1 year ago

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)?