Skip to content

Commit

Permalink
Add obsoletion pipeline sparql queries
Browse files Browse the repository at this point in the history
  • Loading branch information
matentzn committed Aug 16, 2023
1 parent a0b8ca8 commit 3f53fd8
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/sparql/qc/general/qc-obsoletion-reason.sparql
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ SELECT ?entity ?property ?value WHERE {
VALUES ?property { IAO:0000231 }
?entity ?property ?value .
FILTER(!isIRI(?value))
FILTER(?value!=OMO:00001000 ||
FILTER(?value!=OMO:0001000 ||
?value!=IAO:0000423 ||
?value!=IAO:0000229 ||
?value!=MONDO:TermsMerged )
Expand Down
36 changes: 36 additions & 0 deletions src/sparql/reports/not-under-a-grouping.sparql
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
prefix IAO: <http://purl.obolibrary.org/obo/IAO_>
prefix MONDO: <http://purl.obolibrary.org/obo/MONDO_>
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix oio: <http://www.geneontology.org/formats/oboInOwl#>
prefix def: <http://purl.obolibrary.org/obo/IAO_0000115>
prefix owl: <http://www.w3.org/2002/07/owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

SELECT ?mondo_id ?label ?definition

WHERE
{
?mondo_id a owl:Class .
OPTIONAL {
?mondo_id rdfs:label ?label .
}
OPTIONAL {
?mondo_id IAO:0000115 ?definition .
}

FILTER((STRSTARTS(STR(?mondo_id),"http://purl.obolibrary.org/obo/MONDO_")))

FILTER NOT EXISTS { ?mondo_id owl:deprecated true }

FILTER NOT EXISTS {
VALUES ?grouping {
MONDO:0000001
MONDO:0042489
MONDO:0021178
MONDO:0021125
}
?mondo_id rdfs:subClassOf* ?grouping .
}

}
6 changes: 6 additions & 0 deletions src/sparql/update/mondo-obsolete-simple.ru
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ INSERT {
?entity <http://purl.obolibrary.org/obo/IAO_0000231> "out of scope" .
?entity <http://purl.obolibrary.org/obo/IAO_0000115> ?obsolete_definition .
?def_anno owl:annotatedTarget ?obsolete_definition.
?entity <http://purl.obolibrary.org/obo/IAO_0000231> <http://purl.obolibrary.org/obo/OMO_0001000> .
?xref_anno a owl:Axiom ;
owl:annotatedSource ?entity ;
owl:annotatedProperty <http://purl.obolibrary.org/obo/IAO_0000231> ;
owl:annotatedTarget <http://purl.obolibrary.org/obo/OMO_0001000> ;
oboInOwl:source "MONDO:excludeGrouping" .
}

WHERE {
Expand Down

0 comments on commit 3f53fd8

Please sign in to comment.