From e8f38fd9fe5e10850126d69a32ab51825cebf8a0 Mon Sep 17 00:00:00 2001 From: Kevin Schaper Date: Fri, 6 Nov 2026 16:47:26 +0000 Subject: [PATCH] Add curated PHENOTYPE prefix for uphenotizer classes uphenotizer mints phenotype classes under https://w3id.org/monarch-initiative/entity/PHENOTYPE_, and PHENIO imports them. No upstream source has this prefix, so CURIEs for these classes can't be expanded through the merged contexts, and their IRIs can't be compressed. Add it to the curated linked_data context. The generated CSVs are updated by hand-applied rows rather than a full ETL run, so this diff doesn't pull in unrelated upstream changes. Claude-Session: https://claude.ai/code/session_01GvqCPJKxcq1SNMtoHoMpYJ --- src/prefixmaps/data/linked_data.csv | 1 + src/prefixmaps/data/linked_data.curated.yaml | 3 +++ src/prefixmaps/data/merged.csv | 1 + src/prefixmaps/data/merged.monarch.csv | 1 + src/prefixmaps/data/merged.oak.csv | 1 + tests/test_core/test_prefixmaps.py | 10 ++++++++++ 6 files changed, 17 insertions(+) diff --git a/src/prefixmaps/data/linked_data.csv b/src/prefixmaps/data/linked_data.csv index 041d713..8694c79 100644 --- a/src/prefixmaps/data/linked_data.csv +++ b/src/prefixmaps/data/linked_data.csv @@ -12,6 +12,7 @@ linkml,odrl,http://www.w3.org/ns/odrl/2/,canonical linkml,oslc,http://open-services.net/ns/core#,canonical linkml,owl,http://www.w3.org/2002/07/owl#,canonical linkml,pav,http://purl.org/pav/,canonical +linkml,PHENOTYPE,https://w3id.org/monarch-initiative/entity/PHENOTYPE_,canonical linkml,prov,http://www.w3.org/ns/prov#,canonical linkml,qb,http://purl.org/linked-data/cube#,canonical linkml,qudt,http://qudt.org/schema/qudt/,canonical diff --git a/src/prefixmaps/data/linked_data.curated.yaml b/src/prefixmaps/data/linked_data.curated.yaml index e04cb68..7718246 100644 --- a/src/prefixmaps/data/linked_data.curated.yaml +++ b/src/prefixmaps/data/linked_data.curated.yaml @@ -33,3 +33,6 @@ prefixes: dcmitype: http://purl.org/dc/dcmitype/ wgs: http://www.w3.org/2003/01/geo/wgs84_pos# xml: http://www.w3.org/XML/1998/namespace + # Phenotype classes minted by uphenotizer and imported by PHENIO + # (https://github.com/monarch-initiative/uphenotizer) + PHENOTYPE: https://w3id.org/monarch-initiative/entity/PHENOTYPE_ diff --git a/src/prefixmaps/data/merged.csv b/src/prefixmaps/data/merged.csv index da3a25d..88d041c 100644 --- a/src/prefixmaps/data/merged.csv +++ b/src/prefixmaps/data/merged.csv @@ -12130,6 +12130,7 @@ merged,PHENOLEXPLORER,https://identifiers.org/phenolexplorer/,prefix_alias,biore merged,PHENOLEXPLORER,https://identifiers.org/phenolexplorer:,prefix_alias,bioregistry merged,PHENOLEXPLORER,https://n2t.net/phenolexplorer:,prefix_alias,bioregistry merged,PHENOLEXPLORER,https://phenol-explorer.eu/foods/,prefix_alias,bioregistry +merged,PHENOTYPE,https://w3id.org/monarch-initiative/entity/PHENOTYPE_,canonical,linkml merged,PHENX,https://www.phenxtoolkit.org/protocols/view/,canonical,bioregistry merged,PHENX,http://bioregistry.io/phenx:,prefix_alias,bioregistry merged,PHENX,http://bioregistry.io/phenxtoolkit:,prefix_alias,bioregistry diff --git a/src/prefixmaps/data/merged.monarch.csv b/src/prefixmaps/data/merged.monarch.csv index f26861f..221aac3 100644 --- a/src/prefixmaps/data/merged.monarch.csv +++ b/src/prefixmaps/data/merged.monarch.csv @@ -12130,6 +12130,7 @@ merged.monarch,PHENOLEXPLORER,https://identifiers.org/phenolexplorer/,prefix_ali merged.monarch,PHENOLEXPLORER,https://identifiers.org/phenolexplorer:,prefix_alias,bioregistry merged.monarch,PHENOLEXPLORER,https://n2t.net/phenolexplorer:,prefix_alias,bioregistry merged.monarch,PHENOLEXPLORER,https://phenol-explorer.eu/foods/,prefix_alias,bioregistry +merged.monarch,PHENOTYPE,https://w3id.org/monarch-initiative/entity/PHENOTYPE_,canonical,linkml merged.monarch,PHENX,https://www.phenxtoolkit.org/protocols/view/,canonical,bioregistry merged.monarch,PHENX,http://bioregistry.io/phenx:,prefix_alias,bioregistry merged.monarch,PHENX,http://bioregistry.io/phenxtoolkit:,prefix_alias,bioregistry diff --git a/src/prefixmaps/data/merged.oak.csv b/src/prefixmaps/data/merged.oak.csv index 74037ed..14930fb 100644 --- a/src/prefixmaps/data/merged.oak.csv +++ b/src/prefixmaps/data/merged.oak.csv @@ -12130,6 +12130,7 @@ merged.oak,PHENOLEXPLORER,https://identifiers.org/phenolexplorer/,prefix_alias,b merged.oak,PHENOLEXPLORER,https://identifiers.org/phenolexplorer:,prefix_alias,bioregistry merged.oak,PHENOLEXPLORER,https://n2t.net/phenolexplorer:,prefix_alias,bioregistry merged.oak,PHENOLEXPLORER,https://phenol-explorer.eu/foods/,prefix_alias,bioregistry +merged.oak,PHENOTYPE,https://w3id.org/monarch-initiative/entity/PHENOTYPE_,canonical,linkml merged.oak,PHENX,https://www.phenxtoolkit.org/protocols/view/,canonical,bioregistry merged.oak,PHENX,http://bioregistry.io/phenx:,prefix_alias,bioregistry merged.oak,PHENX,http://bioregistry.io/phenxtoolkit:,prefix_alias,bioregistry diff --git a/tests/test_core/test_prefixmaps.py b/tests/test_core/test_prefixmaps.py index 565a2c9..dc7107b 100644 --- a/tests/test_core/test_prefixmaps.py +++ b/tests/test_core/test_prefixmaps.py @@ -229,3 +229,13 @@ def test_synonyms(self): for curie in others: with self.subTest(curie=curie): self.assertEqual(canonical, converter.standardize_curie(curie)) + + def test_curated_phenotype_prefix(self): + """PHENOTYPE is curated in linked_data, so it reaches every merged context.""" + curie = "PHENOTYPE:1001742" + uri = "https://w3id.org/monarch-initiative/entity/PHENOTYPE_1001742" + for name in ["linked_data", "merged", "merged.monarch", "merged.oak"]: + with self.subTest(context=name): + converter = prefixmaps.load_converter(name) + self.assertEqual(uri, converter.expand(curie)) + self.assertEqual(curie, converter.compress(uri))