-
Notifications
You must be signed in to change notification settings - Fork 0
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 #4 from OpenEnergyPlatform/feature-tidy-iao-import
tidy oeo imports
- Loading branch information
Showing
7 changed files
with
3,811 additions
and
38 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Note: For consistent results run with ROBOT v1.91 or higher | ||
# Download the IAO release from 2022-11-07 | ||
curl -L https://raw.githubusercontent.com/information-artifact-ontology/IAO/v2022-11-07/iao.owl > iao-full-download.owl | ||
# Extract the terms we want with hierarchy, This removes the domain of IAO_0000136 | ||
robot merge --input iao-full-download.owl extract --method MIREOT --lower-terms iao-w-hierarchy.txt --intermediates all --output iao-module-temp.owl | ||
# Remove subclass axioms from BFO classes | ||
robot remove --input iao-module-temp.owl --term BFO:0000001 --select "self descendants" --select "<http://purl.obolibrary.org/obo/BFO_*>" --axioms subclass --axioms annotation --signature true --exclude-term BFO:0000031 --preserve-structure false --output iao-module-temp.owl | ||
# Extract domain of IAO_0000136 | ||
robot merge --input iao-full-download.owl filter --term http://purl.obolibrary.org/obo/IAO_0000136 --term rdfs:domain --term http://purl.obolibrary.org/obo/IAO_0000030 --select self --axioms all --signature false --output iao-extracted-domain.owl | ||
# Extracted module | ||
robot merge --input iao-module-temp.owl --input iao-extracted-domain.owl --output ../../ontology/imports/iao-extracted.owl | ||
# Remove subproperty axioms | ||
robot remove --input ../../ontology/imports/iao-extracted.owl --axioms subproperty --output ../../ontology/imports/iao-extracted.owl | ||
# Annotates the output with a commentary to the origin of the content | ||
robot annotate --input ../../ontology/imports/iao-extracted.owl --annotation rdfs:comment "This file contains externally imported content from the Information Artifact Ontology (IAO) for import into the Open Energy Ontology (OEO). It is automatically extracted using ROBOT." --output ../../ontology/imports/iao-extracted.owl | ||
# Annotates each axiom with the ontology IRI, using prov:wasDerivedFrom | ||
robot annotate --input ../../ontology/imports/iao-extracted.owl --annotate-derived-from true --annotate-defined-by true --output ../../ontology/imports/iao-extracted.owl | ||
# Annotate with new ontology information | ||
robot annotate --input ../../ontology/imports/iao-extracted.owl --ontology-iri http://openenergy-platform.org/ontology/oeo/imports/iao-extracted.owl --version-iri http://openenergy-platform.org/ontology/oeo/dev/imports/iao-extracted.owl --output ../../ontology/imports/iao-extracted.owl | ||
rm iao-full-download.owl | ||
rm iao-extracted-domain.owl | ||
rm iao-module-temp.owl |
File renamed without changes.
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 |
---|---|---|
@@ -1,22 +1,20 @@ | ||
# Note: For consistent results run with ROBOT v1.91 or higher | ||
# Download the IAO release from 2022-11-07 | ||
curl -L https://raw.githubusercontent.com/information-artifact-ontology/IAO/v2022-11-07/iao.owl > iao-full-download.owl | ||
# Extract the terms we want with hierarchy, This removes the domain of IAO_0000136 | ||
robot merge --input iao-full-download.owl extract --method MIREOT --lower-terms iao-w-hierarchy.txt --intermediates all --output iao-module-temp.owl | ||
# Remove subclass axioms from BFO classes | ||
robot remove --input iao-module-temp.owl --term BFO:0000001 --select "self descendants" --select "<http://purl.obolibrary.org/obo/BFO_*>" --axioms subclass --axioms annotation --signature true --exclude-term BFO:0000031 --preserve-structure false --output iao-module-temp.owl | ||
# Extract domain of IAO_0000136 | ||
robot merge --input iao-full-download.owl filter --term http://purl.obolibrary.org/obo/IAO_0000136 --term rdfs:domain --term http://purl.obolibrary.org/obo/IAO_0000030 --select self --axioms all --signature false --output iao-extracted-domain.owl | ||
# Extracted module | ||
robot merge --input iao-module-temp.owl --input iao-extracted-domain.owl --output ../../ontology/imports/iao-extracted.owl | ||
# Remove subproperty axioms | ||
robot remove --input ../../ontology/imports/iao-extracted.owl --axioms subproperty --output ../../ontology/imports/iao-extracted.owl | ||
# Annotates the output with a commentary to the origin of the content | ||
robot annotate --input ../../ontology/imports/iao-extracted.owl --annotation rdfs:comment "This file contains externally imported content from the Information Artifact Ontology (IAO) for import into the Open Energy Ontology (OEO). It is automatically extracted using ROBOT." --output ../../ontology/imports/iao-extracted.owl | ||
# Extract the terms we want with hierarchy until the upper term "information content entity" (IAO_0000030). | ||
# Warning: This removes the domain of IAO_0000136 -- tbd in oeo-import-edits | ||
# Classification: tbd in oeo-import-edits | ||
robot merge --input iao-full-download.owl extract --method MIREOT --lower-terms iao-w-hierarchy.txt --intermediates all --upper-term http://purl.obolibrary.org/obo/IAO_0000030 --output iao-extracted-w-hierarchy.owl | ||
# Extract the terms we want without hierarchy | ||
robot merge --input iao-full-download.owl extract --method MIREOT --lower-terms iao-n-hierarchy.txt --upper-term owl:topObjectProperty --intermediates none --output iao-extracted-n-hierarchy.owl | ||
# Create Extracted module and annotate with new ontology information | ||
robot merge --input iao-extracted-w-hierarchy.owl --input iao-extracted-n-hierarchy.owl annotate --ontology-iri http://openenergy-platform.org/ontology/oeo/imports/iao-extracted.owl --version-iri http://openenergy-platform.org/ontology/oeo/dev/imports/iao-extracted.owl --output iao-extracted.owl | ||
# Annotates the output module with a commentary to the origin of the content | ||
robot annotate --input iao-extracted.owl --annotation rdfs:comment "This file contains externally imported content from the Information Artifact Ontology (IAO) for import into the Open Energy Ontology (OEO). It is automatically extracted using ROBOT from the list of selected terms (iao-extract-w-hierarchy.txt, iao-extract-n-hierarchy.txt) located in the OEO-tools repository." --output iao-extracted.owl | ||
# Annotates each axiom with the ontology IRI, using prov:wasDerivedFrom | ||
robot annotate --input ../../ontology/imports/iao-extracted.owl --annotate-derived-from true --annotate-defined-by true --output ../../ontology/imports/iao-extracted.owl | ||
# Annotate with new ontology information | ||
robot annotate --input ../../ontology/imports/iao-extracted.owl --ontology-iri http://openenergy-platform.org/ontology/oeo/imports/iao-extracted.owl --version-iri http://openenergy-platform.org/ontology/oeo/dev/imports/iao-extracted.owl --output ../../ontology/imports/iao-extracted.owl | ||
robot annotate --input iao-extracted.owl --annotate-derived-from true --annotate-defined-by true --output iao-extracted.owl | ||
## Annotate with new ontology information | ||
#robot annotate --input iao-extracted.owl --ontology-iri http://openenergy-platform.org/ontology/oeo/imports/iao-extracted.owl --version-iri http://openenergy-platform.org/ontology/oeo/dev/imports/iao-extracted.owl --output iao-extracted.owl | ||
rm iao-full-download.owl | ||
rm iao-extracted-domain.owl | ||
rm iao-module-temp.owl | ||
rm iao-extracted-w-hierarchy.owl | ||
rm iao-extracted-n-hierarchy.owl |
Oops, something went wrong.