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

Patch language tags #295

Merged
merged 7 commits into from
Feb 20, 2025
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
120 changes: 70 additions & 50 deletions cob-base.owl

Large diffs are not rendered by default.

276 changes: 138 additions & 138 deletions cob-root.owl

Large diffs are not rendered by default.

271 changes: 128 additions & 143 deletions cob.owl

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion cob.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ COB:0001000 exposure of organism A process during which an organism comes into c
COB:0001300 device A processed material entity which is designed to be capable of a process. COB:0000026 processed material entity RO:0002215 some BFO:0000015 capable of some process
ENVO:01000813 geophysical entity A material part of an astronomical body. BFO:0000040 material entity
ENVO:01001110 ecosystem An environmental system which includes both living and non-living components. BFO:0000040 material entity
ENVO:02500000 environmental process A process in which includes the components of an environmental system as participants. BFO:0000015 process
ENVO:02500000 environmental system process A process in which includes the components of an environmental system as participants. BFO:0000015 process
GO:0003674 gene product or complex activity A molecular process that can be carried out by the action of a single macromolecular machine, usually via direct physical interactions with other molecular entities. Function in this sense denotes an action, or activity, that a gene product (or a complex) performs. BFO:0000015 process
GO:0005575 cellular_component A location, relative to cellular compartments and structures, occupied by a macromolecular machine. There are three types of cellular components described in the gene ontology: (1) the cellular anatomical entity where a gene product carries out a molecular function (e.g., plasma membrane, cytoskeleton) or membrane-enclosed compartments (e.g., mitochondrion); (2) virion components, where viral proteins act, and (3) the stable macromolecular complexes of which gene product are parts (e.g., the clathrin complex). BFO:0000040 material entity
GO:0008150 biological process A biological process is the execution of a genetically-encoded biological module or program. It consists of all the steps required to achieve the specific biological objective of the module. A biological process is accomplished by a particular set of molecular functions carried out by specific gene products (or macromolecular complexes), often in a highly regulated manner and in a particular temporal sequence. BFO:0000015 process BFO:0000051 some GO:0003674 has part some gene product or complex activity
Expand Down
8 changes: 4 additions & 4 deletions src/ontology/cob-edit.tsv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Ontology ID Label Type Definition Editor Note COB Module COB Module Reason Parent Class Subclass Axiom Equivalent Class Axiom Disjoint Class Parent Property Domain Range Inverse Property Replacement ID Replacement Label Comment
ID LABEL TYPE A IAO:0000115 A IAO:0000116 SPLIT=| A COB:module A COB:module-reason C % SC % SPLIT=| EC % SPLIT=| DC % SP % DOMAIN RANGE IP %
ID AL rdfs:label@en TYPE AL IAO:0000115@en AL IAO:0000116@en SPLIT=| A COB:module AL COB:module-reason@en C % SC % SPLIT=| EC % SPLIT=| DC % SP % DOMAIN RANGE IP %
We use some basic annotation properties.
IAO:0000115 definition owl:AnnotationProperty BASE required annotations
IAO:0000116 editor note owl:AnnotationProperty BASE required annotations
Expand Down Expand Up @@ -99,7 +99,7 @@ MOP:0000543 physico-chemical process owl:Class A process in which at least one o
GO:0003674 gene product or complex activity owl:Class A molecular process that can be carried out by the action of a single macromolecular machine, usually via direct physical interactions with other molecular entities. Function in this sense denotes an action, or activity, that a gene product (or a complex) performs. This is the same as GO molecular function FULL unmodified & in scope process physico-chemical process GO's 'molecular function'; this subClassOf axioms requires a 'gene product' term: 'enabled by' some ('gene product' or 'protein-containing complex')
GO:0008150 biological process owl:Class A biological process is the execution of a genetically-encoded biological module or program. It consists of all the steps required to achieve the specific biological objective of the module. A biological process is accomplished by a particular set of molecular functions carried out by specific gene products (or macromolecular complexes), often in a highly regulated manner and in a particular temporal sequence. FULL unmodified & in scope process 'has process part' some 'gene product or complex activity' gene product or complex activity
COB:0001000 exposure of organism owl:Class A process during which an organism comes into contact with another entity. BASE process 'has material participant' some organism
ENVO:02500000 environmental process owl:Class A process in which includes the components of an environmental system as participants. FULL unmodified & in scope process
ENVO:02500000 environmental system process owl:Class A process in which includes the components of an environmental system as participants. FULL unmodified & in scope process
A realizable is a special characteristic that is realized by a processes; a role is a realizable that depends on a physical, social, or institutional context; a disposition does not depend on context; a function is a designed (intended) disposition
BFO:0000017 realizable entity owl:Class FULL unmodified & in scope characteristic
COB:realizes realizes owl:ObjectProperty REPLACED process realizable entity BFO:0000055 realizes
Expand Down Expand Up @@ -135,8 +135,8 @@ IAO:0000027 data item owl:Class An information content entity that is intended t
IAO:0000109 measurement datum owl:Class A measurement datum is an information content entity that is a recording of the output of a measurement such as produced by a device. FULL in previous COB data item
OBI:0200000 data transformation owl:Class A planned process that produces output data from input data. FULL unmodified & in scope planned process 'has specified information input' some 'data item' and 'has specified information output' some 'data item'
Specimens from OBI
OBI:0000659 specimen collection owl:Class A planned process with the objective of collecting a specimen. ROOT unmodified & in scope process 'has specified material input' some 'material entity' and 'has specified material output' some 'specimen'
OBI:0100051 specimen owl:Class A material entity that has the specimen role. ROOT material entity 'specified material output of' some 'specimen collection'
OBI:0000659 specimen collection process owl:Class A planned process with the objective of collecting a specimen. ROOT unmodified & in scope process 'has specified material input' some 'material entity' and 'has specified material output' some 'specimen'
OBI:0100051 specimen owl:Class A material entity that has the specimen role. ROOT material entity 'specified material output of' some 'specimen collection process'
COB:derives-from derives from owl:ObjectProperty REPLACED material entity material entity RO:0001000 derives from
OBI:0001479 specimen from organism owl:Class A specimen that derives from an anatomical part or substance arising from an organism. Examples of tissue specimen include tissue, organ, physiological system, blood, or body location (arm). ROOT specimen 'derives from' some 'material anatomical entity'
Previous COB properties: These still need discussion
Expand Down
92 changes: 78 additions & 14 deletions src/ontology/cob.Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,36 +54,43 @@ cob.tsv: cob.owl
# -- MAIN RELEASE PRODUCTS --
########################################

