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 sparql check for annotations #1659

Merged
merged 3 commits into from
Jul 15, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 @@ -38,7 +38,7 @@ REPORT_FAIL_ON = ERROR
REPORT_LABEL =
REPORT_PROFILE_OPTS =
OBO_FORMAT_OPTIONS =
SPARQL_VALIDATION_CHECKS = equivalent-classes owldef-self-reference nolabels pmid-not-dbxref obsolete-replaced_by orcid-contributor
SPARQL_VALIDATION_CHECKS = equivalent-classes owldef-self-reference nolabels pmid-not-dbxref obsolete-replaced_by orcid-contributor illegal-annotation-property
SPARQL_EXPORTS = basic-report
ODK_VERSION_MAKEFILE = v1.3.1

Expand Down
1 change: 1 addition & 0 deletions src/ontology/cl-odk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ robot_report:
- pmid-not-dbxref
- obsolete-replaced_by
- orcid-contributor
- illegal-annotation-property
custom_sparql_exports :
- basic-report
components:
Expand Down
51 changes: 51 additions & 0 deletions src/sparql/illegal-annotation-property-violation.sparql
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
PREFIX owl: <http://www.w3.org/2002/07/owl#>
SELECT DISTINCT ?annotation WHERE {
?annotation a owl:AnnotationProperty .
?subj ?annotation ?o .
FILTER (?annotation NOT IN (
<http://purl.obolibrary.org/obo/IAO_0000115>,
<http://purl.obolibrary.org/obo/IAO_0000116>,
<http://purl.obolibrary.org/obo/IAO_0000231>,
<http://purl.obolibrary.org/obo/IAO_0000232>,
<http://purl.obolibrary.org/obo/IAO_0000412>,
<http://purl.obolibrary.org/obo/IAO_0000589>,
<http://purl.obolibrary.org/obo/IAO_0100001>,
<http://purl.obolibrary.org/obo/RO_0002161>,
<http://purl.obolibrary.org/obo/RO_0002171>,
<http://purl.obolibrary.org/obo/RO_0002173>,
<http://purl.obolibrary.org/obo/RO_0002174>,
<http://purl.obolibrary.org/obo/RO_0002175>,
<http://purl.obolibrary.org/obo/RO_0002423>,
<http://purl.obolibrary.org/obo/RO_0002475>,
<http://purl.obolibrary.org/obo/RO_0002575>,
<http://purl.obolibrary.org/obo/RO_0002579>,
<http://purl.obolibrary.org/obo/RO_0002604>,
<http://purl.obolibrary.org/obo/RO_0004049>,
<http://purl.obolibrary.org/obo/RO_0004050>,
<http://purl.obolibrary.org/obo/RO_0040042>,
<http://purl.obolibrary.org/obo/term_editor>,
<http://purl.org/dc/terms/date>,
<http://purl.org/dc/elements/1.1/description>,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dce should not be needed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wherever its used, change to dct

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even in the ontology? It's not included here.

<http://purl.org/dc/terms/source>,
<http://purl.org/dc/terms/contributor>,
<http://purl.org/spar/cito/citesAsAuthority>,
<http://www.geneontology.org/formats/oboInOwl#consider>,
<http://www.geneontology.org/formats/oboInOwl#creation_date>,
<http://www.geneontology.org/formats/oboInOwl#hasAlternativeId>,
<http://www.geneontology.org/formats/oboInOwl#hasBroadSynonym>,
<http://www.geneontology.org/formats/oboInOwl#hasDbXref>,
<http://www.geneontology.org/formats/oboInOwl#hasExactSynonym>,
<http://www.geneontology.org/formats/oboInOwl#hasNarrowSynonym>,
<http://www.geneontology.org/formats/oboInOwl#hasOBONamespace>,
<http://www.geneontology.org/formats/oboInOwl#hasRelatedSynonym>,
<http://www.geneontology.org/formats/oboInOwl#id>,
<http://www.geneontology.org/formats/oboInOwl#inSubset>,
<http://www.w3.org/2000/01/rdf-schema#comment>,
<http://www.w3.org/2000/01/rdf-schema#label>,
<http://www.w3.org/2000/01/rdf-schema#seeAlso>,
<http://www.w3.org/2004/02/skos/core#closeMatch>,
matentzn marked this conversation as resolved.
Show resolved Hide resolved
<http://www.w3.org/2002/07/owl#deprecated>,
<http://xmlns.com/foaf/0.1/depicted_by>
))
FILTER (isIRI(?subj) && STRSTARTS(str(?subj), "http://purl.obolibrary.org/obo/CL_"))
}