diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a0322ff6..902da05fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and the versioning aims to respect [Semantic Versioning](http://semver.org/spec/ ### Added - regionalisation (#1639) - sufficiency scenario (#1642) +- New files for new UO v2023-05-25 import process (#1633) ### Changed - energy transformation (#1625) @@ -18,6 +19,8 @@ and the versioning aims to respect [Semantic Versioning](http://semver.org/spec/ ## [1.16.1] - 2023-08-01 +### Added + ### Changed - Update module files after saving with Protégé 5.6.1(#1628) diff --git a/src/ontology/imports/uo-extracted.owl b/src/ontology/imports/uo-extracted.owl new file mode 100644 index 000000000..b8a94b110 --- /dev/null +++ b/src/ontology/imports/uo-extracted.owl @@ -0,0 +1,1002 @@ + + + + + This file contains externally imported content from the Unit Ontology (UO) for import into the Open Energy Ontology (OEO). It is automatically extracted using ROBOT. + + + + + + + + + + + + + definition + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + "A unit of measurement is a standardized quantity of a physical quality." [Wikipedia:Wikipedia] + + unit + + + + + + + + + + + + + + + + + "A unit of measurement is a standardized quantity of a physical quality." [Wikipedia:Wikipedia] + + + + + + unit + + + + + + + + + + "A unit which is a standard measure of the distance between two points." [Wikipedia:Wikipedia] + + length unit + + + + + + + + + + + "A unit which is a standard measure of the distance between two points." [Wikipedia:Wikipedia] + + + + + + length unit + + + + + + + + + + + + + + + + "A unit which is a standard measure of the amount of matter/energy of a physical object." [Wikipedia:Wikipedia] + + mass unit + + + + + + + + + + + + + + + + + "A unit which is a standard measure of the amount of matter/energy of a physical object." [Wikipedia:Wikipedia] + + + + + + mass unit + + + + + + + + + + "A unit which is a standard measure of the dimension in which events occur in sequence." [Wikipedia:Wikipedia] + time derived unit + + time unit + + + + + + + + + + + + + + + + + "A unit which is a standard measure of the dimension in which events occur in sequence." [Wikipedia:Wikipedia] + + + + + + time derived unit + + + + + + time unit + + + + + + + + + + "A time unit which is equal to 3600 seconds or 60 minutes." [Wikipedia:Wikipedia] + h + + hour + + + + + + + + + + + + + + + + + "A time unit which is equal to 3600 seconds or 60 minutes." [Wikipedia:Wikipedia] + + + + + + h + + + + + + hour + + + + + + + + + + "A time unit which is equal to 24 hours." [Wikipedia:Wikipedia] + + day + + + + + + + + + + + + + + + + + "A time unit which is equal to 24 hours." [Wikipedia:Wikipedia] + + + + + + day + + + + + + + + + + "A time unit which is equal to 12 months which in science is taken to be equal to 365.25 days." [Wikipedia:Wikipedia] + + year + + + + + + + + + + + + + + + + + "A time unit which is equal to 12 months which in science is taken to be equal to 365.25 days." [Wikipedia:Wikipedia] + + + + + + year + + + + + + + + + + + prefix + + + + + + + + + + + + + + + + + prefix + + + + + + + + + + "A unit which is a standard measure of the amount of a 2-dimensional flat surface." [UOC:GVG] + + area unit + + + + + + + + + + + + + + + + + "A unit which is a standard measure of the amount of a 2-dimensional flat surface." [UOC:GVG] + + + + + + area unit + + + + + + + + + + "A unit which is a standard measure of the amount of space occupied by any substance, whether solid, liquid, or gas." [NIST:NIST] + + volume unit + + + + + + + + + + + + + + + + + "A unit which is a standard measure of the amount of space occupied by any substance, whether solid, liquid, or gas." [NIST:NIST] + + + + + + volume unit + + + + + + + + + + "A unit which is a standard measure of the work done by a certain force (gravitational, electric, magnetic, force of inertia, etc)." [NIST:NIST] + + energy unit + + + + + + + + + + + + + + + + + "A unit which is a standard measure of the work done by a certain force (gravitational, electric, magnetic, force of inertia, etc)." [NIST:NIST] + + + + + + energy unit + + + + + + + + + + "A unit which is a standard measure power or the rate of doing work." [NIST:NIST] + + power unit + + + + + + + + + + + + + + + + + "A unit which is a standard measure power or the rate of doing work." [NIST:NIST] + + + + + + power unit + + + + + + + + + + "A unit which is a standard measure of the figure or space formed by the junction of two lines or planes." [Wikipedia:Wikipedia] + + angle unit + + + + + + + + + + + + + + + + + "A unit which is a standard measure of the figure or space formed by the junction of two lines or planes." [Wikipedia:Wikipedia] + + + + + + angle unit + + + + + + + + + + "A unit which is a standard measure of the angle formed by two straight lines in the same plane." [Wikipedia:Wikipedia] + + plane angle unit + + + + + + + + + + + + + + + + + "A unit which is a standard measure of the angle formed by two straight lines in the same plane." [Wikipedia:Wikipedia] + + + + + + plane angle unit + + + + + + + + + + "A unit which is a standard measure of physical quantity consisting of only a numerical number without any units." [Wikipedia:Wikipedia] + + dimensionless unit + + + + + + + + + + + + + + + + + "A unit which is a standard measure of physical quantity consisting of only a numerical number without any units." [Wikipedia:Wikipedia] + + + + + + dimensionless unit + + + + + + + + + + "A dimensionless ratio unit which denotes numbers as fractions of 100." [Wikipedia:Wikipedia] + % + + percent + + + + + + + + + + + + + + + + + "A dimensionless ratio unit which denotes numbers as fractions of 100." [Wikipedia:Wikipedia] + + + + + + % + + + + + + percent + + + + + + + + + + "A dimensionless unit which denotes a simple count of things." [MGED:MGED] + count + + count unit + + + + + + + + + + + + + + + + + "A dimensionless unit which denotes a simple count of things." [MGED:MGED] + + + + + + count + + + + + + count unit + + + + + + + + + + "A dimensionless unit which denotes an amount or magnitude of one quantity relative to another." [Wikipedia:Wikipedia] + + ratio unit + + + + + + + + + + + + + + + + + "A dimensionless unit which denotes an amount or magnitude of one quantity relative to another." [Wikipedia:Wikipedia] + + + + + + ratio unit + + + + + + + + + + "An energy unit which is equal to 1,000 watt-hours." [Wikipedia:Wikipedia] + + kilowatt-hour + + + + + + + + + + + + + + + + + "An energy unit which is equal to 1,000 watt-hours." [Wikipedia:Wikipedia] + + + + + + kilowatt-hour + + + + + + + + + + "A unit which is a standard measure of the volume of fluid which passes through a given surface per unit time ." [Wikipedia:Wikipedia] + + volumetric flow rate unit + + + + + + + + + + + + + + + + + "A unit which is a standard measure of the volume of fluid which passes through a given surface per unit time ." [Wikipedia:Wikipedia] + + + + + + volumetric flow rate unit + + + + + + + + + + "A dimensionless ratio unit which, given a pair of quantities a and b, for which b is a multiple of a, denotes b by giving the multiplier (coefficient) c for a to result in b." [UOB:LKSR] + + ratio + + + + + + + + + + + + + + + + + "A dimensionless ratio unit which, given a pair of quantities a and b, for which b is a multiple of a, denotes b by giving the multiplier (coefficient) c for a to result in b." [UOB:LKSR] + + + + + + ratio + + + + + + + + + + + hour based unit + + + + + + + + + + + + + + + + + hour based unit + + + + + + + + + + + day based unit + + + + + + + + + + + + + + + + + day based unit + + + + + + + + + + + year based unit + + + + + year based unit + + + + + + + + + + + + + + + + + + + + + + + watt-hour based unit + + + + + + + + + + + + + + + + + watt-hour based unit + + + + + + + + + + + + + + + + diff --git a/src/scripts/requirements.txt b/src/scripts/requirements.txt index 541c177d3..c76e22f46 100644 --- a/src/scripts/requirements.txt +++ b/src/scripts/requirements.txt @@ -2,4 +2,5 @@ pandas tabulate openpyxl pytest -pytest_harvest \ No newline at end of file +pytest_harvest +sed diff --git a/src/scripts/uo/extract-uo-module.sh b/src/scripts/uo/extract-uo-module.sh new file mode 100644 index 000000000..651ef5b67 --- /dev/null +++ b/src/scripts/uo/extract-uo-module.sh @@ -0,0 +1,22 @@ +# Download UO release from 2023-05-25 +curl -L https://data.bioontology.org/ontologies/UO/submissions/219/download?apikey=8b5b7825-538d-40e0-9e9e-5ab9274a9aeb > uo-full-download.owl +# Extract the terms we want with hierarchy +robot merge --input uo-full-download.owl extract --method MIREOT --lower-terms uo-w-hierarchy.txt --intermediates all --output uo-module-temp.owl +# add xmlns:obo="http://purl.obolibrary.org/obo/" +sed -i 's/xmlns:owl/xmlns:obo="http:\/\/purl.obolibrary.org\/obo\/"\ + xmlns:owl/' uo-module-temp.owl +# Replace "" with "obo:IAO_0000115" +sed -i 's///g' uo-module-temp.owl +# Replace "" with "" +sed -i 's/<\/rdfs:comment>/<\/obo:IAO_0000115>/g' uo-module-temp.owl +# Annotates the output with a commentary to the origin of the content +robot annotate --input uo-module-temp.owl --annotation rdfs:comment "This file contains externally imported content from the Unit Ontology (UO) for import into the Open Energy Ontology (OEO). It is automatically extracted using ROBOT." --output ../../ontology/imports/uo-extracted.owl +# Annotates each axiom with the ontology IRI, using prov:wasDerivedFrom +robot annotate --input ../../ontology/imports/uo-extracted.owl --annotate-derived-from true --annotate-defined-by true --output ../../ontology/imports/uo-extracted.owl +# add 'definition' label to IAO_0000115 +sed -i "33s/.*/ definition<\/rdfs:label>/" ../../ontology/imports/uo-extracted.owl +# Annotate with new ontology information +robot annotate --input ../../ontology/imports/uo-extracted.owl --ontology-iri http://openenergy-platform.org/ontology/imports/uo-extracted.owl --version-iri http://openenergy-platform.org/ontology/imports/uo-extracted.owl --output ../../ontology/imports/uo-extracted.owl + +rm uo-full-download.owl +rm uo-module-temp.owl diff --git a/src/scripts/uo/uo-w-hierarchy.txt b/src/scripts/uo/uo-w-hierarchy.txt new file mode 100644 index 000000000..419150caa --- /dev/null +++ b/src/scripts/uo/uo-w-hierarchy.txt @@ -0,0 +1,19 @@ +http://purl.obolibrary.org/obo/UO_0000000 +http://purl.obolibrary.org/obo/UO_0000001 +http://purl.obolibrary.org/obo/UO_0000002 +http://purl.obolibrary.org/obo/UO_0000003 +http://purl.obolibrary.org/obo/UO_0000036 +http://purl.obolibrary.org/obo/UO_0000046 +http://purl.obolibrary.org/obo/UO_0000047 +http://purl.obolibrary.org/obo/UO_0000111 +http://purl.obolibrary.org/obo/UO_0000224 +http://purl.obolibrary.org/obo/UO_0010006 +http://purl.obolibrary.org/obo/UO_0000033 +http://purl.obolibrary.org/obo/UO_0000187 +http://purl.obolibrary.org/obo/UO_0000189 +http://purl.obolibrary.org/obo/UO_0000190 +http://purl.obolibrary.org/obo/UO_0000122 +http://purl.obolibrary.org/obo/UO_0000032 +http://purl.obolibrary.org/obo/UO_0000095 +http://purl.obolibrary.org/obo/UO_0000113 +http://purl.obolibrary.org/obo/UO_0000270