$(ONT)-edit.owl: $(TMPDIR)/cob-root.tsv $(COMPONENTSDIR)/obsolete.tsv
# Include all terms
cob-edit.owl: $(TMPDIR)/cob-root.tsv $(COMPONENTSDIR)/obsolete.tsv patch-labels.ru patch-definitions.ru
$(ROBOT) template \
$(foreach X,$(filter %.tsv,$^),--template $(X)) \
query \
$(foreach X,$(filter %.ru,$^),--update $(X)) \
reason -r HERMIT \
annotate --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) \
$(ANNOTATE_ONTOLOGY_METADATA) \
--output $@.tmp.owl && mv $@.tmp.owl $@

# COB "Full"
$(ONT).owl: $(TMPDIR)/cob-full.tsv $(COMPONENTSDIR)/obsolete.tsv
$(ROBOT) template \
$(foreach X,$(filter %.tsv,$^),--template $(X)) \
reason -r HERMIT \
$(TMPDIR)/cob-full.txt: $(TMPDIR)/cob-full.tsv $(COMPONENTSDIR)/obsolete.tsv
echo "rdfs:label" > $@
echo "owl:deprecated" >> $@
cut -f1 $< | tail -n+3 >> $@
cut -f1 $(word 2,$^) | tail -n+3 >> $@

# COB "Full": just COB terms and the terms used to define them
cob.owl: cob-edit.owl $(TMPDIR)/cob-full.txt
$(ROBOT) filter --input $< \
--term-file $(word 2,$^) --signature true \
annotate --ontology-iri $(ONTBASE).owl $(ANNOTATE_ONTOLOGY_VERSION) \
$(ANNOTATE_ONTOLOGY_METADATA) \
--output $@.tmp.owl && mv $@.tmp.owl $@

$(ONT)-base.owl: $(ONT).owl $(TMPDIR)/cob-base.tsv $(COMPONENTSDIR)/obsolete.tsv
$(ROBOT) template --input $< \
$(foreach X,$(filter %.tsv,$^),--template $(X)) \
# Just COB terms
cob-base.owl: cob-edit.owl
$(ROBOT) filter --input $< \
--base-iri COB --axioms internal \
annotate --link-annotation http://purl.org/dc/elements/1.1/type http://purl.obolibrary.org/obo/IAO_8000001 \
--ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) \
$(ANNOTATE_ONTOLOGY_METADATA) \
--output $@.tmp.owl && mv $@.tmp.owl $@

$(ONT)-root.owl: $(TMPDIR)/cob-root.tsv $(COMPONENTSDIR)/obsolete.tsv
$(ROBOT) template \
$(foreach X,$(filter %.tsv,$^),--template $(X)) \
reason -r HERMIT \
annotate --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) \
cob-root.owl: cob-edit.owl
$(ROBOT) annotate --input $< \
--ontology-iri $(ONTBASE).owl $(ANNOTATE_ONTOLOGY_VERSION) \
$(ANNOTATE_ONTOLOGY_METADATA) \
--output $@.tmp.owl && mv $@.tmp.owl $@

