Open lpalbou opened 3 years ago
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?
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...
Minimal error to reproduce: http://noctua-dev.berkeleybop.org/download/gomodel:60297eed00000021/owl
Remove/Undo removal of DNA motif term
@prefix : <http://model.geneontology.org/60297eed00000021#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@base <http://model.geneontology.org/60297eed00000021> .
<http://model.geneontology.org/60297eed00000021> rdf:type owl:Ontology ;
owl:versionIRI <http://model.geneontology.org/60297eed00000021> ;
<http://geneontology.org/lego/modelstate> "development" ;
<http://purl.org/dc/elements/1.1/date> "2021-02-25"^^xsd:string .
#################################################################
# Annotation properties
#################################################################
### http://geneontology.org/lego/modelstate
<http://geneontology.org/lego/modelstate> rdf:type owl:AnnotationProperty .
### http://purl.org/dc/elements/1.1/contributor
<http://purl.org/dc/elements/1.1/contributor> rdf:type owl:AnnotationProperty .
### http://purl.org/dc/elements/1.1/date
<http://purl.org/dc/elements/1.1/date> rdf:type owl:AnnotationProperty .
### http://purl.org/pav/providedBy
<http://purl.org/pav/providedBy> rdf:type owl:AnnotationProperty .
#################################################################
# Object Properties
#################################################################
### http://purl.obolibrary.org/obo/BFO_0000051
<http://purl.obolibrary.org/obo/BFO_0000051> rdf:type owl:ObjectProperty .
### http://purl.obolibrary.org/obo/RO_0002233
<http://purl.obolibrary.org/obo/RO_0002233> rdf:type owl:ObjectProperty .
#################################################################
# Classes
#################################################################
### http://identifiers.org/uniprot/P46527
<http://identifiers.org/uniprot/P46527> rdf:type owl:Class .
### http://purl.obolibrary.org/obo/GO_0000978
<http://purl.obolibrary.org/obo/GO_0000978> rdf:type owl:Class .
### http://purl.obolibrary.org/obo/GO_0001228
<http://purl.obolibrary.org/obo/GO_0001228> rdf:type owl:Class .
### http://purl.obolibrary.org/obo/SO_0000713
<http://purl.obolibrary.org/obo/SO_0000713> rdf:type owl:Class .
#################################################################
# Individuals
#################################################################
### http://model.geneontology.org/60297eed00000021/60297eed00000024
<http://model.geneontology.org/60297eed00000021/60297eed00000024> rdf:type owl:NamedIndividual ,
<http://purl.obolibrary.org/obo/GO_0001228> ;
<http://purl.obolibrary.org/obo/BFO_0000051> <http://model.geneontology.org/60297eed00000021/60297eed00000029> ;
<http://purl.org/dc/elements/1.1/date> "2021-02-25"^^xsd:string .
[ rdf:type owl:Axiom ;
owl:annotatedSource <http://model.geneontology.org/60297eed00000021/60297eed00000024> ;
owl:annotatedProperty <http://purl.obolibrary.org/obo/BFO_0000051> ;
owl:annotatedTarget <http://model.geneontology.org/60297eed00000021/60297eed00000029> ;
<http://purl.org/dc/elements/1.1/contributor> "http://orcid.org/0000-0001-8244-1536"^^xsd:string ;
<http://purl.org/dc/elements/1.1/date> "2021-02-25"^^xsd:string ;
<http://purl.org/pav/providedBy> "http://geneontology.org"
] .
### http://model.geneontology.org/60297eed00000021/60297eed00000028
<http://model.geneontology.org/60297eed00000021/60297eed00000028> rdf:type owl:NamedIndividual ,
<http://identifiers.org/uniprot/P46527> ;
<http://purl.org/dc/elements/1.1/contributor> "http://orcid.org/0000-0001-8244-1536"^^xsd:string ;
<http://purl.org/dc/elements/1.1/date> "2021-02-25"^^xsd:string ;
<http://purl.org/pav/providedBy> "http://geneontology.org" .
### http://model.geneontology.org/60297eed00000021/60297eed00000029
<http://model.geneontology.org/60297eed00000021/60297eed00000029> rdf:type owl:NamedIndividual ,
<http://purl.obolibrary.org/obo/GO_0000978> ;
<http://purl.obolibrary.org/obo/RO_0002233> <http://model.geneontology.org/60297eed00000021/60297eed00000032> ;
<http://purl.org/dc/elements/1.1/date> "2021-02-25"^^xsd:string .
[ rdf:type owl:Axiom ;
owl:annotatedSource <http://model.geneontology.org/60297eed00000021/60297eed00000029> ;
owl:annotatedProperty <http://purl.obolibrary.org/obo/RO_0002233> ;
owl:annotatedTarget <http://model.geneontology.org/60297eed00000021/60297eed00000032> ;
<http://purl.org/dc/elements/1.1/contributor> "http://orcid.org/0000-0001-8244-1536"^^xsd:string ;
<http://purl.org/dc/elements/1.1/date> "2021-02-25"^^xsd:string ;
<http://purl.org/pav/providedBy> "http://geneontology.org"
] .
### http://model.geneontology.org/60297eed00000021/60297eed00000032
<http://model.geneontology.org/60297eed00000021/60297eed00000032> rdf:type owl:NamedIndividual ,
<http://purl.obolibrary.org/obo/SO_0000713> ;
<http://purl.org/dc/elements/1.1/contributor> "http://orcid.org/0000-0001-8244-1536"^^xsd:string ;
<http://purl.org/dc/elements/1.1/date> "2021-02-25"^^xsd:string ;
<http://purl.org/pav/providedBy> "http://geneontology.org" .
### Generated by the OWL API (version 4.5.15) https://github.com/owlcs/owlapi
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://noctua.geneontology.org/editor/graph/gomodel:59bee34700000179 , activating the reasoner will show 2 shex errors.
Error 1
I thought error 1 was because we don't allow a MF has part MF. Not sure that's great but we actually do: https://github.com/geneontology/go-shapes/blob/e05a415d8b5178c4ac2b4662d42171d14f19a1cf/shapes/go-cam-shapes.shex#L368 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:
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: https://github.com/geneontology/go-shapes/blob/e05a415d8b5178c4ac2b4662d42171d14f19a1cf/shapes/go-cam-shapes.shex#L366
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: https://github.com/geneontology/go-shapes/blob/e05a415d8b5178c4ac2b4662d42171d14f19a1cf/shapes/go-cam-shapes.shex#L371
And the model is stating activity has_part SO term "DNA motif" :
Removing that DNA motif removed the shex violations (also created some issue with minerva/graph when trying to undo the change: https://github.com/geneontology/minerva/issues/371). So the reporting has still some usefulness but it can not be used directly when there are multiple violations. @balhoff @cmungall