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

Feature 870 create automated annotation for module identification #1111

Conversation

jannahastings
Copy link
Contributor

Opening a draft pull request so that I can add comments on the diff. Not to be merged yet.

- [ ] Creating the belonging annotation in each OMN

- [ ] Checks, if run is necessary

I'm unsure if the OMN files are still correct.
I'm afraid I don't know this ontology well enough to judge the results for myself.
Just changed some stuff for managing the file system in the btma-directory.
Just deleted the big JAR :'D
Should handling know most prefixes.
And checks if updating is necessary
":" -> "OEO:"
Build in the commented final-call additional to the test-call that shows the functionality in comparison to the unedited files.

Deleted some outdated comments.
Edited the last loop for better overview on the procedure
Now the script follows the
Priority-rule:
shared->physical->social->model.

The script extracts the prefixes of the ontology (without using ROBOT)
@jannahastings jannahastings linked an issue Apr 13, 2022 that may be closed by this pull request
1 task
Copy link
Contributor Author

@jannahastings jannahastings left a comment

Choose a reason for hiding this comment

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

Looks good, nearly there. I have made detailed comments in various places in the code.

A general point is that the robot.jar has snuck into the commit again so this will need to be reverted once more.

A bigger issue is that the robot template command is creating new classes where the ID referred not to a class but to something else, e.g. an individual. Thus, we will need to keep track of the OWL type associated with the ID, which we can get from the original export and then pass back to the template command later. Let's discuss and implement this after the rest of the pipeline is working correctly as per the other code comments.

src/scripts/btma/annotator.py Outdated Show resolved Hide resolved
src/scripts/btma/annotator.py Outdated Show resolved Hide resolved
src/scripts/btma/annotator.py Show resolved Hide resolved
src/scripts/btma/annotator.py Outdated Show resolved Hide resolved
src/scripts/btma/annotator.py Outdated Show resolved Hide resolved
src/scripts/btma/annotator.py Outdated Show resolved Hide resolved
src/scripts/btma/annotator.py Outdated Show resolved Hide resolved
src/scripts/btma/annotator.py Outdated Show resolved Hide resolved
src/scripts/btma/annotator.py Outdated Show resolved Hide resolved
Updated requirements on annotator based on the review.

Add a hint to the README.md
for consistency
@stage1407
Copy link
Contributor

stage1407 commented Apr 17, 2022

Ok, I've implemented your comments.
Now I think it is ready for the next release

But if anything is still open let me know.

Edited:
Except for overwriting the ontologies of course.
And I forgot to reintroduce the numeric ID for belongs_to_module after it was undone by the accidental reset.

@stage1407
Copy link
Contributor

stage1407 commented Apr 17, 2022

Should we also introduce numeric IDs for the representation of the oeo modules?
I'm unsure but I think that we should link with the IRI to the module directly. So without a numerical ID.

@jannahastings
Copy link
Contributor Author

Should we also introduce numeric IDs for the representation of the oeo modules? I'm unsure but I think that we should link with the IRI to the module directly. So without a numerical ID.

No need to introduce numerical IDs for the oeo modules, we just use their IRIs directly.

@jannahastings
Copy link
Contributor Author

Edited: Except for overwriting the ontologies of course. And I forgot to reintroduce the numeric ID for belongs_to_module after it was undone by the accidental reset.

OK, good, so there is just one more thing to add after these changes are done. The script needs to keep track of the OWL type associated with the ID, for example, individual, class, or object property. Robot provides headers both for extracting this in the first step and for specifying it in the template. We need this because otherwise the robot template step at the end assumes that all the IDs should be classes, when they are not.

Now the script extracts the type of each entity and adds it in the template.csv to hold the types of the entities of the ontology.
Two little changes.
One for Tests and a comment.
Tried to fix it with the additional Prefix in the template
@stage1407
Copy link
Contributor

stage1407 commented Apr 24, 2022

<http://www.geneontology.org/formats/oboInOwl#<http> "//openenergy-platform.org/ontology/oeo/OEO_00260001> <http://openenergy-platform.org/ontology/oeo/oeo-model>"^^xsd:string,
<http://www.geneontology.org/formats/oboInOwl#<http> "//www.w3.org/2002/07/owl#aggregation type>"^^xsd:string,
<http://www.geneontology.org/formats/oboInOwl#<http> "//www.w3.org/2002/07/owl#analytical approach>"^^xsd:string,
<http://www.geneontology.org/formats/oboInOwl#<http> "//www.w3.org/2002/07/owl#boolean variable>"^^xsd:string,
<http://www.geneontology.org/formats/oboInOwl#<http> "//www.w3.org/2002/07/owl#data format>"^^xsd:string,
<http://www.geneontology.org/formats/oboInOwl#<http> "//www.w3.org/2002/07/owl#methodical focus>"^^xsd:string,
<http://www.geneontology.org/formats/oboInOwl#<http> "//www.w3.org/2002/07/owl#software framework>"^^xsd:string,
<http://www.geneontology.org/formats/oboInOwl#<http> "//www.w3.org/2002/07/owl#time stamp alignment>"^^xsd:string,
<http://www.geneontology.org/formats/oboInOwl#<http> "//www.w3.org/2002/07/owl#uncertainty approach>"^^xsd:string

Ok the error arises from the fact that in the ontology e.g. 'http://www.geneontology.org/formats/oboInOwl#<http' is specified as IRI and such a thing can not be parsed, of course.

I am surprised at this point that something is imported from the geneontology at all and not owl: that is used directly in the script to specify types.

The main problem is that the http: of the following IRI ends up there.

@jannahastings
Do you have any guess, where could be the problem there?

Otherwise I have to look the next days, why this is happening.

@jannahastings
Copy link
Contributor Author

@stage1407, I was just double checking the prefix command format in ROBOT:

--prefix "ex: http://example.com/"

so for our scenario that would be like this, I think:

--prefix "OEO: http://openenergy-platform.org/ontology/oeo/OEO_"

@stale stale bot added the stale already discussed issues that haven't got worked on for a while label May 25, 2022
implemented Loading Symbol + make script callable from the Terminal
Refactored, restructured, commented and documented
@stap-m
Copy link
Contributor

stap-m commented Jun 14, 2022

@stage1407 @jannahastings How far is this PR?

@stale stale bot removed the stale already discussed issues that haven't got worked on for a while label Jun 14, 2022
@jannahastings
Copy link
Contributor Author

Unfortunately, we did not yet make progress with solving the problem with the implementation of this issue :-(.

@areleu areleu reopened this Oct 6, 2022
@stage1407 stage1407 self-assigned this Oct 6, 2022
@stale stale bot added the stale already discussed issues that haven't got worked on for a while label Oct 22, 2022
@stale stale bot removed the stale already discussed issues that haven't got worked on for a while label Nov 8, 2022
@stale stale bot added the stale already discussed issues that haven't got worked on for a while label Nov 22, 2022
@stap-m stap-m assigned stap-m and unassigned stage1407 May 4, 2023
@stap-m
Copy link
Contributor

stap-m commented Sep 29, 2023

This PR is not needed anymore, since 1) protege is now able to show the module itself, and 2) the restructuring in #1592. We can finally close it. 🎉

@stap-m stap-m closed this Sep 29, 2023
@stap-m stap-m deleted the feature-870-create-automated-annotation-for-module-identification branch October 25, 2023 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale already discussed issues that haven't got worked on for a while
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Create automated annotation for module identification
4 participants