Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ready to merge: Domain and range constraints #261

Merged
merged 13 commits into from
Oct 20, 2018
22 changes: 13 additions & 9 deletions src/ontology/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
OBO=http://purl.obolibrary.org/obo
SRC=ro-edit.owl
ROBOT=robot

ONTS= ro.obo ro.owl ro.json ro-base.owl ro-base.obo ro-base.json annotations.owl core.owl go-biotic.owl pato_import.owl temporal-intervals.owl bfo-axioms.owl bfo-classes-minimal.owl el-constraints.owl go_mf_import.owl go_cc_import.owl rohom.owl
ONTS= ro.obo ro.owl ro.json ro-base.owl ro-base.obo ro-base.json chemical.owl annotations.owl core.owl go-biotic.owl pato_import.owl temporal-intervals.owl bfo-axioms.owl bfo-classes-minimal.owl el-constraints.owl go_mf_import.owl go_cc_import.owl rohom.owl

# ========================================
# PRODUCTION
Expand Down Expand Up @@ -61,16 +63,18 @@ ro-diff.html: ro-diff.md
# ========================================
# IMPORTS
# ========================================
seed.owl: ro-edit.owl
owltools --use-catalog $< --merge-imports-closure --remove-imports-declarations -o $@
seed.txt: $(SRC)
$(ROBOT) query -f csv -i $< --query sparql/terms.sparql $@

# TODO - have to manually remove OPs for now...
#pato_mirror.owl: ro-edit.owl
# owltools $(OBO)/pato.owl --extract-mingraph --make-subset-by-properties // --remove-dangling-annotations --set-ontology-id $(OBO)/pato.owl -o $@
#pato_import.owl: seed.owl pato_mirror.owl
# owltools --use-catalog $< pato_mirror.owl --add-imports-from-supports --extract-module -c -s $(OBO)/pato.owl --set-ontology-id $(OBO)/ro/$@ -o $@
## owltools --use-catalog --map-ontology-iri $(OBO)/ro/pato_import.owl pato_mirror.owl ro-edit.owl --extract-module -s $(OBO)/pato.owl --set-ontology-id $(OBO)/ro/$@ -o $@
imports/%_terms_combined.txt: seed.txt
cat $< imports/$*_terms.txt | sort | uniq > $@

%_import.owl: mirror/%.owl imports/%_terms.txt
$(ROBOT) extract -i $< -T imports/$*_terms.txt --method BOT -O $(BASE)/$@ -o $@
.PRECIOUS: imports/%_import.owl

mirror/%.owl:
wget --no-check-certificate $(OBO)/$*.owl -O $@

