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

update import of UO #15

Merged
merged 4 commits into from
Jul 9, 2024
Merged

update import of UO #15

merged 4 commits into from
Jul 9, 2024

Conversation

stap-m
Copy link
Contributor

@stap-m stap-m commented Feb 23, 2024

based on #14 and OpenEnergyPlatform/ontology#1690

  • update list of imported units and prefixes (uo-w-hierarchy.txt)
  • update import and annotation script, such that it can be run by windows (extract-uo-module.sh)
  • run script and thereby create new version of uo-extracted.owl
  • remove uo-full-download.owl

@@ -142,7 +157,7 @@
</owl:Axiom>
<owl:Axiom>
<owl:annotatedSource rdf:resource="http://purl.obolibrary.org/obo/UO_0000000"/>
<owl:annotatedProperty rdf:resource="http://www.w3.org/2000/01/rdf-schema#comment"/>
<owl:annotatedProperty rdf:resource="http://purl.obolibrary.org/obo/#IAO_0000115"/>

Choose a reason for hiding this comment

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

I tried to open this link in a browser and it failed. Changing several parts of the link also doesn't fix it. Ontobee is currently down, which complicates proposing a fix.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

UO uses "rdfs:comment" as annotation property for definitions. We want to change this to "IAO_0000115" (definition), to be conform to OEO. This is done for all imported classes.

Copy link

@l-emele l-emele Feb 28, 2024

Choose a reason for hiding this comment

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

Suggested change
<owl:annotatedProperty rdf:resource="http://purl.obolibrary.org/obo/#IAO_0000115"/>
<owl:annotatedProperty rdf:resource="http://purl.obolibrary.org/obo/IAO_0000115"/>

The problem is the # character in the URL. Without that, the URL resolves to: https://ontobee.org/ontology/IAO?iri=http://purl.obolibrary.org/obo/IAO_0000115

Copy link

@l-emele l-emele left a comment

Choose a reason for hiding this comment

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

As far as I can tell this PR looks fine, apart from the # character where there is a specific comment.

I can confirm that the uo-extracted.owl opens properly in Protégé and I do not spot any other problems. So I approve this PR, assuming that you will fix the line with the IRI discussion for IAO_0000115 before merging.

@stap-m
Copy link
Contributor Author

stap-m commented Feb 29, 2024

I tried it out, this annotation comes automatically from ROBOT, see line 22 in the shell script.
It appears where the definition annotation is annotated again with the "derived from" annotation.
Actually, I don't want to mess with ROBOT and I don't see any harm for the import, since protege does not complain. Or do you see any reason to change anyway? @l-emele @christian-rli
EDIT: it occurs in all entities btw, not just this line

@l-emele
Copy link

l-emele commented Feb 29, 2024

Actually, I don't want to mess with ROBOT and I don't see any harm for the import, since protege does not complain.

Protégé complains only if it is syntactically correct. Protégé does not check whether every IRI is correct.

Or do you see any reason to change anyway?

Have you tried what happens if the current state of uo-extracted.owl is imported in the OEO? Does Protégé show the definition annotation of classes imported from UO with this wrong IRI correctly as it does for all other classes?

## add prefix for OBO xmlns:obo="http://purl.obolibrary.org/obo/"
# Linux sed -i 's/xmlns:owl/xmlns:obo="http:\/\/purl.obolibrary.org\/obo\/"\xmlns:owl/' uo-module-temp.owl
# windows
(Get-Content -ReadCount 0 uo-temp-extracted.owl) -replace 'xmlns:owl', 'xmlns:obo="http://purl.obolibrary.org/obo/#"
Copy link

Choose a reason for hiding this comment

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

I reviewed your script again. I think this line causes the problem with the additional #. What happens if you delete it here?

Suggested change
(Get-Content -ReadCount 0 uo-temp-extracted.owl) -replace 'xmlns:owl', 'xmlns:obo="http://purl.obolibrary.org/obo/#"
(Get-Content -ReadCount 0 uo-temp-extracted.owl) -replace 'xmlns:owl', 'xmlns:obo="http://purl.obolibrary.org/obo/"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, seems to work. The prefix can live without the # 👍

@stap-m
Copy link
Contributor Author

stap-m commented Mar 4, 2024

ToDo: we change the definition in OEO for unit, therefore we should remove the imported definition in uo-extracted in the shell script

@areleu
Copy link
Contributor

areleu commented Jun 27, 2024

From OEO meeting 82:
Remove the definition from unit from the units ontology?

or

Remove Unit from import and import only the subclasses?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants