From 4e5d54150febb3511164d70816fd04f63177c219 Mon Sep 17 00:00:00 2001 From: Charles Tapley Hoyt Date: Sun, 24 May 2026 14:48:30 +0200 Subject: [PATCH 01/29] Add `derived_from` field --- CHANGELOG.md | 1 + examples/schema/derived_from.sssom.tsv | 20 +++++++++++ mkdocs.yml | 1 + src/docs/inference.md | 43 +++++++++++++++++++++++ src/sssom_schema/schema/sssom_schema.yaml | 38 ++++++++++++++++++++ 5 files changed, 103 insertions(+) create mode 100644 examples/schema/derived_from.sssom.tsv create mode 100644 src/docs/inference.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 27513e0e..cf5f1e95 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ - Add `reviewer_agreement` slot ([issue](https://github.com/mapping-commons/sssom/issues/510)) - Allow encoding pipe characters in multi-valued slots in SSSOM/TSV format ([issue](https://github.com/mapping-commons/sssom/issues/429)). - Specify a standard SSSOM hashing function ([issue](https://github.com/mapping-commons/sssom/issues/436)). +- Add `derived_from` slot ([issue](https://github.com/mapping-commons/sssom/issues/537)) ## SSSOM version 1.0.0 diff --git a/examples/schema/derived_from.sssom.tsv b/examples/schema/derived_from.sssom.tsv new file mode 100644 index 00000000..d896d1a1 --- /dev/null +++ b/examples/schema/derived_from.sssom.tsv @@ -0,0 +1,20 @@ +# curie_map: +# cas: https://commonchemistry.cas.org/detail?cas_rn= +# CHEBI: http://purl.obolibrary.org/obo/CHEBI_ +# mesh: http://id.nlm.nih.gov/mesh/ +# orcid: https://orcid.org/ +# semapv: https://w3id.org/semapv/vocab/ +# skos: http://www.w3.org/2004/02/skos/core# +# mapping: http://www.w3.org/2004/02/skos/core# +# license: https://creativecommons.org/publicdomain/zero/1.0/ +# mapping_set_id: https://github.com/mapping-commons/sssom/blob/master/examples/schema/derived_from.sssom.tsv +# creator_id: +# - orcid:0000-0003-4423-4370 +# see_also: +# - https://github.com/mapping-commons/sssom/issues/537 +# sssom_version: 1.1 +subject_id subject_label predicate_id object_id object_label mapping_justification derived_from comment +mesh:C000089 ammeline skos:exactMatch CHEBI:28646 ammeline semapv:ManualMappingCuration +CHEBI:28646 ammeline skos:exactMatch cas:645-92-1 Ammeline semapv:ManualMappingCuration +mesh:C000089 ammeline skos:exactMatch cas:645-92-1 Ammeline semapv:MappingChaining mapping:36a1f9244ea7641a90987c82f33c25c0c13712ee8f48207b2a0825f8a4e4e26a|mapping:bb768f0b1e1643298f4df1a381001f6ed68fcc8fff49b371f0235b51dbab9e1e this example needs to refer to both the mappings on row 18 and 19 by mapping sameness identifier +CHEBI:28646 ammeline skos:exactMatch mesh:C000089 Ammeline semapv:MappingInversion mapping:36a1f9244ea7641a90987c82f33c25c0c13712ee8f48207b2a0825f8a4e4e26a this example just needs to refer to the mapping on row 18 by the mapping sameness identifier diff --git a/mkdocs.yml b/mkdocs.yml index daadd1a5..def153a5 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -54,6 +54,7 @@ nav: - Introduction: spec-support.md - Hashing mapping records: spec-support-hashing.md - Applying Chaining Rules: chaining-rules.md + - Inference: inference.md - Resources for contributors: contributing.md - Resources for users: - FAQ: faq.md diff --git a/src/docs/inference.md b/src/docs/inference.md new file mode 100644 index 00000000..0c97b2be --- /dev/null +++ b/src/docs/inference.md @@ -0,0 +1,43 @@ +# Inference + +There are several mechanisms for inference: + +- Inference via chaining (see [chaining rules](chaining-rules.md)), which should + be tagged with `semapv:MappingChaining` as a justification +- Inference via mapping inversion, which should be tagged with + `semapv:MappingInversion` as a justification +- Inference via prior knowledge, which should be tagged with + `semapv:BackgroundKnowledgeBasedMatching` as a justification + +## Referring to Evidence + +The `derived_from` field was introduced in +[#537](https://github.com/mapping-commons/sssom/issues/537) in order to +reference the original subject-predicate-object triple from which new mappings +are inferred/derived. + +The following table demonstrates how the mapping sameness identifier (MSI) can +be referenced in the `derived_from` field when doing both mapping chaining +(i.e., using multiple mappings to infer a new one) and mapping inversion. + +``` +# curie_map: +# cas: https://commonchemistry.cas.org/detail?cas_rn= +# CHEBI: http://purl.obolibrary.org/obo/CHEBI_ +# mesh: http://id.nlm.nih.gov/mesh/ +# orcid: https://orcid.org/ +# semapv: https://w3id.org/semapv/vocab/ +# skos: http://www.w3.org/2004/02/skos/core# +# mapping: http://w3id.org/mapping/ +# license: https://creativecommons.org/publicdomain/zero/1.0/ +# mapping_set_id: https://github.com/mapping-commons/sssom/blob/master/examples/schema/derived_from.sssom.tsv +# creator_id: +# - orcid:0000-0003-4423-4370 +``` + +| subject_id | subject_label | predicate_id | object_id | object_label | mapping_justification | derived_from | comment | +| ------------ | ------------- | --------------- | ------------ | ------------ | ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| mesh:C000089 | ammeline | skos:exactMatch | CHEBI:28646 | ammeline | semapv:ManualMappingCuration | | | +| CHEBI:28646 | ammeline | skos:exactMatch | cas:645-92-1 | Ammeline | semapv:ManualMappingCuration | | | +| mesh:C000089 | ammeline | skos:exactMatch | cas:645-92-1 | Ammeline | semapv:MappingChaining | mapping:36a1f9244ea7641a90987c82f33c25c0c13712ee8f48207b2a0825f8a4e4e26a\|mapping:bb768f0b1e1643298f4df1a381001f6ed68fcc8fff49b371f0235b51dbab9e1e | this example needs to refer to the firs two mappings in this table by mapping sameness identifier | +| CHEBI:28646 | ammeline | skos:exactMatch | mesh:C000089 | Ammeline | semapv:MappingInversion | mapping:36a1f9244ea7641a90987c82f33c25c0c13712ee8f48207b2a0825f8a4e4e26a | this example just needs to refer to the first mappingin this table by the mapping sameness identifier | diff --git a/src/sssom_schema/schema/sssom_schema.yaml b/src/sssom_schema/schema/sssom_schema.yaml index f2421f06..77fbb1e3 100644 --- a/src/sssom_schema/schema/sssom_schema.yaml +++ b/src/sssom_schema/schema/sssom_schema.yaml @@ -1144,6 +1144,43 @@ slots: - https://github.com/mapping-commons/sssom/issues/78 - https://github.com/mapping-commons/sssom/pull/259 - https://github.com/mapping-commons/sssom/blob/master/examples/schema/issue_tracker.sssom.tsv + derived_from: + description: + A set of [mapping sameness identifiers + (MSIs)](https://github.com/ts4nfdi/mapping-sameness-identifier) for + mappings that were used to derive this mapping, e.g., through mapping + chaining or inversion, represented as CURIEs. It's left to the curator to + decide on the appropriate CURIE/URI prefix for encoding MSIs as CURIEs, + but suggested at minimum to use `mapping` as the CURIE prefix (as in the + examples) + range: EntityReference + multivalued: true + slot_uri: prov:wasDerivedFrom + instantiates: + - sssom:Versionable + annotations: + added_in: "1.1" + see_also: + - https://github.com/mapping-commons/sssom/issues/537 + - https://github.com/mapping-commons/sssom/pull/548 + - https://github.com/mapping-commons/sssom/blob/master/examples/schema/derived_from.sssom.tsv + examples: + - value: mapping:36a1f9244ea7641a90987c82f33c25c0c13712ee8f48207b2a0825f8a4e4e26a + description: + A single value can be used when inverting the mapping + mesh:C000089-skos:exactMatch-CHEBI:28646, whose mapping sameness + identifier is + 36a1f9244ea7641a90987c82f33c25c0c13712ee8f48207b2a0825f8a4e4e26a, to + get mapping CHEBI:28646-skos:exactMatch-mesh:C000089 + - value: mapping:36a1f9244ea7641a90987c82f33c25c0c13712ee8f48207b2a0825f8a4e4e26a|mapping:bb768f0b1e1643298f4df1a381001f6ed68fcc8fff49b371f0235b51dbab9e1e + description: + The mappings mesh:C000089-skos:exactMatch-CHEBI:28646 and + CHEBI:28646-skos:exactMatch-cas:645-92-1 (whose mapping sameness + identifiers are respectively + mapping:36a1f9244ea7641a90987c82f33c25c0c13712ee8f48207b2a0825f8a4e4e26a + and + mapping:bb768f0b1e1643298f4df1a381001f6ed68fcc8fff49b371f0235b51dbab9e1e) + can be used to infer mesh:C000089-skos:exactMatch-cas:645-92-1. see_also: description: A URL specific for the mapping instance. E.g. for kboom we have a @@ -1320,6 +1357,7 @@ classes: - similarity_measure - see_also - issue_tracker_item + - derived_from - other - comment class_uri: owl:Axiom From fcbf0569696ad3fce72d3fc73836d31826ebe644 Mon Sep 17 00:00:00 2001 From: Charles Tapley Hoyt Date: Sun, 24 May 2026 14:52:20 +0200 Subject: [PATCH 02/29] Fix descriptions of mappings --- examples/schema/derived_from.sssom.tsv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/schema/derived_from.sssom.tsv b/examples/schema/derived_from.sssom.tsv index d896d1a1..78c89930 100644 --- a/examples/schema/derived_from.sssom.tsv +++ b/examples/schema/derived_from.sssom.tsv @@ -16,5 +16,5 @@ subject_id subject_label predicate_id object_id object_label mapping_justification derived_from comment mesh:C000089 ammeline skos:exactMatch CHEBI:28646 ammeline semapv:ManualMappingCuration CHEBI:28646 ammeline skos:exactMatch cas:645-92-1 Ammeline semapv:ManualMappingCuration -mesh:C000089 ammeline skos:exactMatch cas:645-92-1 Ammeline semapv:MappingChaining mapping:36a1f9244ea7641a90987c82f33c25c0c13712ee8f48207b2a0825f8a4e4e26a|mapping:bb768f0b1e1643298f4df1a381001f6ed68fcc8fff49b371f0235b51dbab9e1e this example needs to refer to both the mappings on row 18 and 19 by mapping sameness identifier -CHEBI:28646 ammeline skos:exactMatch mesh:C000089 Ammeline semapv:MappingInversion mapping:36a1f9244ea7641a90987c82f33c25c0c13712ee8f48207b2a0825f8a4e4e26a this example just needs to refer to the mapping on row 18 by the mapping sameness identifier +mesh:C000089 ammeline skos:exactMatch cas:645-92-1 Ammeline semapv:MappingChaining mapping:36a1f9244ea7641a90987c82f33c25c0c13712ee8f48207b2a0825f8a4e4e26a|mapping:bb768f0b1e1643298f4df1a381001f6ed68fcc8fff49b371f0235b51dbab9e1e this example needs to refer to the first two mappings in this document by mapping sameness identifier +CHEBI:28646 ammeline skos:exactMatch mesh:C000089 Ammeline semapv:MappingInversion mapping:36a1f9244ea7641a90987c82f33c25c0c13712ee8f48207b2a0825f8a4e4e26a this example just needs to refer to the first mapping in this document by the mapping sameness identifier From d93e27c06a2cb918a7b3f4c9bd45497a304e508e Mon Sep 17 00:00:00 2001 From: Charles Tapley Hoyt Date: Sun, 24 May 2026 14:53:25 +0200 Subject: [PATCH 03/29] Fix spurious whitespace --- examples/schema/derived_from.sssom.tsv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/schema/derived_from.sssom.tsv b/examples/schema/derived_from.sssom.tsv index 78c89930..12a3bffb 100644 --- a/examples/schema/derived_from.sssom.tsv +++ b/examples/schema/derived_from.sssom.tsv @@ -16,5 +16,5 @@ subject_id subject_label predicate_id object_id object_label mapping_justification derived_from comment mesh:C000089 ammeline skos:exactMatch CHEBI:28646 ammeline semapv:ManualMappingCuration CHEBI:28646 ammeline skos:exactMatch cas:645-92-1 Ammeline semapv:ManualMappingCuration -mesh:C000089 ammeline skos:exactMatch cas:645-92-1 Ammeline semapv:MappingChaining mapping:36a1f9244ea7641a90987c82f33c25c0c13712ee8f48207b2a0825f8a4e4e26a|mapping:bb768f0b1e1643298f4df1a381001f6ed68fcc8fff49b371f0235b51dbab9e1e this example needs to refer to the first two mappings in this document by mapping sameness identifier -CHEBI:28646 ammeline skos:exactMatch mesh:C000089 Ammeline semapv:MappingInversion mapping:36a1f9244ea7641a90987c82f33c25c0c13712ee8f48207b2a0825f8a4e4e26a this example just needs to refer to the first mapping in this document by the mapping sameness identifier +mesh:C000089 ammeline skos:exactMatch cas:645-92-1 Ammeline semapv:MappingChaining mapping:36a1f9244ea7641a90987c82f33c25c0c13712ee8f48207b2a0825f8a4e4e26a|mapping:bb768f0b1e1643298f4df1a381001f6ed68fcc8fff49b371f0235b51dbab9e1e this example needs to refer to the first two mappings in this document by mapping sameness identifier +CHEBI:28646 ammeline skos:exactMatch mesh:C000089 Ammeline semapv:MappingInversion mapping:36a1f9244ea7641a90987c82f33c25c0c13712ee8f48207b2a0825f8a4e4e26a this example just needs to refer to the first mapping in this document by the mapping sameness identifier From 77007f7566dee9e10968eecbe8bbee437836a3a7 Mon Sep 17 00:00:00 2001 From: Charles Tapley Hoyt Date: Sun, 24 May 2026 14:57:02 +0200 Subject: [PATCH 04/29] Update derived_from.sssom.tsv --- examples/schema/derived_from.sssom.tsv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/schema/derived_from.sssom.tsv b/examples/schema/derived_from.sssom.tsv index 12a3bffb..f5284ed4 100644 --- a/examples/schema/derived_from.sssom.tsv +++ b/examples/schema/derived_from.sssom.tsv @@ -5,7 +5,7 @@ # orcid: https://orcid.org/ # semapv: https://w3id.org/semapv/vocab/ # skos: http://www.w3.org/2004/02/skos/core# -# mapping: http://www.w3.org/2004/02/skos/core# +# mapping: http://w3id.org/mapping/ # license: https://creativecommons.org/publicdomain/zero/1.0/ # mapping_set_id: https://github.com/mapping-commons/sssom/blob/master/examples/schema/derived_from.sssom.tsv # creator_id: From 701d28e3874fb530a2c99f4b224bbd9aeb98f76d Mon Sep 17 00:00:00 2001 From: Charles Tapley Hoyt Date: Sun, 24 May 2026 15:00:49 +0200 Subject: [PATCH 05/29] Remove text about how to encode CURIE/URI prefix --- src/sssom_schema/schema/sssom_schema.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/sssom_schema/schema/sssom_schema.yaml b/src/sssom_schema/schema/sssom_schema.yaml index 77fbb1e3..e25bca79 100644 --- a/src/sssom_schema/schema/sssom_schema.yaml +++ b/src/sssom_schema/schema/sssom_schema.yaml @@ -1149,10 +1149,7 @@ slots: A set of [mapping sameness identifiers (MSIs)](https://github.com/ts4nfdi/mapping-sameness-identifier) for mappings that were used to derive this mapping, e.g., through mapping - chaining or inversion, represented as CURIEs. It's left to the curator to - decide on the appropriate CURIE/URI prefix for encoding MSIs as CURIEs, - but suggested at minimum to use `mapping` as the CURIE prefix (as in the - examples) + chaining or inversion, represented as CURIEs. range: EntityReference multivalued: true slot_uri: prov:wasDerivedFrom From 31f7cbbc8aab782bf5085a74123e626d76db2466 Mon Sep 17 00:00:00 2001 From: Charles Tapley Hoyt Date: Sun, 24 May 2026 15:06:16 +0200 Subject: [PATCH 06/29] Remove recommendation to use MSI in description --- src/sssom_schema/schema/sssom_schema.yaml | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/sssom_schema/schema/sssom_schema.yaml b/src/sssom_schema/schema/sssom_schema.yaml index e25bca79..4b42cc65 100644 --- a/src/sssom_schema/schema/sssom_schema.yaml +++ b/src/sssom_schema/schema/sssom_schema.yaml @@ -1146,9 +1146,8 @@ slots: - https://github.com/mapping-commons/sssom/blob/master/examples/schema/issue_tracker.sssom.tsv derived_from: description: - A set of [mapping sameness identifiers - (MSIs)](https://github.com/ts4nfdi/mapping-sameness-identifier) for - mappings that were used to derive this mapping, e.g., through mapping + A set of CURIEs referring to mappings (i.e., subject-predicate-object + triples) that were used to derive this mapping, e.g., through mapping chaining or inversion, represented as CURIEs. range: EntityReference multivalued: true @@ -1165,18 +1164,21 @@ slots: - value: mapping:36a1f9244ea7641a90987c82f33c25c0c13712ee8f48207b2a0825f8a4e4e26a description: A single value can be used when inverting the mapping - mesh:C000089-skos:exactMatch-CHEBI:28646, whose mapping sameness - identifier is - 36a1f9244ea7641a90987c82f33c25c0c13712ee8f48207b2a0825f8a4e4e26a, to + mesh:C000089-skos:exactMatch-CHEBI:28646, represented with the + [mapping sameness identifier + (MSI)](https://github.com/ts4nfdi/mapping-sameness-identifier) for is + `36a1f9244ea7641a90987c82f33c25c0c13712ee8f48207b2a0825f8a4e4e26a`, to get mapping CHEBI:28646-skos:exactMatch-mesh:C000089 - value: mapping:36a1f9244ea7641a90987c82f33c25c0c13712ee8f48207b2a0825f8a4e4e26a|mapping:bb768f0b1e1643298f4df1a381001f6ed68fcc8fff49b371f0235b51dbab9e1e description: The mappings mesh:C000089-skos:exactMatch-CHEBI:28646 and - CHEBI:28646-skos:exactMatch-cas:645-92-1 (whose mapping sameness - identifiers are respectively - mapping:36a1f9244ea7641a90987c82f33c25c0c13712ee8f48207b2a0825f8a4e4e26a + CHEBI:28646-skos:exactMatch-cas:645-92-1, whose [mapping sameness + identifiers + (MSIs)](https://github.com/ts4nfdi/mapping-sameness-identifier) are + respectively + `mapping:36a1f9244ea7641a90987c82f33c25c0c13712ee8f48207b2a0825f8a4e4e26a` and - mapping:bb768f0b1e1643298f4df1a381001f6ed68fcc8fff49b371f0235b51dbab9e1e) + `mapping:bb768f0b1e1643298f4df1a381001f6ed68fcc8fff49b371f0235b51dbab9e1e`, can be used to infer mesh:C000089-skos:exactMatch-cas:645-92-1. see_also: description: From 0b7adbf0958a057dd212183d8ebbf6275979aabf Mon Sep 17 00:00:00 2001 From: Charles Tapley Hoyt Date: Sun, 24 May 2026 15:09:18 +0200 Subject: [PATCH 07/29] Update sssom_schema.yaml --- src/sssom_schema/schema/sssom_schema.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/sssom_schema/schema/sssom_schema.yaml b/src/sssom_schema/schema/sssom_schema.yaml index 4b42cc65..481da9b8 100644 --- a/src/sssom_schema/schema/sssom_schema.yaml +++ b/src/sssom_schema/schema/sssom_schema.yaml @@ -1146,9 +1146,10 @@ slots: - https://github.com/mapping-commons/sssom/blob/master/examples/schema/issue_tracker.sssom.tsv derived_from: description: - A set of CURIEs referring to mappings (i.e., subject-predicate-object - triples) that were used to derive this mapping, e.g., through mapping - chaining or inversion, represented as CURIEs. + A set of CURIEs referring to mappings (i.e., + subject-predicate-object-predicate-modifier quadruple) that were used to + derive this mapping, e.g., through mapping chaining or inversion, + represented as CURIEs. range: EntityReference multivalued: true slot_uri: prov:wasDerivedFrom From 33795caa95cf5877f9c6b648713724827682f95f Mon Sep 17 00:00:00 2001 From: Charles Tapley Hoyt Date: Sun, 24 May 2026 15:10:18 +0200 Subject: [PATCH 08/29] Update inference.md --- src/docs/inference.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/docs/inference.md b/src/docs/inference.md index 0c97b2be..3f184b10 100644 --- a/src/docs/inference.md +++ b/src/docs/inference.md @@ -36,8 +36,8 @@ be referenced in the `derived_from` field when doing both mapping chaining ``` | subject_id | subject_label | predicate_id | object_id | object_label | mapping_justification | derived_from | comment | -| ------------ | ------------- | --------------- | ------------ | ------------ | ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| ------------ | ------------- | --------------- | ------------ | ------------ | ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |-------------------------------------------------------------------------------------------------------| | mesh:C000089 | ammeline | skos:exactMatch | CHEBI:28646 | ammeline | semapv:ManualMappingCuration | | | | CHEBI:28646 | ammeline | skos:exactMatch | cas:645-92-1 | Ammeline | semapv:ManualMappingCuration | | | -| mesh:C000089 | ammeline | skos:exactMatch | cas:645-92-1 | Ammeline | semapv:MappingChaining | mapping:36a1f9244ea7641a90987c82f33c25c0c13712ee8f48207b2a0825f8a4e4e26a\|mapping:bb768f0b1e1643298f4df1a381001f6ed68fcc8fff49b371f0235b51dbab9e1e | this example needs to refer to the firs two mappings in this table by mapping sameness identifier | +| mesh:C000089 | ammeline | skos:exactMatch | cas:645-92-1 | Ammeline | semapv:MappingChaining | mapping:36a1f9244ea7641a90987c82f33c25c0c13712ee8f48207b2a0825f8a4e4e26a\|mapping:bb768f0b1e1643298f4df1a381001f6ed68fcc8fff49b371f0235b51dbab9e1e | this example needs to refer to the first two mappings in this table by mapping sameness identifier | | CHEBI:28646 | ammeline | skos:exactMatch | mesh:C000089 | Ammeline | semapv:MappingInversion | mapping:36a1f9244ea7641a90987c82f33c25c0c13712ee8f48207b2a0825f8a4e4e26a | this example just needs to refer to the first mappingin this table by the mapping sameness identifier | From cb34aeb7c2523b139de2091aea219795eb3b9f31 Mon Sep 17 00:00:00 2001 From: Charles Tapley Hoyt Date: Sun, 24 May 2026 15:12:31 +0200 Subject: [PATCH 09/29] Use example.org dummy URI --- examples/schema/derived_from.sssom.tsv | 2 +- src/docs/inference.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/schema/derived_from.sssom.tsv b/examples/schema/derived_from.sssom.tsv index f5284ed4..e45610c8 100644 --- a/examples/schema/derived_from.sssom.tsv +++ b/examples/schema/derived_from.sssom.tsv @@ -5,7 +5,7 @@ # orcid: https://orcid.org/ # semapv: https://w3id.org/semapv/vocab/ # skos: http://www.w3.org/2004/02/skos/core# -# mapping: http://w3id.org/mapping/ +# mapping: https://example.com/mapping/ # license: https://creativecommons.org/publicdomain/zero/1.0/ # mapping_set_id: https://github.com/mapping-commons/sssom/blob/master/examples/schema/derived_from.sssom.tsv # creator_id: diff --git a/src/docs/inference.md b/src/docs/inference.md index 3f184b10..ac374fce 100644 --- a/src/docs/inference.md +++ b/src/docs/inference.md @@ -28,7 +28,7 @@ be referenced in the `derived_from` field when doing both mapping chaining # orcid: https://orcid.org/ # semapv: https://w3id.org/semapv/vocab/ # skos: http://www.w3.org/2004/02/skos/core# -# mapping: http://w3id.org/mapping/ +# mapping: https://example.com/mapping/ # license: https://creativecommons.org/publicdomain/zero/1.0/ # mapping_set_id: https://github.com/mapping-commons/sssom/blob/master/examples/schema/derived_from.sssom.tsv # creator_id: From 9fb8dcbd308ba8d5fb67a998c80561f54325d1df Mon Sep 17 00:00:00 2001 From: Charles Tapley Hoyt Date: Sun, 24 May 2026 15:15:54 +0200 Subject: [PATCH 10/29] Update inference.md --- src/docs/inference.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/docs/inference.md b/src/docs/inference.md index ac374fce..fd5a499b 100644 --- a/src/docs/inference.md +++ b/src/docs/inference.md @@ -13,12 +13,16 @@ There are several mechanisms for inference: The `derived_from` field was introduced in [#537](https://github.com/mapping-commons/sssom/issues/537) in order to -reference the original subject-predicate-object triple from which new mappings -are inferred/derived. +reference the original subject-predicate-object-predicate modifier quadruple +from which new mappings are inferred/derived. -The following table demonstrates how the mapping sameness identifier (MSI) can -be referenced in the `derived_from` field when doing both mapping chaining -(i.e., using multiple mappings to infer a new one) and mapping inversion. +The following example demonstrates how the `derived_from` field when doing both +mapping chaining (i.e., using multiple mappings to infer a new one) and mapping +inversion. The local unique identifiers used for mappings in this example are +related to the proposal in +https://github.com/ts4nfdi/mapping-sameness-identifier (which currently is under +finalization). For now, the SSSOM specification isn't currently prescribing how +to assign CURIEs to mapping quads. ``` # curie_map: @@ -36,7 +40,7 @@ be referenced in the `derived_from` field when doing both mapping chaining ``` | subject_id | subject_label | predicate_id | object_id | object_label | mapping_justification | derived_from | comment | -| ------------ | ------------- | --------------- | ------------ | ------------ | ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |-------------------------------------------------------------------------------------------------------| +| ------------ | ------------- | --------------- | ------------ | ------------ | ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | | mesh:C000089 | ammeline | skos:exactMatch | CHEBI:28646 | ammeline | semapv:ManualMappingCuration | | | | CHEBI:28646 | ammeline | skos:exactMatch | cas:645-92-1 | Ammeline | semapv:ManualMappingCuration | | | | mesh:C000089 | ammeline | skos:exactMatch | cas:645-92-1 | Ammeline | semapv:MappingChaining | mapping:36a1f9244ea7641a90987c82f33c25c0c13712ee8f48207b2a0825f8a4e4e26a\|mapping:bb768f0b1e1643298f4df1a381001f6ed68fcc8fff49b371f0235b51dbab9e1e | this example needs to refer to the first two mappings in this table by mapping sameness identifier | From 5ef24ecb9dedc0c54af7087bec5618826c40fd0c Mon Sep 17 00:00:00 2001 From: Charles Tapley Hoyt Date: Mon, 25 May 2026 00:10:22 +0200 Subject: [PATCH 11/29] Update sssom_schema.yaml --- src/sssom_schema/schema/sssom_schema.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sssom_schema/schema/sssom_schema.yaml b/src/sssom_schema/schema/sssom_schema.yaml index 481da9b8..53adc31c 100644 --- a/src/sssom_schema/schema/sssom_schema.yaml +++ b/src/sssom_schema/schema/sssom_schema.yaml @@ -1146,7 +1146,7 @@ slots: - https://github.com/mapping-commons/sssom/blob/master/examples/schema/issue_tracker.sssom.tsv derived_from: description: - A set of CURIEs referring to mappings (i.e., + A set of identifiers referring to mappings (i.e., subject-predicate-object-predicate-modifier quadruple) that were used to derive this mapping, e.g., through mapping chaining or inversion, represented as CURIEs. From 780e1061961047002e9bd7507dbf3048d998b8aa Mon Sep 17 00:00:00 2001 From: Charles Tapley Hoyt Date: Mon, 25 May 2026 19:29:40 +0200 Subject: [PATCH 12/29] Update src/docs/inference.md Co-authored-by: Nico Matentzoglu --- src/docs/inference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docs/inference.md b/src/docs/inference.md index fd5a499b..b8a9cf7a 100644 --- a/src/docs/inference.md +++ b/src/docs/inference.md @@ -16,7 +16,7 @@ The `derived_from` field was introduced in reference the original subject-predicate-object-predicate modifier quadruple from which new mappings are inferred/derived. -The following example demonstrates how the `derived_from` field when doing both +The following example demonstrates how the `derived_from` field can be leveraged when doing both mapping chaining (i.e., using multiple mappings to infer a new one) and mapping inversion. The local unique identifiers used for mappings in this example are related to the proposal in From c0130aed3d09162998808fe2cf6c6afb7a0146a9 Mon Sep 17 00:00:00 2001 From: Charles Tapley Hoyt Date: Mon, 25 May 2026 19:29:54 +0200 Subject: [PATCH 13/29] Update src/docs/inference.md Co-authored-by: Nico Matentzoglu --- src/docs/inference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docs/inference.md b/src/docs/inference.md index b8a9cf7a..f0283e16 100644 --- a/src/docs/inference.md +++ b/src/docs/inference.md @@ -44,4 +44,4 @@ to assign CURIEs to mapping quads. | mesh:C000089 | ammeline | skos:exactMatch | CHEBI:28646 | ammeline | semapv:ManualMappingCuration | | | | CHEBI:28646 | ammeline | skos:exactMatch | cas:645-92-1 | Ammeline | semapv:ManualMappingCuration | | | | mesh:C000089 | ammeline | skos:exactMatch | cas:645-92-1 | Ammeline | semapv:MappingChaining | mapping:36a1f9244ea7641a90987c82f33c25c0c13712ee8f48207b2a0825f8a4e4e26a\|mapping:bb768f0b1e1643298f4df1a381001f6ed68fcc8fff49b371f0235b51dbab9e1e | this example needs to refer to the first two mappings in this table by mapping sameness identifier | -| CHEBI:28646 | ammeline | skos:exactMatch | mesh:C000089 | Ammeline | semapv:MappingInversion | mapping:36a1f9244ea7641a90987c82f33c25c0c13712ee8f48207b2a0825f8a4e4e26a | this example just needs to refer to the first mappingin this table by the mapping sameness identifier | +| CHEBI:28646 | ammeline | skos:exactMatch | mesh:C000089 | Ammeline | semapv:MappingInversion | mapping:36a1f9244ea7641a90987c82f33c25c0c13712ee8f48207b2a0825f8a4e4e26a | this example just needs to refer to the first mapping in this table by the mapping sameness identifier | From c9337bf14f2d610bb29e47ed7a862db6f8510467 Mon Sep 17 00:00:00 2001 From: Charles Tapley Hoyt Date: Mon, 25 May 2026 19:30:07 +0200 Subject: [PATCH 14/29] Update src/sssom_schema/schema/sssom_schema.yaml Co-authored-by: Nico Matentzoglu --- src/sssom_schema/schema/sssom_schema.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sssom_schema/schema/sssom_schema.yaml b/src/sssom_schema/schema/sssom_schema.yaml index 53adc31c..4b23372c 100644 --- a/src/sssom_schema/schema/sssom_schema.yaml +++ b/src/sssom_schema/schema/sssom_schema.yaml @@ -1167,7 +1167,7 @@ slots: A single value can be used when inverting the mapping mesh:C000089-skos:exactMatch-CHEBI:28646, represented with the [mapping sameness identifier - (MSI)](https://github.com/ts4nfdi/mapping-sameness-identifier) for is + (MSI)](https://github.com/ts4nfdi/mapping-sameness-identifier) `36a1f9244ea7641a90987c82f33c25c0c13712ee8f48207b2a0825f8a4e4e26a`, to get mapping CHEBI:28646-skos:exactMatch-mesh:C000089 - value: mapping:36a1f9244ea7641a90987c82f33c25c0c13712ee8f48207b2a0825f8a4e4e26a|mapping:bb768f0b1e1643298f4df1a381001f6ed68fcc8fff49b371f0235b51dbab9e1e From 632a43595cd621de5ae730948f417404f435cc3e Mon Sep 17 00:00:00 2001 From: Charles Tapley Hoyt Date: Mon, 25 May 2026 19:30:17 +0200 Subject: [PATCH 15/29] Update src/docs/inference.md Co-authored-by: Nico Matentzoglu --- src/docs/inference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docs/inference.md b/src/docs/inference.md index f0283e16..e423df40 100644 --- a/src/docs/inference.md +++ b/src/docs/inference.md @@ -21,7 +21,7 @@ mapping chaining (i.e., using multiple mappings to infer a new one) and mapping inversion. The local unique identifiers used for mappings in this example are related to the proposal in https://github.com/ts4nfdi/mapping-sameness-identifier (which currently is under -finalization). For now, the SSSOM specification isn't currently prescribing how +review). For now, the SSSOM specification isn't currently prescribing how to assign CURIEs to mapping quads. ``` From 0d86489e894fc46760d0fc0b419dd70a050f80a0 Mon Sep 17 00:00:00 2001 From: Charles Tapley Hoyt Date: Tue, 26 May 2026 10:40:35 +0200 Subject: [PATCH 16/29] Update inference.md --- src/docs/inference.md | 112 +++++++++++++++++++++++++++++++++++++----- 1 file changed, 100 insertions(+), 12 deletions(-) diff --git a/src/docs/inference.md b/src/docs/inference.md index e423df40..80183924 100644 --- a/src/docs/inference.md +++ b/src/docs/inference.md @@ -9,6 +9,29 @@ There are several mechanisms for inference: - Inference via prior knowledge, which should be tagged with `semapv:BackgroundKnowledgeBasedMatching` as a justification +## Background on Mapping Triples, Quadruples, and Records + +This section provides a brief background on different ways of referencing a +mapping appearing in SSSOM. + +A mapping triple has a subject, predicate, and object as in (`mesh:C000089`, +`skos:exactMatch`, `CHEBI:28646`). A mapping triple does not clarify the +judgment on whether a triple is true or false, nor how the mapping was created. + +A mapping quadruple has a subject, predicate, object, and predicate modifier. +The addition of the predicate modifier allows a mapping quadruple to explicitly +denote the judgment on whether a triple is true or false. For example, +(`mesh:C000089`, `skos:exactMatch`, `CHEBI:28646`, True) explicitly represents +that the above subject, predicate, object triple is true, while (`CHEBI:10057`, +`skos:exactMatch`, `mesh:C002563`, False) is false because `CHEBI:10057` refers +to 9H-xanthene, a small molecule, and `mesh:C002563` refers to xanthan gum, a +polysaccharide. + +A mapping record refers to the subject, predicate, object, predicate modifier, +and all other fields in the SSSOM data model (except where otherwise stated in +["Hashing a SSSOM mapping record"](spec-support-hashing.md), such as the +`record_id`). + ## Referring to Evidence The `derived_from` field was introduced in @@ -16,13 +39,20 @@ The `derived_from` field was introduced in reference the original subject-predicate-object-predicate modifier quadruple from which new mappings are inferred/derived. -The following example demonstrates how the `derived_from` field can be leveraged when doing both -mapping chaining (i.e., using multiple mappings to infer a new one) and mapping -inversion. The local unique identifiers used for mappings in this example are -related to the proposal in -https://github.com/ts4nfdi/mapping-sameness-identifier (which currently is under -review). For now, the SSSOM specification isn't currently prescribing how -to assign CURIEs to mapping quads. +The following example demonstrates how the `derived_from` field can be leveraged +in two scenarios: + +1. mapping chaining. the table contains a SKOS exact match from `mesh:C000089` + to `CHEBI:28646` and from `CHEBI:28646` to `cas:645-92-1`. The third row of + the table contains a SKOS exact match from `mesh:C000089` to `cas:645-92-1` + produced through mapping chaining. The `derived_from` column in this row + contains CURIEs referring to the + `mesh:C000089`-`skos:exactMatch`-`CHEBI:28646` and + `CHEBI:28646`-`skos:exactMatch`-`cas:645-92-1` concatenated with a pipe +2. mapping inversion. the fourth row of the table contains a SKOS exact match + from `CHEBI:28646` to `mesh:C000089` produced through mapping inversion of + the first row of the table. The `derived_from` column in this row contains + the CURIE referring to the `mesh:C000089`-`skos:exactMatch`-`CHEBI:28646` ``` # curie_map: @@ -39,9 +69,67 @@ to assign CURIEs to mapping quads. # - orcid:0000-0003-4423-4370 ``` -| subject_id | subject_label | predicate_id | object_id | object_label | mapping_justification | derived_from | comment | -| ------------ | ------------- | --------------- | ------------ | ------------ | ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | -| mesh:C000089 | ammeline | skos:exactMatch | CHEBI:28646 | ammeline | semapv:ManualMappingCuration | | | -| CHEBI:28646 | ammeline | skos:exactMatch | cas:645-92-1 | Ammeline | semapv:ManualMappingCuration | | | -| mesh:C000089 | ammeline | skos:exactMatch | cas:645-92-1 | Ammeline | semapv:MappingChaining | mapping:36a1f9244ea7641a90987c82f33c25c0c13712ee8f48207b2a0825f8a4e4e26a\|mapping:bb768f0b1e1643298f4df1a381001f6ed68fcc8fff49b371f0235b51dbab9e1e | this example needs to refer to the first two mappings in this table by mapping sameness identifier | +| subject_id | subject_label | predicate_id | object_id | object_label | mapping_justification | derived_from | comment | +| ------------ | ------------- | --------------- | ------------ | ------------ | ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | +| mesh:C000089 | ammeline | skos:exactMatch | CHEBI:28646 | ammeline | semapv:ManualMappingCuration | | | +| CHEBI:28646 | ammeline | skos:exactMatch | cas:645-92-1 | Ammeline | semapv:ManualMappingCuration | | | +| mesh:C000089 | ammeline | skos:exactMatch | cas:645-92-1 | Ammeline | semapv:MappingChaining | mapping:36a1f9244ea7641a90987c82f33c25c0c13712ee8f48207b2a0825f8a4e4e26a\|mapping:bb768f0b1e1643298f4df1a381001f6ed68fcc8fff49b371f0235b51dbab9e1e | this example needs to refer to the first two mappings in this table by mapping sameness identifier | | CHEBI:28646 | ammeline | skos:exactMatch | mesh:C000089 | Ammeline | semapv:MappingInversion | mapping:36a1f9244ea7641a90987c82f33c25c0c13712ee8f48207b2a0825f8a4e4e26a | this example just needs to refer to the first mapping in this table by the mapping sameness identifier | + +For the purposes of inference, the mapping quadruple should be used: + +1. Mapping triples are insufficient: without the judgment of whether a mapping + is true or false, then an algorithm could accidentally conclude from + `A skos:exactMatch B` and `B (not) skos:exactMatch C` that + `A skos:exactMatch C`. This is why mapping triples are insufficient +2. Full mapping records are inflexible: the SSSOM data should be flexible so if + additional evidence (i.e., records) for a given mapping quadruple are found, + then the confidence in the inferred/derived mapping (e.g., chained or + inverted)can be adjusted accordingly. This is possible because most chaining + and inversion algorithms logically operate on mapping quadruples, and not on + records. + +Note: the local unique identifiers used for mappings in this example are related +to the proposal in https://github.com/ts4nfdi/mapping-sameness-identifier (which +currently is under review). For now, the SSSOM specification isn't currently +prescribing how to assign CURIEs to mapping quads. + +### Example with Negative Mappings + +The following example uses mapping chaining combine with negated mappings to +infer a non-trivial negative mapping. This illustrates why mapping quadruples +(i.e., subject-predicate-modifier-object) are required over mapping triples +(i.e., subject-predicate-object). + +``` +# curie_map: +# cas: https://commonchemistry.cas.org/detail?cas_rn= +# CHEBI: http://purl.obolibrary.org/obo/CHEBI_ +# mesh: http://id.nlm.nih.gov/mesh/ +# orcid: https://orcid.org/ +# semapv: https://w3id.org/semapv/vocab/ +# skos: http://www.w3.org/2004/02/skos/core# +# mapping: https://example.com/mapping/ +# license: https://creativecommons.org/publicdomain/zero/1.0/ +# creator_id: +# - orcid:0000-0003-4423-4370 +``` + +| subject_id | subject_label | predicate_id | predicate_modifier | object_id | +object_label | mapping_justification | derived_from | comment | | ----------- | +------------- | --------------- | ------------------ | ------------ | +------------ | ---------------------------- | +------------------------------------------------------------------------- | +------------------------------------------------------------------------ | + +--- + +| | CHEBI:10057 | 9H-xanthene | skos:exactMatch | Not | mesh:C002563 | xanthan +gum | semapv:ManualMappingCuration | | | | CAS:92-83-1 | Xanthene | +skos:exactMatch | | CHEBI:10057 | 9H-xanthene | semapv:ManualMappingCuration | | +| | CAS:92-83-1 | Xanthene | skos:exactMatch | Not | mesh:C002563 | xanthan gum +| semapv:MappingChaining | mapping: +58f24ccfaf71431276da873c9e7b77ea61a2425e4e8b283b943542290deb292b~ | mapping: +bb1162fb2afb1c519c0aa8be98c352061720af220e2d052c571a1fecabff9800 | this example +uses the first two mappings in the table, imporantly, incorporating the negative +modifier in the identifiers | From 4a2fa7829b6f42034fe88383788f0a7ba7ed0f25 Mon Sep 17 00:00:00 2001 From: Charles Tapley Hoyt Date: Tue, 26 May 2026 10:42:15 +0200 Subject: [PATCH 17/29] Update sssom_schema.yaml --- src/sssom_schema/schema/sssom_schema.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sssom_schema/schema/sssom_schema.yaml b/src/sssom_schema/schema/sssom_schema.yaml index 4b23372c..fe49f9c2 100644 --- a/src/sssom_schema/schema/sssom_schema.yaml +++ b/src/sssom_schema/schema/sssom_schema.yaml @@ -1147,7 +1147,7 @@ slots: derived_from: description: A set of identifiers referring to mappings (i.e., - subject-predicate-object-predicate-modifier quadruple) that were used to + subject-predicate-object-predicate modifier quadruple) that were used to derive this mapping, e.g., through mapping chaining or inversion, represented as CURIEs. range: EntityReference From f039c5099c5f4716747dcd1bae51ff01d0d6db09 Mon Sep 17 00:00:00 2001 From: Charles Tapley Hoyt Date: Tue, 26 May 2026 10:47:01 +0200 Subject: [PATCH 18/29] Update inference.md --- src/docs/inference.md | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/src/docs/inference.md b/src/docs/inference.md index 80183924..ef66ba44 100644 --- a/src/docs/inference.md +++ b/src/docs/inference.md @@ -70,7 +70,7 @@ in two scenarios: ``` | subject_id | subject_label | predicate_id | object_id | object_label | mapping_justification | derived_from | comment | -| ------------ | ------------- | --------------- | ------------ | ------------ | ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | +|--------------|---------------|-----------------|--------------|--------------|------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------| | mesh:C000089 | ammeline | skos:exactMatch | CHEBI:28646 | ammeline | semapv:ManualMappingCuration | | | | CHEBI:28646 | ammeline | skos:exactMatch | cas:645-92-1 | Ammeline | semapv:ManualMappingCuration | | | | mesh:C000089 | ammeline | skos:exactMatch | cas:645-92-1 | Ammeline | semapv:MappingChaining | mapping:36a1f9244ea7641a90987c82f33c25c0c13712ee8f48207b2a0825f8a4e4e26a\|mapping:bb768f0b1e1643298f4df1a381001f6ed68fcc8fff49b371f0235b51dbab9e1e | this example needs to refer to the first two mappings in this table by mapping sameness identifier | @@ -115,21 +115,8 @@ infer a non-trivial negative mapping. This illustrates why mapping quadruples # - orcid:0000-0003-4423-4370 ``` -| subject_id | subject_label | predicate_id | predicate_modifier | object_id | -object_label | mapping_justification | derived_from | comment | | ----------- | -------------- | --------------- | ------------------ | ------------ | ------------- | ---------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------- | - ---- - -| | CHEBI:10057 | 9H-xanthene | skos:exactMatch | Not | mesh:C002563 | xanthan -gum | semapv:ManualMappingCuration | | | | CAS:92-83-1 | Xanthene | -skos:exactMatch | | CHEBI:10057 | 9H-xanthene | semapv:ManualMappingCuration | | -| | CAS:92-83-1 | Xanthene | skos:exactMatch | Not | mesh:C002563 | xanthan gum -| semapv:MappingChaining | mapping: -58f24ccfaf71431276da873c9e7b77ea61a2425e4e8b283b943542290deb292b~ | mapping: -bb1162fb2afb1c519c0aa8be98c352061720af220e2d052c571a1fecabff9800 | this example -uses the first two mappings in the table, imporantly, incorporating the negative -modifier in the identifiers | +| subject_id | subject_label | predicate_id | predicate_modifier | object_id | object_label | mapping_justification | derived_from | comment | +|-------------|---------------|-----------------|--------------------|--------------|--------------|------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------| +| CHEBI:10057 | 9H-xanthene | skos:exactMatch | Not | mesh:C002563 | xanthan gum | semapv:ManualMappingCuration | | | +| CAS:92-83-1 | Xanthane | skos:exactMatch | | CHEBI:10057 | 9H-xanthene | semapv:ManualMappingCuration | | | +| CAS:92-83-1 | Xanthene | skos:exactMatch | Not | mesh:C002563 | xanthan gum | semapv:MappingChaining | mapping:58f24ccfaf71431276da873c9e7b77ea61a2425e4e8b283b943542290deb292b~\|mapping:bb1162fb2afb1c519c0aa8be98c352061720af220e2d052c571a1fecabff9800 | this example uses the first two mappings in the table, imporantly, incorporating the negative modifier in the identifiers | From 7093151843e693c3c88e4268792701b84ff65b91 Mon Sep 17 00:00:00 2001 From: Charles Tapley Hoyt Date: Tue, 26 May 2026 10:47:09 +0200 Subject: [PATCH 19/29] Update inference.md --- src/docs/inference.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/docs/inference.md b/src/docs/inference.md index ef66ba44..d80a05ed 100644 --- a/src/docs/inference.md +++ b/src/docs/inference.md @@ -70,7 +70,7 @@ in two scenarios: ``` | subject_id | subject_label | predicate_id | object_id | object_label | mapping_justification | derived_from | comment | -|--------------|---------------|-----------------|--------------|--------------|------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------| +| ------------ | ------------- | --------------- | ------------ | ------------ | ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | | mesh:C000089 | ammeline | skos:exactMatch | CHEBI:28646 | ammeline | semapv:ManualMappingCuration | | | | CHEBI:28646 | ammeline | skos:exactMatch | cas:645-92-1 | Ammeline | semapv:ManualMappingCuration | | | | mesh:C000089 | ammeline | skos:exactMatch | cas:645-92-1 | Ammeline | semapv:MappingChaining | mapping:36a1f9244ea7641a90987c82f33c25c0c13712ee8f48207b2a0825f8a4e4e26a\|mapping:bb768f0b1e1643298f4df1a381001f6ed68fcc8fff49b371f0235b51dbab9e1e | this example needs to refer to the first two mappings in this table by mapping sameness identifier | @@ -116,7 +116,7 @@ infer a non-trivial negative mapping. This illustrates why mapping quadruples ``` | subject_id | subject_label | predicate_id | predicate_modifier | object_id | object_label | mapping_justification | derived_from | comment | -|-------------|---------------|-----------------|--------------------|--------------|--------------|------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------| +| ----------- | ------------- | --------------- | ------------------ | ------------ | ------------ | ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | | CHEBI:10057 | 9H-xanthene | skos:exactMatch | Not | mesh:C002563 | xanthan gum | semapv:ManualMappingCuration | | | | CAS:92-83-1 | Xanthane | skos:exactMatch | | CHEBI:10057 | 9H-xanthene | semapv:ManualMappingCuration | | | | CAS:92-83-1 | Xanthene | skos:exactMatch | Not | mesh:C002563 | xanthan gum | semapv:MappingChaining | mapping:58f24ccfaf71431276da873c9e7b77ea61a2425e4e8b283b943542290deb292b~\|mapping:bb1162fb2afb1c519c0aa8be98c352061720af220e2d052c571a1fecabff9800 | this example uses the first two mappings in the table, imporantly, incorporating the negative modifier in the identifiers | From 91402478de935041a756cf134365e9783f182e4d Mon Sep 17 00:00:00 2001 From: Charles Tapley Hoyt Date: Tue, 26 May 2026 10:49:44 +0200 Subject: [PATCH 20/29] Update inference.md --- src/docs/inference.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/docs/inference.md b/src/docs/inference.md index d80a05ed..b56dd079 100644 --- a/src/docs/inference.md +++ b/src/docs/inference.md @@ -115,8 +115,8 @@ infer a non-trivial negative mapping. This illustrates why mapping quadruples # - orcid:0000-0003-4423-4370 ``` -| subject_id | subject_label | predicate_id | predicate_modifier | object_id | object_label | mapping_justification | derived_from | comment | -| ----------- | ------------- | --------------- | ------------------ | ------------ | ------------ | ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | -| CHEBI:10057 | 9H-xanthene | skos:exactMatch | Not | mesh:C002563 | xanthan gum | semapv:ManualMappingCuration | | | -| CAS:92-83-1 | Xanthane | skos:exactMatch | | CHEBI:10057 | 9H-xanthene | semapv:ManualMappingCuration | | | -| CAS:92-83-1 | Xanthene | skos:exactMatch | Not | mesh:C002563 | xanthan gum | semapv:MappingChaining | mapping:58f24ccfaf71431276da873c9e7b77ea61a2425e4e8b283b943542290deb292b~\|mapping:bb1162fb2afb1c519c0aa8be98c352061720af220e2d052c571a1fecabff9800 | this example uses the first two mappings in the table, imporantly, incorporating the negative modifier in the identifiers | +| subject_id | subject_label | predicate_id | predicate_modifier | object_id | object_label | mapping_justification | derived_from | comment | +| ----------- | ------------- | --------------- | ------------------ | ------------ | ------------ | ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| CHEBI:10057 | 9H-xanthene | skos:exactMatch | Not | mesh:C002563 | xanthan gum | semapv:ManualMappingCuration | | | +| CAS:92-83-1 | Xanthane | skos:exactMatch | | CHEBI:10057 | 9H-xanthene | semapv:ManualMappingCuration | | | +| CAS:92-83-1 | Xanthene | skos:exactMatch | Not | mesh:C002563 | xanthan gum | semapv:MappingChaining | mapping:58f24ccfaf71431276da873c9e7b77ea61a2425e4e8b283b943542290deb292b~\|mapping:bb1162fb2afb1c519c0aa8be98c352061720af220e2d052c571a1fecabff9800 | this example uses the first two mappings in the table, importantly, incorporating the negative modifier in the identifiers | From b91b8ec8756c9a1c8570657d4833f170fed7692e Mon Sep 17 00:00:00 2001 From: Charles Tapley Hoyt Date: Tue, 26 May 2026 11:06:19 +0200 Subject: [PATCH 21/29] Update inference.md --- src/docs/inference.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/docs/inference.md b/src/docs/inference.md index b56dd079..9e76d801 100644 --- a/src/docs/inference.md +++ b/src/docs/inference.md @@ -25,7 +25,8 @@ denote the judgment on whether a triple is true or false. For example, that the above subject, predicate, object triple is true, while (`CHEBI:10057`, `skos:exactMatch`, `mesh:C002563`, False) is false because `CHEBI:10057` refers to 9H-xanthene, a small molecule, and `mesh:C002563` refers to xanthan gum, a -polysaccharide. +polysaccharide. By convention, mapping triples are implicitly considered to +refer to the "true" mapping quadruple. A mapping record refers to the subject, predicate, object, predicate modifier, and all other fields in the SSSOM data model (except where otherwise stated in @@ -47,12 +48,14 @@ in two scenarios: the table contains a SKOS exact match from `mesh:C000089` to `cas:645-92-1` produced through mapping chaining. The `derived_from` column in this row contains CURIEs referring to the - `mesh:C000089`-`skos:exactMatch`-`CHEBI:28646` and - `CHEBI:28646`-`skos:exactMatch`-`cas:645-92-1` concatenated with a pipe + `mesh:C000089`-`skos:exactMatch`-`CHEBI:28646`-True and + `CHEBI:28646`-`skos:exactMatch`-`cas:645-92-1`-True mapping quadruples, + concatenated with a pipe 2. mapping inversion. the fourth row of the table contains a SKOS exact match from `CHEBI:28646` to `mesh:C000089` produced through mapping inversion of the first row of the table. The `derived_from` column in this row contains - the CURIE referring to the `mesh:C000089`-`skos:exactMatch`-`CHEBI:28646` + the CURIE referring to the + `mesh:C000089`-`skos:exactMatch`-`CHEBI:28646`-True quad. ``` # curie_map: From ece15356575b351a8a3d75864f50c4be0a6386bb Mon Sep 17 00:00:00 2001 From: Charles Tapley Hoyt Date: Tue, 26 May 2026 11:53:41 +0200 Subject: [PATCH 22/29] Updates based on Damien's comments --- src/docs/inference.md | 4 ++-- src/sssom_schema/schema/sssom_schema.yaml | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/docs/inference.md b/src/docs/inference.md index 9e76d801..83e97f74 100644 --- a/src/docs/inference.md +++ b/src/docs/inference.md @@ -94,8 +94,8 @@ For the purposes of inference, the mapping quadruple should be used: Note: the local unique identifiers used for mappings in this example are related to the proposal in https://github.com/ts4nfdi/mapping-sameness-identifier (which -currently is under review). For now, the SSSOM specification isn't currently -prescribing how to assign CURIEs to mapping quads. +currently is under review). For now, the SSSOM specification isn't prescribing +how to assign identifiers to mapping quadruples. ### Example with Negative Mappings diff --git a/src/sssom_schema/schema/sssom_schema.yaml b/src/sssom_schema/schema/sssom_schema.yaml index fe49f9c2..d1949e37 100644 --- a/src/sssom_schema/schema/sssom_schema.yaml +++ b/src/sssom_schema/schema/sssom_schema.yaml @@ -1148,8 +1148,7 @@ slots: description: A set of identifiers referring to mappings (i.e., subject-predicate-object-predicate modifier quadruple) that were used to - derive this mapping, e.g., through mapping chaining or inversion, - represented as CURIEs. + derive this mapping, e.g., through mapping chaining or inversion. range: EntityReference multivalued: true slot_uri: prov:wasDerivedFrom From 2d9a45f1761f901dd2aa70946e1d466c8405dac4 Mon Sep 17 00:00:00 2001 From: Charles Tapley Hoyt Date: Tue, 26 May 2026 15:12:32 +0200 Subject: [PATCH 23/29] Update src/docs/inference.md Co-authored-by: Nico Matentzoglu --- src/docs/inference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docs/inference.md b/src/docs/inference.md index 83e97f74..60e7cc3a 100644 --- a/src/docs/inference.md +++ b/src/docs/inference.md @@ -101,7 +101,7 @@ how to assign identifiers to mapping quadruples. The following example uses mapping chaining combine with negated mappings to infer a non-trivial negative mapping. This illustrates why mapping quadruples -(i.e., subject-predicate-modifier-object) are required over mapping triples +(i.e., subject-predicate-object-predicate modifier) are required over mapping triples (i.e., subject-predicate-object). ``` From a28d899d8f0076eb58b8d845700ecee8c4068e20 Mon Sep 17 00:00:00 2001 From: Charles Tapley Hoyt Date: Tue, 26 May 2026 15:12:46 +0200 Subject: [PATCH 24/29] Update src/docs/inference.md Co-authored-by: Nico Matentzoglu --- src/docs/inference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docs/inference.md b/src/docs/inference.md index 60e7cc3a..733106c0 100644 --- a/src/docs/inference.md +++ b/src/docs/inference.md @@ -51,7 +51,7 @@ in two scenarios: `mesh:C000089`-`skos:exactMatch`-`CHEBI:28646`-True and `CHEBI:28646`-`skos:exactMatch`-`cas:645-92-1`-True mapping quadruples, concatenated with a pipe -2. mapping inversion. the fourth row of the table contains a SKOS exact match +2. mapping inversion. The fourth row of the table contains a SKOS exact match from `CHEBI:28646` to `mesh:C000089` produced through mapping inversion of the first row of the table. The `derived_from` column in this row contains the CURIE referring to the From 082a97465a48c926b8874840e59325261bdf5368 Mon Sep 17 00:00:00 2001 From: Charles Tapley Hoyt Date: Tue, 26 May 2026 15:12:57 +0200 Subject: [PATCH 25/29] Update src/docs/inference.md Co-authored-by: Nico Matentzoglu --- src/docs/inference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docs/inference.md b/src/docs/inference.md index 733106c0..456a798a 100644 --- a/src/docs/inference.md +++ b/src/docs/inference.md @@ -43,7 +43,7 @@ from which new mappings are inferred/derived. The following example demonstrates how the `derived_from` field can be leveraged in two scenarios: -1. mapping chaining. the table contains a SKOS exact match from `mesh:C000089` +1. mapping chaining. The table contains a SKOS exact match from `mesh:C000089` to `CHEBI:28646` and from `CHEBI:28646` to `cas:645-92-1`. The third row of the table contains a SKOS exact match from `mesh:C000089` to `cas:645-92-1` produced through mapping chaining. The `derived_from` column in this row From 788319d3b6d3d73232c0a03da7ab96f57e27ea72 Mon Sep 17 00:00:00 2001 From: Charles Tapley Hoyt Date: Tue, 26 May 2026 15:13:40 +0200 Subject: [PATCH 26/29] Update src/docs/inference.md Co-authored-by: Nico Matentzoglu --- src/docs/inference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docs/inference.md b/src/docs/inference.md index 456a798a..69dab404 100644 --- a/src/docs/inference.md +++ b/src/docs/inference.md @@ -88,7 +88,7 @@ For the purposes of inference, the mapping quadruple should be used: 2. Full mapping records are inflexible: the SSSOM data should be flexible so if additional evidence (i.e., records) for a given mapping quadruple are found, then the confidence in the inferred/derived mapping (e.g., chained or - inverted)can be adjusted accordingly. This is possible because most chaining + inverted) can be adjusted accordingly. This is possible because most chaining and inversion algorithms logically operate on mapping quadruples, and not on records. From c55565250733cdb9b284529b5e7f504ac04ed7f7 Mon Sep 17 00:00:00 2001 From: Charles Tapley Hoyt Date: Tue, 26 May 2026 15:14:37 +0200 Subject: [PATCH 27/29] Update cas CURIEs and labels --- src/docs/inference.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/docs/inference.md b/src/docs/inference.md index 69dab404..becef2c1 100644 --- a/src/docs/inference.md +++ b/src/docs/inference.md @@ -121,5 +121,5 @@ infer a non-trivial negative mapping. This illustrates why mapping quadruples | subject_id | subject_label | predicate_id | predicate_modifier | object_id | object_label | mapping_justification | derived_from | comment | | ----------- | ------------- | --------------- | ------------------ | ------------ | ------------ | ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | | CHEBI:10057 | 9H-xanthene | skos:exactMatch | Not | mesh:C002563 | xanthan gum | semapv:ManualMappingCuration | | | -| CAS:92-83-1 | Xanthane | skos:exactMatch | | CHEBI:10057 | 9H-xanthene | semapv:ManualMappingCuration | | | -| CAS:92-83-1 | Xanthene | skos:exactMatch | Not | mesh:C002563 | xanthan gum | semapv:MappingChaining | mapping:58f24ccfaf71431276da873c9e7b77ea61a2425e4e8b283b943542290deb292b~\|mapping:bb1162fb2afb1c519c0aa8be98c352061720af220e2d052c571a1fecabff9800 | this example uses the first two mappings in the table, importantly, incorporating the negative modifier in the identifiers | +| cas:92-83-1 | Xanthene | skos:exactMatch | | CHEBI:10057 | 9H-xanthene | semapv:ManualMappingCuration | | | +| cas:92-83-1 | Xanthene | skos:exactMatch | Not | mesh:C002563 | xanthan gum | semapv:MappingChaining | mapping:58f24ccfaf71431276da873c9e7b77ea61a2425e4e8b283b943542290deb292b~\|mapping:bb1162fb2afb1c519c0aa8be98c352061720af220e2d052c571a1fecabff9800 | this example uses the first two mappings in the table, importantly, incorporating the negative modifier in the identifiers | From 78cd6c2a214c4c37329189cd2b30c068f7ca093d Mon Sep 17 00:00:00 2001 From: Charles Tapley Hoyt Date: Tue, 26 May 2026 15:14:41 +0200 Subject: [PATCH 28/29] Reformat --- src/docs/inference.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/docs/inference.md b/src/docs/inference.md index becef2c1..babc5633 100644 --- a/src/docs/inference.md +++ b/src/docs/inference.md @@ -101,8 +101,8 @@ how to assign identifiers to mapping quadruples. The following example uses mapping chaining combine with negated mappings to infer a non-trivial negative mapping. This illustrates why mapping quadruples -(i.e., subject-predicate-object-predicate modifier) are required over mapping triples -(i.e., subject-predicate-object). +(i.e., subject-predicate-object-predicate modifier) are required over mapping +triples (i.e., subject-predicate-object). ``` # curie_map: From df417498266827e34da8aca0a89e9b0c3a70e92a Mon Sep 17 00:00:00 2001 From: Charles Tapley Hoyt Date: Tue, 26 May 2026 15:15:57 +0200 Subject: [PATCH 29/29] Update src/docs/inference.md Co-authored-by: Nico Matentzoglu --- src/docs/inference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docs/inference.md b/src/docs/inference.md index babc5633..bd40d43e 100644 --- a/src/docs/inference.md +++ b/src/docs/inference.md @@ -99,7 +99,7 @@ how to assign identifiers to mapping quadruples. ### Example with Negative Mappings -The following example uses mapping chaining combine with negated mappings to +The following example uses mapping chaining combined with negated mappings to infer a non-trivial negative mapping. This illustrates why mapping quadruples (i.e., subject-predicate-object-predicate modifier) are required over mapping triples (i.e., subject-predicate-object).