diff --git a/src/ontology/Makefile b/src/ontology/Makefile
index a4444e365c..c2b871607b 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
+SPARQL_VALIDATION_CHECKS = equivalent-classes owldef-self-reference illegal-annotation-property taxon-range orcid-contributor obsolete-replaced_by
SPARQL_EXPORTS = basic-report
ODK_VERSION_MAKEFILE = v1.3.0
diff --git a/src/ontology/uberon-odk.yaml b/src/ontology/uberon-odk.yaml
index ab83b7705e..282f5d8fe2 100644
--- a/src/ontology/uberon-odk.yaml
+++ b/src/ontology/uberon-odk.yaml
@@ -99,6 +99,7 @@ robot_report:
- illegal-annotation-property
- taxon-range
- orcid-contributor
+ - obsolete-replaced_by
custom_sparql_exports:
- basic-report
owltools_memory: '20G'
diff --git a/src/sparql/obsolete-replaced_by-violation.sparql b/src/sparql/obsolete-replaced_by-violation.sparql
new file mode 100644
index 0000000000..9860902be6
--- /dev/null
+++ b/src/sparql/obsolete-replaced_by-violation.sparql
@@ -0,0 +1,67 @@
+PREFIX obo:
+PREFIX oboInOwl:
+PREFIX owl:
+PREFIX rdfs:
+PREFIX rdf:
+PREFIX replaced_by:
+
+SELECT DISTINCT ?entity ?property ?value ?replaced_by WHERE {
+ {
+ VALUES ?property {
+ rdfs:subClassOf
+ }
+ ?entity a owl:Class;
+ owl:deprecated true ;
+ ?property ?value .
+ OPTIONAL { ?entity replaced_by: ?replaced_by }
+ FILTER ( ?value NOT IN (oboInOwl:ObsoleteClass, owl:Thing) )
+ }
+ UNION
+ {
+ VALUES ?property {
+ owl:equivalentClass
+ owl:disjointWith
+ }
+ ?entity a owl:Class;
+ owl:deprecated true ;
+ ?property ?value .
+ OPTIONAL { ?entity replaced_by: ?replaced_by }
+ }
+ UNION
+ {
+ VALUES ?property {
+ rdfs:subClassOf
+ owl:equivalentClass
+ owl:disjointWith
+ }
+ ?entity a owl:Class;
+ owl:deprecated true .
+ ?value ?property ?entity .
+ OPTIONAL { ?entity replaced_by: ?replaced_by }
+ }
+ UNION
+ {
+ VALUES ?property {
+ owl:ObjectProperty
+ owl:DataProperty
+ }
+ ?entity a owl:Class ;
+ owl:deprecated true ;
+ ?property ?value .
+ OPTIONAL { ?entity replaced_by: ?replaced_by }
+ }
+ UNION
+ {
+ VALUES ?property {
+ owl:someValuesFrom
+ owl:allValuesFrom
+ }
+ ?value a owl:Class ;
+ owl:deprecated true .
+ ?rest a owl:Restriction ;
+ ?property ?value .
+ OPTIONAL { ?value replaced_by: ?replaced_by }
+ BIND("blank node" as ?entity)
+ }
+}
+ORDER BY ?entity
\ No newline at end of file