From 786c660e74013af9dc545f703a1830bf6b00ddf7 Mon Sep 17 00:00:00 2001 From: Anita Caron Date: Fri, 13 Jan 2023 18:51:50 +0000 Subject: [PATCH] add iri-range-advanced QC --- src/ontology/Makefile | 2 +- src/ontology/uberon-odk.yaml | 1 + .../iri-range-advanced-violation.sparql | 21 +++++++++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100755 src/sparql/iri-range-advanced-violation.sparql diff --git a/src/ontology/Makefile b/src/ontology/Makefile index 3487200869..df15103f07 100644 --- a/src/ontology/Makefile +++ b/src/ontology/Makefile @@ -39,7 +39,7 @@ REPORT_FAIL_ON = ERROR REPORT_LABEL = REPORT_PROFILE_OPTS = --profile $(ROBOT_PROFILE) OBO_FORMAT_OPTIONS = -SPARQL_VALIDATION_CHECKS = equivalent-classes owldef-self-reference illegal-annotation-property taxon-range orcid-contributor obsolete-replaced_by xrefs-mesh-pattern label-synonym-polysemy +SPARQL_VALIDATION_CHECKS = equivalent-classes owldef-self-reference illegal-annotation-property taxon-range orcid-contributor obsolete-replaced_by xrefs-mesh-pattern label-synonym-polysemy iri-range-advanced SPARQL_EXPORTS = basic-report ODK_VERSION_MAKEFILE = v1.3.1 diff --git a/src/ontology/uberon-odk.yaml b/src/ontology/uberon-odk.yaml index 823459f78b..535cd8c8fe 100644 --- a/src/ontology/uberon-odk.yaml +++ b/src/ontology/uberon-odk.yaml @@ -108,6 +108,7 @@ robot_report: - obsolete-replaced_by - xrefs-mesh-pattern - label-synonym-polysemy + - iri-range-advanced custom_sparql_exports: - basic-report owltools_memory: '20G' diff --git a/src/sparql/iri-range-advanced-violation.sparql b/src/sparql/iri-range-advanced-violation.sparql new file mode 100755 index 0000000000..7e3f66b771 --- /dev/null +++ b/src/sparql/iri-range-advanced-violation.sparql @@ -0,0 +1,21 @@ +PREFIX never_in_taxon: +PREFIX present_in_taxon: +PREFIX oboInOwl: +PREFIX dcterms: +PREFIX rdfs: +PREFIX foaf: + +SELECT ?term ?property ?value +WHERE { + VALUES ?property { + never_in_taxon: + present_in_taxon: + rdfs:seeAlso + foaf:depicted_by + oboInOwl:inSubset + dcterms:contributor } + ?term ?property ?value . + FILTER(isIRI(?term) && (STRSTARTS(str(?term), "http://purl.obolibrary.org/obo/UBERON_") || STRSTARTS(str(?term), "http://purl.obolibrary.org/obo/UBERON_") || STRSTARTS(str(?term), "http://purl.obolibrary.org/obo/uberon#") || STRSTARTS(str(?term), "http://purl.obolibrary.org/obo/UBPROP_") || STRSTARTS(str(?term), "http://purl.obolibrary.org/obo/uberon/core#"))) + FILTER (!isIRI(?value)) +} +