Expand Down Expand Up @@ -241,3 +248,60 @@ products/demo-cob.owl: $(TMPDIR)/demo-cob-merged.owl | products/

$(TMPDIR)/subset-%.owl: $(TMPDIR)/merged-%.owl subsets/terms_%.txt | $(TMPDIR)
$(ROBOT) extract -m BOT -i $< -T subsets/terms_$*.txt -o $@

# Crosscheck against upstream ontologies

X_IMPORTS := BFO CHEBI CL DRON ENVO FOODON GO IAO MOP NCBITaxon OBI PATO PCO PO PR RO SO UBERON VO
X_IMPORT_OWL_FILES := $(foreach n,$(X_IMPORTS), $(IMPORTDIR)/$(n)_import.owl)

$(IMPORTDIR)/%_ontofox.txt: cob-edit.tsv
echo "[URI of the OWL(RDF/XML) output file]" > $@
echo "http://purl.obolibrary.org/obo/cob/dev/import/$*_import.owl" >> $@
echo "" >> $@
echo "[Source ontology]" >> $@
echo "$*" >> $@
echo "" >> $@
echo "[Low level source term URIs]" >> $@
grep "^$*:" $< | cut -f1 | sed "s!$*:!http://purl.obolibrary.org/obo/$*_!" >> $@
echo "" >> $@
echo "[Source annotation URIs]" >> $@
echo "http://www.w3.org/2000/01/rdf-schema#label" >> $@
echo "http://purl.obolibrary.org/obo/IAO_0000115" >> $@

$(IMPORTDIR)/RO_ontofox.txt: cob-edit.tsv
echo "[URI of the OWL(RDF/XML) output file]" > $@
echo "http://purl.obolibrary.org/obo/cob/dev/import/RO_import.owl" >> $@
echo "" >> $@
echo "[Source ontology]" >> $@
echo "RO" >> $@
echo "" >> $@
echo "[Low level source term URIs]" >> $@
grep "^BFO:" $< | grep "owl:ObjectProperty" | cut -f1 | sed "s!BFO:!http://purl.obolibrary.org/obo/RO_!" >> $@
grep "^RO:" $< | cut -f1 | sed "s!RO:!http://purl.obolibrary.org/obo/RO_!" >> $@
echo "" >> $@
echo "[Source annotation URIs]" >> $@
echo "http://www.w3.org/2000/01/rdf-schema#label" >> $@
echo "http://purl.obolibrary.org/obo/IAO_0000115" >> $@

$(IMPORTDIR)/%_import.owl: $(IMPORTDIR)/%_ontofox.txt
curl -s -F file=@$< -o $@ https://ontofox.hegroup.org/service.php

$(TMPDIR)/merged_imports.owl: $(X_IMPORT_OWL_FILES)
$(ROBOT) merge \
$(foreach X,$^,--input $(X)) \
remove --term IAO:0000115 \
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This removes too much. I'll fix it when I'm back to work on Tuesday.

annotate --ontology-iri $(ONTBASE)/$@ $(ANNOTATE_ONTOLOGY_VERSION) \
$(ANNOTATE_ONTOLOGY_METADATA) \
--output $@

$(TMPDIR)/merged.owl: cob-edit.owl $(TMPDIR)/merged_imports.owl
$(ROBOT) merge \
$(foreach X,$^,--input $(X)) \
--output $@

.PRECIOUS: $(TMPDIR)/report.tsv
$(TMPDIR)/report.tsv: $(TMPDIR)/merged.owl
$(ROBOT) report --input $< --output $@

.PHONY: crosscheck
crosscheck: $(TMPDIR)/report.tsv
134 changes: 134 additions & 0 deletions src/ontology/imports/BFO_import.owl
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
<?xml version="1.0"?>
<rdf:RDF xmlns="http://purl.obolibrary.org/obo/cob/dev/import/BFO_import.owl#"
xml:base="http://purl.obolibrary.org/obo/cob/dev/import/BFO_import.owl"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
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/cob/dev/import/BFO_import.owl"/>



<!--
///////////////////////////////////////////////////////////////////////////////////////
//
// Annotation properties
//
///////////////////////////////////////////////////////////////////////////////////////
-->

<owl:AnnotationProperty rdf:about="http://purl.obolibrary.org/obo/IAO_0000412">
<rdfs:label xml:lang="en">imported from</rdfs:label>
</owl:AnnotationProperty>
<owl:AnnotationProperty rdf:about="http://purl.obolibrary.org/obo/IAO_0000115">
<rdfs:label xml:lang="en">definition</rdfs:label>
</owl:AnnotationProperty>



