Skip to content

Commit

Permalink
Add report for reviewing proxy merges (#8579)
Browse files Browse the repository at this point in the history
I am merging this because its needed now and does not effect the pipeline in any way.
  • Loading branch information
matentzn authored Jan 15, 2025
1 parent 7cedd2d commit 4673232
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions src/sparql/reports/review-proxy-merges.sparql
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
prefix owl: <http://www.w3.org/2002/07/owl#>
prefix oboInOwl: <http://www.geneontology.org/formats/oboInOwl#>
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>

#description: No two Mondo IDs should ever point to the same external ID

SELECT DISTINCT ?entity ?label ?entity2 ?label2 ?xref WHERE {
?entity oboInOwl:hasDbXref ?xref .
?entity rdfs:label ?label .

?entity2 oboInOwl:hasDbXref ?xref .
?entity2 rdfs:label ?label2 .

?xref_anno2 a owl:Axiom ;
owl:annotatedSource ?entity ;
owl:annotatedProperty oboInOwl:hasDbXref ;
owl:annotatedTarget ?xref ;
oboInOwl:source ?source1 .

?xref_anno a owl:Axiom ;
owl:annotatedSource ?entity2 ;
owl:annotatedProperty oboInOwl:hasDbXref ;
owl:annotatedTarget ?xref ;
oboInOwl:source ?source2 .

FILTER (?entity2!=?entity)
FILTER ((str(?source1)="MONDO:equivalentTo") || (str(?source1)="MONDO:obsoleteEquivalent") || (str(?source1)="MONDO:equivalentObsolete") || (str(?source1)="MONDO:obsoleteEquivalentObsolete"))
FILTER ((str(?source2)="MONDO:equivalentTo") || (str(?source2)="MONDO:obsoleteEquivalent") || (str(?source2)="MONDO:equivalentObsolete") || (str(?source2)="MONDO:obsoleteEquivalentObsolete"))
FILTER (isIRI(?entity) && STRSTARTS(str(?entity), "http://purl.obolibrary.org/obo/MONDO_"))
FILTER (isIRI(?entity2) && STRSTARTS(str(?entity2), "http://purl.obolibrary.org/obo/MONDO_"))
BIND(IRI(CONCAT("http://mondo.source/", ?xref)) AS ?property)
BIND(str(?entity2) as ?value)
}
ORDER BY ?entity

0 comments on commit 4673232

Please sign in to comment.