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

Shex error when reporting multiple violations #257

Open
lpalbou opened this issue Feb 26, 2021 · 3 comments
Open

Shex error when reporting multiple violations #257

lpalbou opened this issue Feb 26, 2021 · 3 comments
Assignees

Comments

@lpalbou
Copy link
Contributor

lpalbou commented Feb 26, 2021

I saw that in the past and fixed one of those issues with ben, but we still have (randomly) wrong error reporting when a model has multiple violations.

Taking example http:https://noctua.geneontology.org/editor/graph/gomodel:59bee34700000179 , activating the reasoner will show 2 shex errors.

Error 1

109230460-c8e2ff80-7779-11eb-9d20-e0ad05ac1aae

I thought error 1 was because we don't allow a MF has part MF. Not sure that's great but we actually do:

has_part: @<MolecularFunction> *;
So this reporting is wrong.

Side note : I am unsure about the actual distinction we want to make between MF and molecular events since all activities have both root types.

Error 2:

Screen Shot 2021-02-25 at 4 46 22 PM

Just reading the shex response, it indicates enabled_by (RO:0002233) should target a protein complex or a chemical entity... which is wrong and indeed does not reflect our shex:

enabled_by: ( @<InformationBiomacromolecule> OR @<ProteinContainingComplex> ) {0,1};

So that's another wrong violation reporting. In essence, when the shex engine is reporting those violations, if the first error doesn't make sense, other reported violations won't.

However

If the shex violation reporting are wrong, they still indicate accurately the model is invalid. I've had that experience with other models too. Fortunately, the subject & object reported in that shex response are still valid and usable. For that model, the subject/object ids allowed to track the violation from the activity to a node xxx1244 (DNA motif) linked through a has_input relationship. And indeed has_input should target a protein complex or a chemical entity:

has_input: ( @<ChemicalEntity> OR @<ProteinContainingComplex> ) *;

And the model is stating activity has_part SO term "DNA motif" :

Screen Shot 2021-02-25 at 4 55 43 PM

