From 87ec71f3fc2ea159a1877833c32d4824baece62c Mon Sep 17 00:00:00 2001 From: Damien Goutte-Gattat Date: Sat, 10 Jun 2023 17:56:54 +0100 Subject: [PATCH 1/2] Do not allow `curie_map` to be a link to a curie map. Remove the bit in the specification that suggested the `curie_map` parameter in the YAML metadata of a mapping set could be a link to an external curie map. `curie_map` should only be used to provide an embedded curie map. It is unclear whether an external curie map should be allowed at all, but if it is, it should be specified using a distinct parameter. --- src/docs/spec.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docs/spec.md b/src/docs/spec.md index a07cb5ba..7aa93674 100644 --- a/src/docs/spec.md +++ b/src/docs/spec.md @@ -353,7 +353,7 @@ SubClassOf(Annotation(sssom:creator_id ) All SSSOM metadata elements labelled with L in the metadata table are permissible as column names in the TSV. List elements (such as creator) are "|"-separated. The columns MUST be sorted according to the order as they appear in the [SSSOM metadata](https://mapping-commons.github.io/sssom/Mapping/). For example, the first columns of a mapping set TSV should always be, in that order: subject_id, predicate_id, object_id, mapping_justification, if labels are not included; if they are included, the order should be: subject_id, subject_label, predicate_id, predicate_label, object_id, object_label, mapping_justification. For easier review of diffs, for example git diff or unix diff, we recommend to serialise the TSV by a fixed row order, sorted column by column from left to right. -Metadata about a set of mappings can be supplied as part of the mappings (embedded mode) and as a simple yaml file alongside the primary mapping file. Note that for the TSV, it will be required to supply a valid curie map that allows the unambiguous interpretation of CURIEs. A curie map is supplied after a `curie_map:` parameter in the yaml file. The value can be either a dictionary of CURIE->URLPREFIX pairs or a link to a valid curie map of the same shape. +Metadata about a set of mappings can be supplied as part of the mappings (embedded mode) and as a simple yaml file alongside the primary mapping file. Note that for the TSV, it will be required to supply a valid curie map that allows the unambiguous interpretation of CURIEs. A curie map is supplied after a `curie_map:` parameter in the yaml file. The value is a dictionary of CURIE->URLPREFIX pairs. Note that only metadata elements permissible in a global context (G, or L/G) can be used in the metadata-file. From 14d804819c92d4e0dfa1dc160774c06c641cacb4 Mon Sep 17 00:00:00 2001 From: Damien Goutte-Gattat Date: Sat, 10 Jun 2023 18:00:00 +0100 Subject: [PATCH 2/2] Fix discrepancy regarding the naming of the external YAML file. The recommendation is that the external metadata file, when present, should have the extension `.sssom.yml` (not `-meta.yml`). --- src/docs/spec.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/docs/spec.md b/src/docs/spec.md index 7aa93674..6868df98 100644 --- a/src/docs/spec.md +++ b/src/docs/spec.md @@ -360,7 +360,7 @@ Note that only metadata elements permissible in a global context (G, or L/G) can We recommend to use the following *filename conventions* for SSSOM metadatafiles: - TSV files should have the extension `.sssom.tsv`, for example: `mp-hp-exact-0.0.1.sssom.tsv`. -- External yaml metadata files should have the extension `.sssom.yml`, for example `mp-hp-exact-0.0.1.sssom.tsv` +- External yaml metadata files should have the extension `.sssom.yml`, for example `mp-hp-exact-0.0.1.sssom.yml` Example ([download](https://raw.githubusercontent.com/mapping-commons/sssom/master/examples/external/mp-hp-exact-0.0.1.sssom.yml)): @@ -376,7 +376,7 @@ mapping_provider: "http://purl.obolibrary.org/obo/upheno.owl" #### External mode -In external mode, the mapping set metadata is supplied by a separate YAML file having the same base-name of the mapping file, with the extension `-meta.yml`. By default, tools will look for the file of that name in the same directory as the the mapping set table. +In external mode, the mapping set metadata is supplied by a separate YAML file having the same base-name of the mapping file, with the extension `.sssom.yml`. By default, tools will look for the file of that name in the same directory as the the mapping set table. Example ([download](https://raw.githubusercontent.com/mapping-commons/sssom/master/examples/external/mp-hp-exact-0.0.1.sssom.tsv)):