diff --git a/CHANGELOG.md b/CHANGELOG.md index 06df562b..6483c889 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ and this project adheres to [Semantic Versioning][]. [keep a changelog]: https://keepachangelog.com/en/1.0.0/ [semantic versioning]: https://semver.org/spec/v2.0.0.html +## [0.1.6] - xxxx-xx-xx + +- (MERSCOPE) added `feature_key` attribute for points (i.e., the `'gene'` column) #210 + ## [0.1.5] - 2024-09-25 ### Added diff --git a/src/spatialdata_io/_constants/_constants.py b/src/spatialdata_io/_constants/_constants.py index 9ec43fa9..34848137 100644 --- a/src/spatialdata_io/_constants/_constants.py +++ b/src/spatialdata_io/_constants/_constants.py @@ -322,6 +322,7 @@ class MerscopeKeys(ModeEnum): GLOBAL_Z = "global_z" Z_INDEX = "ZIndex" REGION_KEY = "cells_region" + GENE_KEY = "gene" @unique diff --git a/src/spatialdata_io/readers/merscope.py b/src/spatialdata_io/readers/merscope.py index c5c5cf03..2d916ea7 100644 --- a/src/spatialdata_io/readers/merscope.py +++ b/src/spatialdata_io/readers/merscope.py @@ -303,6 +303,7 @@ def _get_points(transcript_path: Path, transformations: dict[str, BaseTransforma transcript_df, coordinates={"x": MerscopeKeys.GLOBAL_X, "y": MerscopeKeys.GLOBAL_Y}, transformations=transformations, + feature_key=MerscopeKeys.GENE_KEY, ) transcripts["gene"] = transcripts["gene"].astype("category") return transcripts