<!--
///////////////////////////////////////////////////////////////////////////////////////
//
// Datatypes
//
///////////////////////////////////////////////////////////////////////////////////////
-->




<!--
///////////////////////////////////////////////////////////////////////////////////////
//
// Classes
//
///////////////////////////////////////////////////////////////////////////////////////
-->




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

<owl:Class rdf:about="http://purl.obolibrary.org/obo/BFO_0000015">
<rdfs:label xml:lang="en">process</rdfs:label>
<obo:IAO_0000115 xml:lang="en">p is a process = Def. p is an occurrent that has temporal proper parts and for some time t, p s-depends_on some material entity at t. (axiom label in BFO2 Reference: [083-003])</obo:IAO_0000115>
<obo:IAO_0000412 rdf:resource="http://purl.obolibrary.org/obo/bfo.owl"/>
</owl:Class>



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

<owl:Class rdf:about="http://purl.obolibrary.org/obo/BFO_0000016">
<rdfs:label xml:lang="en">disposition</rdfs:label>
<obo:IAO_0000412 rdf:resource="http://purl.obolibrary.org/obo/bfo.owl"/>
</owl:Class>



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

<owl:Class rdf:about="http://purl.obolibrary.org/obo/BFO_0000017">
<rdfs:label xml:lang="en">realizable entity</rdfs:label>
<obo:IAO_0000412 rdf:resource="http://purl.obolibrary.org/obo/bfo.owl"/>
</owl:Class>



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

<owl:Class rdf:about="http://purl.obolibrary.org/obo/BFO_0000023">
<rdfs:label xml:lang="en">role</rdfs:label>
<obo:IAO_0000412 rdf:resource="http://purl.obolibrary.org/obo/bfo.owl"/>
</owl:Class>



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

<owl:Class rdf:about="http://purl.obolibrary.org/obo/BFO_0000029">
<rdfs:label xml:lang="en">site</rdfs:label>
<obo:IAO_0000412 rdf:resource="http://purl.obolibrary.org/obo/bfo.owl"/>
</owl:Class>



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

<owl:Class rdf:about="http://purl.obolibrary.org/obo/BFO_0000034">
<rdfs:label xml:lang="en">function</rdfs:label>
<obo:IAO_0000412 rdf:resource="http://purl.obolibrary.org/obo/bfo.owl"/>
</owl:Class>



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

<owl:Class rdf:about="http://purl.obolibrary.org/obo/BFO_0000040">
<rdfs:label xml:lang="en">material entity</rdfs:label>
<obo:IAO_0000412 rdf:resource="http://purl.obolibrary.org/obo/bfo.owl"/>
</owl:Class>



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

<owl:Class rdf:about="http://purl.obolibrary.org/obo/BFO_0000141">
<rdfs:label xml:lang="en">immaterial entity</rdfs:label>
<obo:IAO_0000412 rdf:resource="http://purl.obolibrary.org/obo/bfo.owl"/>
</owl:Class>
</rdf:RDF>



<!-- Generated by the OWL API (version 3.2.4.1806) http://owlapi.sourceforge.net -->

<!--
Notice: All the OBO ontologies have changed the term URI format from http://purl.org/obo/owl/ontology#ontology_nnnnnnn to http://purl.obolibrary.org/obo/ontology_nnnnnnn. Please make sure your input files are updated.
The following terms do not have any related axioms in the source ontology:
http://purl.obolibrary.org/obo/BFO_0000050
http://purl.obolibrary.org/obo/BFO_0000051
http://purl.obolibrary.org/obo/BFO_0000055
-->
22 changes: 22 additions & 0 deletions src/ontology/imports/BFO_ontofox.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[URI of the OWL(RDF/XML) output file]
http://purl.obolibrary.org/obo/cob/dev/import/BFO_import.owl

[Source ontology]
BFO

[Low level source term URIs]
http://purl.obolibrary.org/obo/BFO_0000050
http://purl.obolibrary.org/obo/BFO_0000051
http://purl.obolibrary.org/obo/BFO_0000055
http://purl.obolibrary.org/obo/BFO_0000040
http://purl.obolibrary.org/obo/BFO_0000141
http://purl.obolibrary.org/obo/BFO_0000029
http://purl.obolibrary.org/obo/BFO_0000015
http://purl.obolibrary.org/obo/BFO_0000017
http://purl.obolibrary.org/obo/BFO_0000023
http://purl.obolibrary.org/obo/BFO_0000016
http://purl.obolibrary.org/obo/BFO_0000034

[Source annotation URIs]
http://www.w3.org/2000/01/rdf-schema#label
http://purl.obolibrary.org/obo/IAO_0000115
Loading