Skip to content

Commit

Permalink
Merge pull request #2112 from obophenotype/annotation-violation
Browse files Browse the repository at this point in the history
Filter annotations not listed
  • Loading branch information
Anita Caron authored Nov 8, 2021
2 parents a8cc9f1 + 50cf4c2 commit aab34a0
Show file tree
Hide file tree
Showing 5 changed files with 126 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# This is a basic workflow to help you get started with Actions

# Basic ODK workflow
name: Docs

# Controls when the action will run.
Expand All @@ -21,4 +20,5 @@ jobs:
# Or use mhausenblas/mkdocs-deploy-gh-pages@nomaterial to build without the mkdocs-material theme
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CONFIG_FILE: mkdocs.yaml
CONFIG_FILE: mkdocs.yaml

11 changes: 6 additions & 5 deletions src/ontology/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,13 @@ TMPDIR= tmp
SCRIPTSDIR= ../scripts
SPARQLDIR = ../sparql
COMPONENTSDIR = components
REPORT_FAIL_ON = None
REPORT_LABEL = -l true
REPORT_PROFILE_OPTS =
ROBOT_PROFILE = profile.txt
REPORT_FAIL_ON = ERROR
REPORT_LABEL =
REPORT_PROFILE_OPTS = --profile $(ROBOT_PROFILE)
OBO_FORMAT_OPTIONS =
SPARQL_VALIDATION_CHECKS = equivalent-classes owldef-self-reference
SPARQL_EXPORTS = basic-report class-count-by-prefix edges xrefs obsoletes synonyms
SPARQL_VALIDATION_CHECKS = equivalent-classes owldef-self-reference illegal-annotation-property
SPARQL_EXPORTS = basic-report
ODK_VERSION_MAKEFILE = v1.2.31

TODAY ?= $(shell date +%Y-%m-%d)
Expand Down
25 changes: 25 additions & 0 deletions src/ontology/profile.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
WARN annotation_whitespace
ERROR deprecated_boolean_datatype
ERROR deprecated_class_reference
ERROR deprecated_property_reference
WARN duplicate_definition
WARN duplicate_exact_synonym
WARN duplicate_label_synonym
ERROR duplicate_label
WARN duplicate_scoped_synonym
WARN equivalent_pair
WARN invalid_xref
ERROR label_formatting
ERROR label_whitespace
INFO lowercase_definition
WARN missing_definition
ERROR missing_label
WARN missing_obsolete_label
ERROR missing_ontology_description
ERROR missing_ontology_license
ERROR missing_ontology_title
INFO missing_superclass
ERROR misused_obsolete_label
ERROR multiple_definitions
WARN multiple_equivalent_classes
ERROR multiple_labels
13 changes: 13 additions & 0 deletions src/ontology/uberon-odk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,19 @@ subset_group:
- id: amniote-basic
- id: euarchontoglires-basic
robot_java_args: '-Xmx20G'
robot_report:
release_reports: False
fail_on : ERROR
use_labels : False
custom_profile : True
report_on :
- edit
custom_sparql_checks :
- equivalent-classes
- owldef-self-reference
- illegal-annotation-property
custom_sparql_exports :
- basic-report
owltools_memory: '20G'
create_obo_metadata: FALSE
documentation:
Expand Down
79 changes: 79 additions & 0 deletions src/sparql/illegal-annotation-property-violation.sparql
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
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://geneontology.org/formats/oboInOwl#created_by>,
<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/UBPROP_0000001>,
<http://purl.obolibrary.org/obo/UBPROP_0000002>,
<http://purl.obolibrary.org/obo/UBPROP_0000003>,
<http://purl.obolibrary.org/obo/UBPROP_0000004>,
<http://purl.obolibrary.org/obo/UBPROP_0000005>,
<http://purl.obolibrary.org/obo/UBPROP_0000006>,
<http://purl.obolibrary.org/obo/UBPROP_0000007>,
<http://purl.obolibrary.org/obo/UBPROP_0000008>,
<http://purl.obolibrary.org/obo/UBPROP_0000009>,
<http://purl.obolibrary.org/obo/UBPROP_0000010>,
<http://purl.obolibrary.org/obo/UBPROP_0000011>,
<http://purl.obolibrary.org/obo/UBPROP_0000012>,
<http://purl.obolibrary.org/obo/UBPROP_0000013>,
<http://purl.obolibrary.org/obo/UBPROP_0000014>,
<http://purl.obolibrary.org/obo/UBPROP_0000015>,
<http://purl.obolibrary.org/obo/UBPROP_0000103>,
<http://purl.obolibrary.org/obo/UBPROP_0000104>,
<http://purl.obolibrary.org/obo/UBPROP_0000105>,
<http://purl.obolibrary.org/obo/UBPROP_0000106>,
<http://purl.obolibrary.org/obo/UBPROP_0000107>,
<http://purl.obolibrary.org/obo/UBPROP_0000108>,
<http://purl.obolibrary.org/obo/UBPROP_0000111>,
<http://purl.obolibrary.org/obo/UBPROP_0000112>,
<http://purl.obolibrary.org/obo/UBPROP_0000201>,
<http://purl.obolibrary.org/obo/UBPROP_0000202>,
<http://purl.obolibrary.org/obo/term_editor>,
<http://purl.org/dc/elements/1.1/contributor>,
<http://purl.org/dc/elements/1.1/creator>,
<http://purl.org/dc/elements/1.1/date>,
<http://purl.org/dc/elements/1.1/description>,
<http://purl.org/dc/terms/source>,
<http://purl.org/spar/cito/citesAsAuthority>,
<http://www.geneontology.org/formats/oboInOwl#consider>,
<http://www.geneontology.org/formats/oboInOwl#created_by>,
<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>,
<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/UBERON_"))
}

0 comments on commit aab34a0

Please sign in to comment.