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 check for definition xrefs that are not also term xrefs #29161

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ontology/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ imports/go-taxon-groupings.obo: imports/go-taxon-groupings.owl
# these live in the ../sparql directory, and have suffix -violation.sparql
# adding the name here will make the violation check live

VCHECKS = equivalent-classes trailing-whitespace owldef-self-reference synonym-label-match replacedby-obsolete replacedby-namespace duplicate-exact-synonym duplicate-synonym non-IRI-value non-anyURI-value obsolete-definition definition-constraints one-to-one-xrefs-by-subject one-to-one-xrefs-by-value xref-syntax
VCHECKS = equivalent-classes trailing-whitespace owldef-self-reference synonym-label-match replacedby-obsolete replacedby-namespace duplicate-exact-synonym duplicate-synonym non-IRI-value non-anyURI-value obsolete-definition definition-constraints one-to-one-xrefs-by-subject one-to-one-xrefs-by-value xref-syntax missing-defxref-as-xref

# run all violation checks
VARGS = $(foreach V,$(VCHECKS), $(SPARQLDIR)/$V-violation.sparql)
Expand Down
27 changes: 27 additions & 0 deletions src/sparql/missing-defxref-as-xref-violation.sparql
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
prefix oio: <http://www.geneontology.org/formats/oboInOwl#>
prefix definition: <http://purl.obolibrary.org/obo/IAO_0000115>
prefix owl: <http://www.w3.org/2002/07/owl#>

SELECT DISTINCT ?cls ?defxref
WHERE
{
?cls a owl:Class .
FILTER NOT EXISTS {
?cls owl:deprecated true .
}
[
a owl:Axiom ;
owl:annotatedSource ?cls ;
owl:annotatedProperty definition: ;
oio:hasDbXref ?defxref
]
FILTER(STRSTARTS(?defxref, "RHEA")
|| STRSTARTS(?defxref, "EC")
|| STRSTARTS(?defxref, "MetaCyc")
|| STRSTARTS(?defxref, "KEGG")
|| STRSTARTS(?defxref, "UM-BBD")
|| STRSTARTS(?defxref, "TC"))
FILTER NOT EXISTS {
?cls oio:hasDbXref ?defxref .
}
}
Loading