Skip to content

Commit

Permalink
Merge branch 'master' into add-support-for-extension-slots
Browse files Browse the repository at this point in the history
  • Loading branch information
gouttegd committed Aug 6, 2024
2 parents b8dec8d + 66d32ad commit 7a47ee2
Show file tree
Hide file tree
Showing 7 changed files with 86 additions and 28 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- Add the concept of "propagatable slots".
- Add the concept of "extension slots".
- Add the entity reference `sssom:NoTermFound` to express the concept of an "unmapped entity" ([issue](https://github.com/mapping-commons/sssom/issues/28))
- Replace `semantic_similarity_score` with `similarity_score` and `semantic_similarity_measure` with `similarity_measure` in the data model ([issue](https://github.com/mapping-commons/sssom/issues/385))

## SSSOM version 0.15.1
Expand Down
16 changes: 16 additions & 0 deletions examples/schema/no_term_found.sssom.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#curie_map:
# HP: http://purl.obolibrary.org/obo/HP_
# MP: http://purl.obolibrary.org/obo/MP_
# obo: http://purl.obolibrary.org/obo/
# orcid: https://orcid.org/
#mapping_set_id: https://w3id.org/sssom/commons/examples/no_term_found.sssom.tsv
#creator_id:
# - orcid:0000-0002-7356-1779
#subject_source: obo:hp
#object_source: obo:mp
#license: "https://creativecommons.org/publicdomain/zero/1.0/"
#mapping_provider: "https://w3id.org/sssom/core_team"
#comment: This is an example file for the SSSOM for illustration only. Its contents are entirely fabricated.
subject_id predicate_id object_id mapping_justification
HP:0009124 skos:exactMatch MP:0000003 semapv:ManualMappingCuration
HP:0000411 skos:exactMatch sssom:NoTermFound semapv:ManualMappingCuration
26 changes: 17 additions & 9 deletions src/docs/create-mapping-commons.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
# Getting started
## Getting started

- First, create a virtual environment of your choice (anaconda, venv, pyenv, poetry etc.). If you need assistance with virtual environments, [here's a guide](https://berkeleybop.github.io/best_practice/python_environments) to help you setup pyenv and use poetry with it.
- Install the [cruft](https://github.com/cruft/cruft) package. Cruft enables keeping projects up-to-date with future updates made to this original template.

```
pip install cruft
```

- Create a project using the [mapping-commons-cookiecutter](https://github.com/mapping-commons/mapping-commons-cookiecutter) template.

```
cruft create https://github.com/mapping-commons/mapping-commons-cookiecutter
```

This kickstarts an interactive session where you declare the following:

- `project_name`: Name of the project. [defaults to: my-commons-name]
- `github_org`: Name of the github org the project belongs to. [defaults to: my-org]
- `project_description`: Description of the project [defaults to: 'This is the project description.']
Expand All @@ -20,13 +23,14 @@ This kickstarts an interactive session where you declare the following:
- `yo`: Choose from [1]: Yes, [2]: No [**TEST OPTION FOR NOW**]
- `license`: Choose from [1]: Yes, [2]: No [**TEST OPTION FOR NOW**]

# What does this do?
## What does this do?

The following files and directories are autogenerated in the project:
# TODO

# Version control
## GitHub
### TODO

## Version control
### GitHub

1. Go to [https://github.com/new] and follow the instructions, being sure to
NOT add a README or .gitignore file (this cookiecutter template will take
Expand All @@ -40,27 +44,31 @@ The following files and directories are autogenerated in the project:
git push -u origin main
```

## GitLab
### GitLab

### TODO
#### TODO

# Future updates to the project's boilerplate code
## Future updates to the project's boilerplate code

In order to be up-to-date with the template, first check if there is a mismatch between the project's boilerplate code and the template by running:
```
cruft check
```
This indicates if there is a difference between the current project's boilerplate code and the latest version of the project template. If the project is up-to-date with the template:

```
SUCCESS: Good work! Project's cruft is up to date and as clean as possible :).
```
Otherwise, it will indicate that the project's boilerplate code is not up-to-date by the following:
```
FAILURE: Project's cruft is out of date! Run `cruft update` to clean this mess up.
```
For viewing the difference, run `cruft diff`. This shows the difference between the project's boilerplate code and the template's latest version.
After running `cruft update`, the project's boilerplate code will be updated to the latest version of the template.
After running `cruft update`, the project's boilerplate code will be updated to the latest version of the template.
6 changes: 6 additions & 0 deletions src/docs/presentations.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Presentations

## A Simple Standard for Ontological Mappings 2024: The case for prioritising 5-Star mappings (Every Cure, internal seminar)

- August 1<sup>st</sup>, 2024, virtual
- Talk to [Every Cure](https://everycure.org/) technical team (Knowledge Sharing Series) to make the case for prioritising the collection of mapping provenance.
- [Slides](https://docs.google.com/presentation/d/1_KkSeZcKyzsQVlZe8qkl7iEvii3HX0QKR58uvbirTDM/edit)

## Workshop on Prefixes, CURIEs, and IRIs 2023

- November 27<sup>th</sup>, 2023, virtual
Expand Down
12 changes: 6 additions & 6 deletions src/docs/related-documentation.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
## Related documentation

- [SSSOM Toolkit](https://mapping-commons.github.io/sssom-py/index.html#)
- [SSSOM Java](https://incenp.org/dvlpt/sssom-java/)
- Semantic Mapping Vocabulary (SEMAPV): "https://mapping-commons.github.io/semantic-mapping-vocabulary/"
- LinkML: "https://linkml.io/linkml/"
- OBO Academy: "https://oboacademy.github.io/obook/"
- Monarch Initiative: "https://monarch-initiative.github.io/monarch-documentation/"
- [SSSOM Toolkit](https://mapping-commons.github.io/sssom-py/index.html#): A toolkit and library for processing SSSOM files in Python
- [SSSOM Java](https://incenp.org/dvlpt/sssom-java/): A toolkit and library for processing SSSOM files in Java
- [Semantic Mapping Vocabulary (SEMAPV)](https://mapping-commons.github.io/semantic-mapping-vocabulary/): The mapping vocabulary used for mapping justifications and specialised mapping predicates
- [LinkML](https://linkml.io/linkml/): The modelling framework used by SSSOM
- [OBO Academy](https://oboacademy.github.io/obook/): Ontology and mapping related training materials
- [Monarch Initiative](https://monarch-initiative.github.io/monarch-documentation/): Knowledge Graph related products supported by the Monarch Initiatives, including many tools using and producing SSSOM
16 changes: 16 additions & 0 deletions src/docs/spec-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,22 @@ In addition, predicates from the following sources MAY also be encouraged:
* any relation from the [Relation Ontology (RO)](https://obofoundry.org/ontology/ro.html);
* any relation under [skos:mappingRelation](http://www.w3.org/2004/02/skos/core#mappingRelation) in the [Semantic Mapping Vocabulary](https://mapping-commons.github.io/semantic-mapping-vocabulary/).


## Representing unmapped entities

The special value `sssom:NoTermFound` MAY be used as the `object_id` of a mapping to explicitly state that the subject of said mapping cannot be mapped to any entity in the domain represented by the `object_source` slot.

Likewise, the `sssom:NoTermFound` value MAY be used as the `subject_id` of a mapping to state that the object of said mapping cannot be mapped to any entity in the domain represented by the `subject_source` slot.

When that special value is used as the `subject_id` (respectively `object_id`), the `subject_source` (respectively `object_source`) slot SHOULD be defined.

The `sssom:NoTermFound` value MUST NOT be used in any other slot than `subject_id` or `object_id`.

The meaning of the NOT predicate modifier in a mapping that refers to `sssom:NoTermFound` is unspecified.

When computing cardinality values (to fill the `mapping_cardinality` slot), mappings that refer to `sssom:NoTermFound` MUST be ignored.


## Non-standard slots

<a id="non-standard-slots"></a>
Expand Down
37 changes: 24 additions & 13 deletions src/sssom_schema/schema/sssom_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -186,19 +186,7 @@ slots:
range: EntityReference
required: true
slot_uri: owl:annotatedProperty
examples:
- value: skos:exactMatch
predicate_modifier:
description: A modifier for negating the prediate. See https://github.com/mapping-commons/sssom/issues/40 for discussion
range: predicate_modifier_enum
see_also:
- https://github.com/mapping-commons/sssom/issues/107
examples:
- value: Not
description: Negates the predicate, see documentation of predicate_modifier_enum
predicate_label:
description: The label of the predicate/relation of the mapping
range: string

examples:
- value: owl:sameAs
description: The subject and the object are instances (owl individuals), and the two instances are the same.
Expand All @@ -224,6 +212,20 @@ slots:
description: Two terms are related in some way. The meaning is frequently consistent across a single set of mappings. Note this property is often overloaded even where the terms are of a different nature (e.g. interpro2go)
- value: rdfs:seeAlso
description: The subject and the object are associated in some unspecified way. The object IRI often resolves to a resource on the web that provides additional information.
predicate_modifier:
description: A modifier for negating the predicate. See https://github.com/mapping-commons/sssom/issues/40 for discussion
range: predicate_modifier_enum
see_also:
- https://github.com/mapping-commons/sssom/issues/107
examples:
- value: Not
description: Negates the predicate, see documentation of predicate_modifier_enum
predicate_label:
description: The label of the predicate/relation of the mapping
range: string
examples:
- value: has cross-reference
description: The label of the oboInOwl:hasDbXref property to represent cross-references.
predicate_type:
description: The type of entity that is being mapped.
range: entity_type_enum
Expand Down Expand Up @@ -806,3 +808,12 @@ classes:
description: Indicates whether a slot can be propagated from a mapping
down to individual mappings.
range: boolean
NoTermFound:
class_uri: sssom:NoTermFound
description: sssom:NoTermFound can be used in place of a subject_id or object_id
when the corresponding entity could not be found. It SHOULD be used in conjuction with
a corresponding subject_source or object_source to signify where the term was not found.
see_also:
- https://github.com/mapping-commons/sssom/issues/28
- https://github.com/mapping-commons/sssom/blob/master/examples/schema/no_term_found.sssom.tsv

0 comments on commit 7a47ee2

Please sign in to comment.