Skip to content

Commit

Permalink
Filter out related xrefs. (#29117)
Browse files Browse the repository at this point in the history
  • Loading branch information
balhoff authored Oct 25, 2024
1 parent cf91365 commit b12d0ff
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/ontology/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ $(GO_LEGO_REACTO).owl: extensions/go-lego-reacto-edit.ofn $(GO_LEGO).owl extensi
# go.obo is a simplified; we use oort to remove imports etc
# This version of the ontology is used in another step (generate-mappings) prior to filtering narrow xrefs, but broad xrefs are filtered here
$(ONT)-pre.owl: reasoned.owl
$(ROBOT) materialize --input $< --reasoner ELK $(addprefix --term ,$(GO_MAIN_RELATIONS)) remove --select imports --trim true remove --select '<http://purl.obolibrary.org/obo/GO_*>' --select complement --select classes --signature true --trim true remove $(addprefix --term ,$(GO_MAIN_RELATIONS)) --select complement --select object-properties --signature true --trim true query --update ../sparql/remove-broad-xrefs.ru annotate -O $(OBO)/$(ONT).owl -V $(RELEASE_URIBASE)/$(ONT).owl convert -f owl --output $@.tmp && mv $@.tmp $@
$(ROBOT) materialize --input $< --reasoner ELK $(addprefix --term ,$(GO_MAIN_RELATIONS)) remove --select imports --trim true remove --select '<http://purl.obolibrary.org/obo/GO_*>' --select complement --select classes --signature true --trim true remove $(addprefix --term ,$(GO_MAIN_RELATIONS)) --select complement --select object-properties --signature true --trim true query --update ../sparql/remove-broad-xrefs.ru --update ../sparql/remove-related-xrefs.ru annotate -O $(OBO)/$(ONT).owl -V $(RELEASE_URIBASE)/$(ONT).owl convert -f owl --output $@.tmp && mv $@.tmp $@

$(ONT)-pre-reduced.owl: $(ONT)-pre.owl
$(ROBOT) reduce -r elk -i $< query --update ../sparql/remove-narrow-xrefs.ru -o $@
Expand Down
16 changes: 16 additions & 0 deletions src/sparql/remove-related-xrefs.ru
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
prefix xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX oio: <http://www.geneontology.org/formats/oboInOwl#>

DELETE
WHERE {
?term oio:hasDbXref ?xref .
?axiom rdf:type owl:Axiom ;
owl:annotatedSource ?term ;
owl:annotatedProperty oio:hasDbXref ;
owl:annotatedTarget ?xref ;
oio:source "skos:relatedMatch"^^xsd:string ;
?p ?o .
}

0 comments on commit b12d0ff

Please sign in to comment.