# ========================================
# MIREOT
Expand Down
1 change: 1 addition & 0 deletions src/ontology/catalog-v001.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<uri id="User Entered Import Resolution" name="http://purl.obolibrary.org/obo/ro.owl" uri="ro-edit.owl"/>
<uri id="User Entered Import Resolution" name="http://purl.obolibrary.org/obo/ro/annotations.owl" uri="annotations.owl"/>
<uri id="User Entered Import Resolution" name="http://purl.obolibrary.org/obo/ro/temporal-intervals.owl" uri="temporal-intervals.owl"/>
<uri id="User Entered Import Resolution" name="http://purl.obolibrary.org/obo/ro/chemical.owl" uri="chemical.owl"/>
<uri id="User Entered Import Resolution" name="http://purl.obolibrary.org/obo/ro/core.owl" uri="core.owl"/>
<uri id="User Entered Import Resolution" name="http://purl.obolibrary.org/obo/ro/el-constraints.owl" uri="el-constraints.owl"/>
<uri id="User Entered Import Resolution" name="http://purl.obolibrary.org/obo/ro/rohom.owl" uri="rohom.owl"/>
Expand Down
39 changes: 39 additions & 0 deletions src/ontology/chemical.owl
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
Prefix(:=<http://purl.obolibrary.org/obo/ro.owl/>)
Prefix(dc:=<http://purl.org/dc/elements/1.1/>)
Prefix(obo:=<http://purl.obolibrary.org/obo/>)
Prefix(owl:=<http://www.w3.org/2002/07/owl#>)
Prefix(rdf:=<http://www.w3.org/1999/02/22-rdf-syntax-ns#>)
Prefix(xml:=<http://www.w3.org/XML/1998/namespace>)
Prefix(xsd:=<http://www.w3.org/2001/XMLSchema#>)
Prefix(cito:=<http://purl.org/spar/cito/>)
Prefix(foaf:=<http://xmlns.com/foaf/0.1/>)
Prefix(rdfs:=<http://www.w3.org/2000/01/rdf-schema#>)
Prefix(swrl:=<http://www.w3.org/2003/11/swrl#>)
Prefix(swrla:=<http://swrl.stanford.edu/ontologies/3.3/swrla.owl#>)
Prefix(swrlb:=<http://www.w3.org/2003/11/swrlb#>)
Prefix(subsets:=<http://purl.obolibrary.org/obo/ro/subsets#>)
Prefix(oboInOwl:=<http://www.geneontology.org/formats/oboInOwl#>)


Ontology(<http://purl.obolibrary.org/obo/ro/chemical.owl>
Annotation(dc:description "RO chemical module."@en)

# Object Property: obo:RO_0002260 (has biological role)

AnnotationAssertion(obo:IAO_0000115 obo:RO_0002260 "c has-biological-role r iff c has-role r and r is a biological role (CHEBI:24432)")
AnnotationAssertion(rdfs:label obo:RO_0002260 "has biological role")
SubObjectPropertyOf(obo:RO_0002260 obo:RO_0000087)

# Object Property: obo:RO_0002261 (has application role)

AnnotationAssertion(obo:IAO_0000115 obo:RO_0002261 "c has-application-role r iff c has-role r and r is an application role (CHEBI:33232)")
AnnotationAssertion(rdfs:label obo:RO_0002261 "has application role")
SubObjectPropertyOf(obo:RO_0002261 obo:RO_0000087)

# Object Property: obo:RO_0002262 (has chemical role)

AnnotationAssertion(obo:IAO_0000115 obo:RO_0002262 "c has-chemical-role r iff c has-role r and r is a chemical role (CHEBI:51086)")
AnnotationAssertion(rdfs:label obo:RO_0002262 "has chemical role")
SubObjectPropertyOf(obo:RO_0002262 obo:RO_0000087)

)
56 changes: 53 additions & 3 deletions src/ontology/other_import.owl
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@
xmlns:xml="http://www.w3.org/XML/1998/namespace"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:obo="http://purl.obolibrary.org/obo/">
<owl:Ontology rdf:about="http://purl.obolibrary.org/obo/ro/other_import.owl"/>
xmlns:obo="http://purl.obolibrary.org/obo/"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<owl:Ontology rdf:about="http://purl.obolibrary.org/obo/ro/other_import.owl">
<rdfs:comment>This should be split into sub-modules</rdfs:comment>
<dc:title>ad-hoc additional imports</dc:title>
</owl:Ontology>



Expand All @@ -28,6 +32,18 @@



<!-- http://purl.obolibrary.org/obo/IAO_0000115 -->

<owl:AnnotationProperty rdf:about="http://purl.obolibrary.org/obo/IAO_0000115"/>



<!-- http://purl.obolibrary.org/obo/IAO_0000136 -->

<owl:AnnotationProperty rdf:about="http://purl.obolibrary.org/obo/IAO_0000136"/>



<!-- http://purl.obolibrary.org/obo/IAO_0000412 -->

<owl:AnnotationProperty rdf:about="http://purl.obolibrary.org/obo/IAO_0000412"/>
Expand Down Expand Up @@ -77,6 +93,12 @@



<!-- http://purl.obolibrary.org/obo/BFO_0000016 -->

<owl:Class rdf:about="http://purl.obolibrary.org/obo/BFO_0000016"/>



<!-- http://purl.obolibrary.org/obo/BFO_0000019 -->

<owl:Class rdf:about="http://purl.obolibrary.org/obo/BFO_0000019"/>
Expand Down Expand Up @@ -171,6 +193,15 @@



<!-- http://purl.obolibrary.org/obo/CARO_0001010 -->

<owl:Class rdf:about="http://purl.obolibrary.org/obo/CARO_0001010">
<rdfs:subClassOf rdf:resource="http://purl.obolibrary.org/obo/BFO_0000040"/>
<rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">organism or virus or viroid</rdfs:label>
</owl:Class>



<!-- http://purl.obolibrary.org/obo/CARO_0010000 -->

<owl:Class rdf:about="http://purl.obolibrary.org/obo/CARO_0010000">
Expand Down Expand Up @@ -240,6 +271,16 @@



<!-- http://purl.obolibrary.org/obo/OGMS_0000031 -->

<owl:Class rdf:about="http://purl.obolibrary.org/obo/OGMS_0000031">
<rdfs:subClassOf rdf:resource="http://purl.obolibrary.org/obo/BFO_0000016"/>
<obo:IAO_0000115 xml:lang="en">A disposition (i) to undergo pathological processes that (ii) exists in an organism because of one or more disorders in that organism.</obo:IAO_0000115>
<rdfs:label>disease</rdfs:label>
</owl:Class>



<!-- http://purl.obolibrary.org/obo/PATO_0000001 -->

<owl:Class rdf:about="http://purl.obolibrary.org/obo/PATO_0000001">
Expand Down Expand Up @@ -290,6 +331,15 @@



<!-- http://purl.obolibrary.org/obo/UPHENO_0001001 -->

<owl:Class rdf:about="http://purl.obolibrary.org/obo/UPHENO_0001001">
<rdfs:subClassOf rdf:resource="http://purl.obolibrary.org/obo/PATO_0000001"/>
<rdfs:label xml:lang="en">phenotype</rdfs:label>
</owl:Class>



<!--
///////////////////////////////////////////////////////////////////////////////////////
//
Expand Down Expand Up @@ -326,5 +376,5 @@



<!-- Generated by the OWL API (version 4.2.8) https://github.com/owlcs/owlapi -->
<!-- Generated by the OWL API (version 4.2.8.20170104-2310) https://github.com/owlcs/owlapi -->

Loading