Skip to content

Commit

Permalink
Issue 6464 taxonspecific (#6477)
Browse files Browse the repository at this point in the history
* add cross-species analog AP from axioms

closes #6464

@matentzn could you please review this PR?
In addition, I have specific questions:

* Finalise the cross species exact match injection

* updated sparql to include logical definition in taxon

---------

Co-authored-by: Nico Matentzoglu <[email protected]>
  • Loading branch information
sabrinatoro and matentzn authored Jul 26, 2023
1 parent d25d680 commit 145005c
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/ontology/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ filtered.obo: $(SRC)
if [ $(GITHUB_ACTION) = false ]; then $(ROBOT) query -i $@ --use-graphs false \
--update ../sparql/update/delete-axiom-annotations.ru \
--update ../sparql/update/delete-axiom-annotations-by-prefix.ru \
--update ../sparql/update/inject-cross-species-analog.ru \
remove --term-file config/remove-annotations-before-release.txt \
convert -f obo --check false -o $@.obo && mv $@.obo $@; fi
#egrep -v 'MONDO:(subClassOf|superClassOf|relatedTo)' $< > $@
Expand Down
54 changes: 54 additions & 0 deletions src/sparql/update/inject-cross-species-analog.ru
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
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#>

INSERT {
<https://w3id.org/semapv/vocab/crossSpeciesExactMatch> a owl:AnnotationProperty .
?cls <https://w3id.org/semapv/vocab/crossSpeciesExactMatch> ?mondohuman.
}

WHERE
{
?cls a owl:Class .
{
{
?cls rdfs:subClassOf [
owl:onProperty MONDO:0700097 ;
owl:someValuesFrom ?mondohuman
] .
}
} UNION {
?cls owl:equivalentClass [
owl:intersectionOf (
MONDO:0005583
[ rdf:type owl:Restriction ;
owl:onProperty MONDO:0700097 ;
owl:someValuesFrom ?mondohuman
]
)
] .
}

UNION {
?cls owl:equivalentClass [
owl:intersectionOf (
MONDO:0005583
[ rdf:type owl:Restriction ;
owl:onProperty MONDO:0700097 ;
owl:someValuesFrom ?mondohuman
]
[ rdf:type owl:Restriction ;
owl:onProperty <http://purl.obolibrary.org/obo/RO_0002162> ;
owl:someValuesFrom ?ncbiTaxon
]
)
] .
}

FILTER( !isBlank(?cls) && STRSTARTS(str(?cls), "http://purl.obolibrary.org/obo/MONDO_"))
}

0 comments on commit 145005c

Please sign in to comment.