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

Allow arbitrary defined annotation properties as qualifier tags in OBO format #1099

Closed
wants to merge 5 commits into from

Conversation

balhoff
Copy link
Contributor

@balhoff balhoff commented Mar 3, 2023

Currently annotation property IRIs for properties used for sub-annotations (e.g., annotating source of a definition) are always mangled into the oboInOwl namespace. These changes will allow using any defined annotation property.

@balhoff
Copy link
Contributor Author

balhoff commented Mar 3, 2023

See owlcollab/oboformat#125

Copy link
Member

@cmungall cmungall left a comment

Choose a reason for hiding this comment

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

thank you thank you 🙏 🙏 🙏

@ignazio1977
Copy link
Contributor

looks good to me

@balhoff
Copy link
Contributor Author

balhoff commented Mar 4, 2023

Thanks! I'm going to do a bit more testing on some real ontologies before marking it ready for merge.

@balhoff
Copy link
Contributor Author

balhoff commented Mar 8, 2023

With the implementation so far, one of the differences you see in parsing with the old code vs. the new code is where it would fall back to the oboInOwl namespace for some of the built-in tags. A few of the tags do not have an IRI specified in Obo2OWLConstants.java. You can see that I added one for id, which I think needs to happen since that property is added automatically by the parser. But some are missing, such as created_by and creation_date. The OBO format 1.4 spec maps these to dc properties (but that part of the spec is colored red... uncertain?). In practice these have been getting oboInOwl namespaces when parsed.

If I add these to the constants file, they will always get mapped to what I put in: oboInOwl would be backwards-compatible, or else dc properties to match what the spec was aiming for (or even better, dcTerms). However, if I don't add them, they can be easily mapped with the addition of a Typedef stanza like so:

[Typedef]
id: created_by
name: created by
namespace: external
xref: http://purl.org/dc/terms/creator
is_metadata_tag: true

I think this would be great, since the file would use the built-in tags but map to user-defined properties. In this situation though, if there is no Typedef, rather than going into the oboInOwl namespace, they would end up with an ontology IRI hash IRI (e.g., http://purl.obolibrary.org/obo/go#created_by). Allowing override like that would change the parsed IRIs for ontologies that don't add a Typedef.

@balhoff
Copy link
Contributor Author

balhoff commented Mar 8, 2023

To add on, I guess there are two different questions:

  • should we allow any built-in tags to be overridden by typdef declarations?
  • if we don't allow override, should we map those two tags to DCterms?

@balhoff balhoff closed this Mar 8, 2023
@balhoff balhoff reopened this Mar 8, 2023
@cmungall
Copy link
Member

cmungall commented Mar 9, 2023

I agree with your analysis. I think defaulting to oboInOwl is consistent with existing behavior. If people really want to use a shorthand name and a custom URI, they can include a Typedef.

But I think either we would be encouraging people who are mapping there axiom annotations forward to something more interoperable to use a curie, e.g. {dcterms:source=...., with the prefix mapped in the idspaces header

@balhoff balhoff marked this pull request as ready for review March 14, 2023 19:42
@balhoff
Copy link
Contributor Author

balhoff commented Mar 17, 2023

@ignazio1977 I think this is ready to merge, thanks!

ignazio1977 pushed a commit that referenced this pull request Mar 18, 2023
Allowing arbitrary defined annotation properties as qualifier tags.

Use oboInOWL as the default namespace when looking up tag IRIs.
This helps with backwards compatibility for undeclared annotation
properties.

Enforce oio namespace for created_by and creation_date.
@ignazio1977
Copy link
Contributor

Done, I've rebased it and tweaked the test a bit to fit the style f the rest of the tests.

ignazio1977 pushed a commit that referenced this pull request Jan 14, 2024
Allowing arbitrary defined annotation properties as qualifier tags.

Use oboInOWL as the default namespace when looking up tag IRIs.
This helps with backwards compatibility for undeclared annotation
properties.

Enforce oio namespace for created_by and creation_date.
ignazio1977 added a commit that referenced this pull request Jan 20, 2024
Allowing arbitrary defined annotation properties as qualifier tags.

Use oboInOWL as the default namespace when looking up tag IRIs.
This helps with backwards compatibility for undeclared annotation
properties.

Enforce oio namespace for created_by and creation_date.
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.

3 participants