Removing that DNA motif removed the shex violations (also created some issue with minerva/graph when trying to undo the change: geneontology/minerva#371). So the reporting has still some usefulness but it can not be used directly when there are multiple violations. @balhoff @cmungall

@cmungall
Copy link
Member

Error1:

in fact the reporting is correct. We do not allow assertions MF part-of MF. Remember, this is not a reasoner report, this is a shex validation report, which imposes structure on the asserted graph, not the entailed graph

Error2:

Just reading the shex response, it indicates enabled_by (00033) should target a protein complex or a chemical entity... which is wrong and indeed does not reflect our shex:

There is no 00033; I think in fact this is complaining about the has-input to the SO dna binding motif. So this does in fact violate the shex

(we may want to extend it to allow SO, I believe that discussion is happening elsewhere as a result of greekc work @pgaudet @vanaukenk? In any case, I recommend a separate ticket for this, and putting an rdfs:comment in the shapefile for the interim)

I think this explains your "however"

So in summary, I think the shex validator is working as intended. We may or may not want to consider relaxing constraints in certain areas, but that would be for other tickets. So I think we can close?

@cmungall cmungall reopened this Feb 26, 2021
@cmungall
Copy link
Member

I chatted with @lpalbou - in fact I was wrong with the first case, there does indeed seem to be some oddities in errors downstream propagating up...

@lpalbou
Copy link
Contributor Author

lpalbou commented Feb 26, 2021

Minimal error to reproduce:
http:https://noctua-dev.berkeleybop.org/download/gomodel:60297eed00000021/owl

Remove/Undo removal of DNA motif term

@prefix : <http:https://model.geneontology.org/60297eed00000021#> .
@prefix owl: <http:https://www.w3.org/2002/07/owl#> .
@prefix rdf: <http:https://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xml: <http:https://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http:https://www.w3.org/2001/XMLSchema#> .
@prefix rdfs: <http:https://www.w3.org/2000/01/rdf-schema#> .
@base <http:https://model.geneontology.org/60297eed00000021> .

<http:https://model.geneontology.org/60297eed00000021> rdf:type owl:Ontology ;
                                                  owl:versionIRI <http:https://model.geneontology.org/60297eed00000021> ;
                                                  <http:https://geneontology.org/lego/modelstate> "development" ;
                                                  <http:https://purl.org/dc/elements/1.1/date> "2021-02-25"^^xsd:string .

#################################################################
#    Annotation properties
#################################################################

###  http:https://geneontology.org/lego/modelstate
<http:https://geneontology.org/lego/modelstate> rdf:type owl:AnnotationProperty .


###  http:https://purl.org/dc/elements/1.1/contributor
<http:https://purl.org/dc/elements/1.1/contributor> rdf:type owl:AnnotationProperty .


###  http:https://purl.org/dc/elements/1.1/date
<http:https://purl.org/dc/elements/1.1/date> rdf:type owl:AnnotationProperty .


###  http:https://purl.org/pav/providedBy
<http:https://purl.org/pav/providedBy> rdf:type owl:AnnotationProperty .


#################################################################
#    Object Properties
#################################################################

###  http:https://purl.obolibrary.org/obo/BFO_0000051
<http:https://purl.obolibrary.org/obo/BFO_0000051> rdf:type owl:ObjectProperty .


###  http:https://purl.obolibrary.org/obo/RO_0002233
<http:https://purl.obolibrary.org/obo/RO_0002233> rdf:type owl:ObjectProperty .


#################################################################
#    Classes
#################################################################

###  http:https://identifiers.org/uniprot/P46527
<http:https://identifiers.org/uniprot/P46527> rdf:type owl:Class .


###  http:https://purl.obolibrary.org/obo/GO_0000978
<http:https://purl.obolibrary.org/obo/GO_0000978> rdf:type owl:Class .


###  http:https://purl.obolibrary.org/obo/GO_0001228
<http:https://purl.obolibrary.org/obo/GO_0001228> rdf:type owl:Class .


###  http:https://purl.obolibrary.org/obo/SO_0000713
<http:https://purl.obolibrary.org/obo/SO_0000713> rdf:type owl:Class .


#################################################################
#    Individuals
#################################################################

###  http:https://model.geneontology.org/60297eed00000021/60297eed00000024
<http:https://model.geneontology.org/60297eed00000021/60297eed00000024> rdf:type owl:NamedIndividual ,
                                                                           <http:https://purl.obolibrary.org/obo/GO_0001228> ;
                                                                  <http:https://purl.obolibrary.org/obo/BFO_0000051> <http:https://model.geneontology.org/60297eed00000021/60297eed00000029> ;
                                                                  <http:https://purl.org/dc/elements/1.1/date> "2021-02-25"^^xsd:string .

[ rdf:type owl:Axiom ;
   owl:annotatedSource <http:https://model.geneontology.org/60297eed00000021/60297eed00000024> ;
   owl:annotatedProperty <http:https://purl.obolibrary.org/obo/BFO_0000051> ;
   owl:annotatedTarget <http:https://model.geneontology.org/60297eed00000021/60297eed00000029> ;
   <http:https://purl.org/dc/elements/1.1/contributor> "http:https://orcid.org/0000-0001-8244-1536"^^xsd:string ;
   <http:https://purl.org/dc/elements/1.1/date> "2021-02-25"^^xsd:string ;
   <http:https://purl.org/pav/providedBy> "http:https://geneontology.org"
 ] .


###  http:https://model.geneontology.org/60297eed00000021/60297eed00000028
<http:https://model.geneontology.org/60297eed00000021/60297eed00000028> rdf:type owl:NamedIndividual ,
                                                                           <http:https://identifiers.org/uniprot/P46527> ;
                                                                  <http:https://purl.org/dc/elements/1.1/contributor> "http:https://orcid.org/0000-0001-8244-1536"^^xsd:string ;
                                                                  <http:https://purl.org/dc/elements/1.1/date> "2021-02-25"^^xsd:string ;
                                                                  <http:https://purl.org/pav/providedBy> "http:https://geneontology.org" .


###  http:https://model.geneontology.org/60297eed00000021/60297eed00000029
<http:https://model.geneontology.org/60297eed00000021/60297eed00000029> rdf:type owl:NamedIndividual ,
                                                                           <http:https://purl.obolibrary.org/obo/GO_0000978> ;
                                                                  <http:https://purl.obolibrary.org/obo/RO_0002233> <http:https://model.geneontology.org/60297eed00000021/60297eed00000032> ;
                                                                  <http:https://purl.org/dc/elements/1.1/date> "2021-02-25"^^xsd:string .

[ rdf:type owl:Axiom ;
   owl:annotatedSource <http:https://model.geneontology.org/60297eed00000021/60297eed00000029> ;
   owl:annotatedProperty <http:https://purl.obolibrary.org/obo/RO_0002233> ;
   owl:annotatedTarget <http:https://model.geneontology.org/60297eed00000021/60297eed00000032> ;
   <http:https://purl.org/dc/elements/1.1/contributor> "http:https://orcid.org/0000-0001-8244-1536"^^xsd:string ;
   <http:https://purl.org/dc/elements/1.1/date> "2021-02-25"^^xsd:string ;
   <http:https://purl.org/pav/providedBy> "http:https://geneontology.org"
 ] .


###  http:https://model.geneontology.org/60297eed00000021/60297eed00000032
<http:https://model.geneontology.org/60297eed00000021/60297eed00000032> rdf:type owl:NamedIndividual ,
                                                                           <http:https://purl.obolibrary.org/obo/SO_0000713> ;
                                                                  <http:https://purl.org/dc/elements/1.1/contributor> "http:https://orcid.org/0000-0001-8244-1536"^^xsd:string ;
                                                                  <http:https://purl.org/dc/elements/1.1/date> "2021-02-25"^^xsd:string ;
                                                                  <http:https://purl.org/pav/providedBy> "http:https://geneontology.org" .


###  Generated by the OWL API (version 4.5.15) https://github.com/owlcs/owlapi

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