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

Specify how to express an unmapped entity using sssom:NoTermFound #381

Merged
merged 5 commits into from
Aug 6, 2024

Conversation

matentzn
Copy link
Collaborator

@matentzn matentzn commented Aug 3, 2024

Fixes #28

In the PR we add the ability to express that an entity in a mapping does not have a corresponding mappable entity.

In addition to the model entry, the feature is documented in the model specification.

As usual, we add examples and link to the corresponding issue.

  • docs/ have been added/updated if necessary
  • make test has been run locally
  • NA tests have been added/updated (if applicable)
  • CHANGELOG.md has been updated.

If you are proposing a change to the SSSOM metadata model, you must

  • provide a full, working and valid example in examples/
  • provide a link to the related GitHub issue in the see_also field of the linkml model
  • provide a link to a valid example in the see_also field of the linkml model
  • run SSSOM-Py test suite against the updated model

In addition to the model entry, the feature is documented in the model specification.

As usual, we add examples and link to the corresponding issue.
@matentzn matentzn requested a review from gouttegd August 3, 2024 18:17
src/docs/spec-model.md Outdated Show resolved Hide resolved
src/docs/spec-model.md Outdated Show resolved Hide resolved
Copy link
Contributor

@gouttegd gouttegd left a comment

Choose a reason for hiding this comment

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

What you wrote is fine for the documentation, but not for the spec IMO.

All the spec should do is warn implementers that they may come across the sssom:NoTermFound value, how they should interpret it, and what constraints apply to mappings where this value is used.

@matentzn matentzn requested a review from gouttegd August 4, 2024 04:16
@gouttegd
Copy link
Contributor

gouttegd commented Aug 4, 2024

Two questions:

  1. Do you want to explicitly forbid the case where both the subject_id and the object_id are sssom:NoTermFound? Currently this would be perfectly allowed.

Such a mapping could be used to explicitly indicate that two domains (vocabularies, ontologies, databases, whatever) are completely disjoint and have nothing in common. I suppose this would be a very infrequent need, but a priori I see no reason to forbid that.

  1. Do we need special rules for inverting mappings that refer to sssom:NoTermFound, when the mapping predicate has a distinct inverse predicate (e.g., the mapping predicate is skos:narrowMatch, which is inverted into skos:broadMatch)?

Consider the following mapping (justification omitted for brevity):

subject_id   subject_source   predicate_id       object_id           object_source
HP:1234      obo:hp           skos:narrowMatch   sssom:NoTermFound   obo:mp

Applying the classic inversion rules, this would be inverted into:

subject_id          subject_source   predicate_id       object_id   object_source
sssom:NoTermFound   obo:mp           skos:broadMatch    HP:1234     obo:hp

I think this is fine: the first mapping says “HP:1234 has no narrow match in MP”, the second says “nothing in MP has a broad match to HP:1234” – this seems correct to me, what do you think?

@matentzn
Copy link
Collaborator Author

matentzn commented Aug 4, 2024

Such a mapping could be used to explicitly indicate that two domains (vocabularies, ontologies, databases, whatever) are completely disjoint and have nothing in common. I suppose this would be a very infrequent need, but a priori I see no reason to forbid that.

I like the thinking. Do you think we should add this as a comment to the spec?

Do we need special rules for inverting mappings that refer to sssom:NoTermFound, when the mapping predicate has a distinct inverse predicate (e.g., the mapping predicate is skos:narrowMatch, which is inverted into skos:broadMatch)?

Thank you for thinking of this! The example makes me was hard to think through mentally, but I think you are right, there is no problem. If HP:123 does not have a narrow match in MP, No term in MP can be a broad match to it.

@gouttegd
Copy link
Contributor

gouttegd commented Aug 4, 2024

I like the thinking. Do you think we should add this as a comment to the spec?

To the user-facing documentation, maybe. To the spec, no need, there’s nothing that implementations should be aware of.

gouttegd
gouttegd previously approved these changes Aug 4, 2024
@matentzn matentzn added the schema label Aug 4, 2024
@matentzn matentzn self-assigned this Aug 4, 2024
Copy link
Contributor

@hrshdhgd hrshdhgd left a comment

Choose a reason for hiding this comment

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

Run make all same as #386 (review)

hrshdhgd
hrshdhgd previously approved these changes Aug 5, 2024
CHANGELOG.md Outdated Show resolved Hide resolved
src/docs/spec-model.md Outdated Show resolved Hide resolved
src/docs/spec-model.md Outdated Show resolved Hide resolved
src/docs/spec-model.md Outdated Show resolved Hide resolved
@matentzn matentzn dismissed stale reviews from hrshdhgd and gouttegd via d518571 August 6, 2024 13:20
@matentzn matentzn merged commit 1aeeb80 into master Aug 6, 2024
3 checks passed
@matentzn matentzn deleted the issue28-notermfound branch August 6, 2024 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How should unmapped elements be indicated?
4 participants