File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ class COL:
2020MICROMETER : Final = "micrometer"
2121OPTICAL_IMAGE_KEY : Final = "optical_image"
2222POINTS_KEY : Final = "maldi_points"
23+ TABLE_KEY : Final = "table"
2324REGION_KEY : Final = "region"
2425INSTANCE_KEY : Final = "instance_id"
2526X : Final = "x"
Original file line number Diff line number Diff line change 1919 OPTICAL_IMAGE_KEY ,
2020 POINTS_KEY ,
2121 REGION_KEY ,
22+ TABLE_KEY ,
2223 XY ,
2324 YX ,
2425 YXC ,
@@ -40,6 +41,7 @@ def metaspace_to_spatialdata(
4041 optical_name_added : str = OPTICAL_IMAGE_KEY ,
4142 add_points : bool = True ,
4243 points_name_added : str = POINTS_KEY ,
44+ table_name : str = TABLE_KEY ,
4345 sm : Optional [SMInstance ] = None ,
4446 ** annotation_filter ,
4547) -> SpatialData :
@@ -67,7 +69,8 @@ def metaspace_to_spatialdata(
6769 add_points: Whether to also add ion image pixel coordinates as SpatialData points. This
6870 allows to spatially visualize the ion image values. If False, only ion intensities are
6971 added to the table and coordinates are added to ``obs``.
70- points_name_added: Name of the element where to store the points in the SpatialData object
72+ points_name: Name of the element where to store the points in the SpatialData object
73+ table_name_added: The name for the SpatialData table to which annotations will be saved.
7174 sm: Optionally a cached SMInstance
7275 annotation_filter: Additional keyword arguments passed to the METASPACE API.
7376
@@ -101,7 +104,7 @@ def metaspace_to_spatialdata(
101104 ** annotation_filter ,
102105 )
103106 table = _create_spatialdata_table (adata )
104- sdata = SpatialData (tables = {"table" : table })
107+ sdata = SpatialData (tables = {table_name : table })
105108
106109 # Create image
107110 if has_optical_image (dataset ) and add_optical_image :
You can’t perform that action at this time.
0 commit comments