-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26180 from geneontology/automate-precomputed-taxo…
…n-constraints Build computed taxon constraints as part of go-plus.
- Loading branch information
Showing
5 changed files
with
127 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> | ||
PREFIX owl: <http://www.w3.org/2002/07/owl#> | ||
PREFIX oio: <http://www.geneontology.org/formats/oboInOwl#> | ||
PREFIX in_taxon: <http://purl.obolibrary.org/obo/RO_0002162> | ||
CONSTRUCT { | ||
<http://purl.obolibrary.org/obo/go/imports/go-computed-taxon-constraints.owl#INTAXON> a owl:Ontology . | ||
in_taxon: a owl:ObjectProperty . | ||
?term rdfs:subClassOf _:taxon_restriction . | ||
_:taxon_restriction a owl:Restriction ; | ||
owl:onProperty in_taxon: ; | ||
owl:someValuesFrom ?taxon . | ||
[ | ||
a owl:Axiom ; | ||
owl:annotatedSource ?term ; | ||
owl:annotatedProperty rdfs:subClassOf ; | ||
owl:annotatedTarget _:taxon_restriction ; | ||
oio:source "computed" | ||
] | ||
} | ||
WHERE { | ||
?term rdfs:subClassOf [ | ||
a owl:Restriction ; | ||
owl:onProperty in_taxon: ; | ||
owl:someValuesFrom ?taxon | ||
] | ||
FILTER(STRSTARTS(STR(?term), "http://purl.obolibrary.org/obo/GO_")) | ||
FILTER(isIRI(?taxon)) | ||
FILTER(STRSTARTS(STR(?taxon), "http://purl.obolibrary.org/obo/NCBITaxon")) | ||
FILTER(!STRENDS(STR(?taxon), "#NOT")) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> | ||
PREFIX owl: <http://www.w3.org/2002/07/owl#> | ||
PREFIX in_taxon: <http://purl.obolibrary.org/obo/RO_0002162> | ||
INSERT { | ||
?complement_supertaxon rdfs:subClassOf ?complement_subtaxon . | ||
?complement_subtaxon owl:equivalentClass [ | ||
a owl:Class ; | ||
owl:complementOf ?subtaxon | ||
] . | ||
} | ||
WHERE { | ||
?subtaxon rdfs:subClassOf ?supertaxon . | ||
FILTER(isIRI(?subtaxon)) | ||
FILTER(STRSTARTS(STR(?subtaxon), "http://purl.obolibrary.org/obo/NCBITaxon")) | ||
FILTER(STRSTARTS(STR(?supertaxon), "http://purl.obolibrary.org/obo/NCBITaxon")) | ||
BIND(IRI(CONCAT(STR(?subtaxon), "#NOT")) AS ?complement_subtaxon) | ||
BIND(IRI(CONCAT(STR(?supertaxon), "#NOT")) AS ?complement_supertaxon) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> | ||
PREFIX owl: <http://www.w3.org/2002/07/owl#> | ||
PREFIX oio: <http://www.geneontology.org/formats/oboInOwl#> | ||
PREFIX in_taxon: <http://purl.obolibrary.org/obo/RO_0002162> | ||
PREFIX never_in_taxon: <http://purl.obolibrary.org/obo/RO_0002161> | ||
CONSTRUCT { | ||
<http://purl.obolibrary.org/obo/go/imports/go-computed-taxon-constraints.owl#NEVERINTAXON> a owl:Ontology . | ||
in_taxon: a owl:ObjectProperty . | ||
never_in_taxon: a owl:AnnotationProperty . | ||
?term rdfs:subClassOf _:complement . | ||
_:complement a owl:Class ; | ||
owl:complementOf [ | ||
a owl:Restriction ; | ||
owl:onProperty in_taxon: ; | ||
owl:someValuesFrom ?taxon | ||
] . | ||
[ | ||
a owl:Axiom ; | ||
owl:annotatedSource ?term ; | ||
owl:annotatedProperty rdfs:subClassOf ; | ||
owl:annotatedTarget _:complement ; | ||
oio:source "computed" | ||
] . | ||
?term never_in_taxon: ?taxon . | ||
[ | ||
a owl:Axiom ; | ||
owl:annotatedSource ?term ; | ||
owl:annotatedProperty never_in_taxon: ; | ||
owl:annotatedTarget ?taxon ; | ||
oio:source "computed" | ||
] . | ||
} | ||
WHERE { | ||
?term rdfs:subClassOf [ | ||
a owl:Restriction ; | ||
owl:onProperty in_taxon: ; | ||
owl:someValuesFrom ?taxon_complement | ||
] | ||
FILTER(STRSTARTS(STR(?term), "http://purl.obolibrary.org/obo/GO_")) | ||
FILTER(isIRI(?taxon_complement)) | ||
FILTER(STRSTARTS(STR(?taxon_complement), "http://purl.obolibrary.org/obo/NCBITaxon")) | ||
FILTER(STRENDS(STR(?taxon_complement), "#NOT")) | ||
BIND(IRI(STRBEFORE(STR(?taxon_complement), "#NOT")) AS ?taxon) | ||
FILTER ( | ||
EXISTS { | ||
?term rdfs:subClassOf+ [ | ||
a owl:Restriction ; | ||
owl:onProperty in_taxon: ; | ||
owl:someValuesFrom ?super_taxon | ||
] . | ||
FILTER(!STRENDS(STR(?super_taxon), "#NOT")) | ||
?taxon rdfs:subClassOf+ ?super_taxon . | ||
} | ||
|| | ||
NOT EXISTS { | ||
?term rdfs:subClassOf+ [ | ||
a owl:Restriction ; | ||
owl:onProperty in_taxon: ; | ||
owl:someValuesFrom ?super_taxon | ||
] . | ||
FILTER(STRSTARTS(STR(?super_taxon), "http://purl.obolibrary.org/obo/NCBITaxon")) | ||
FILTER(!STRENDS(STR(?super_taxon), "#NOT")) | ||
} | ||
) | ||
} |