spatialproteomics 0.8.2__tar.gz → 0.8.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {spatialproteomics-0.8.2/spatialproteomics.egg-info → spatialproteomics-0.8.4}/PKG-INFO +1 -1
- {spatialproteomics-0.8.2 → spatialproteomics-0.8.4}/pyproject.toml +1 -1
- {spatialproteomics-0.8.2 → spatialproteomics-0.8.4}/spatialproteomics/la/label.py +11 -2
- {spatialproteomics-0.8.2 → spatialproteomics-0.8.4}/spatialproteomics/la/utils.py +9 -1
- {spatialproteomics-0.8.2 → spatialproteomics-0.8.4}/spatialproteomics/pl/plot.py +30 -14
- {spatialproteomics-0.8.2 → spatialproteomics-0.8.4}/spatialproteomics/pp/utils.py +78 -40
- {spatialproteomics-0.8.2 → spatialproteomics-0.8.4/spatialproteomics.egg-info}/PKG-INFO +1 -1
- {spatialproteomics-0.8.2 → spatialproteomics-0.8.4}/tests/test_to_zarr.py +4 -4
- {spatialproteomics-0.8.2 → spatialproteomics-0.8.4}/LICENSE +0 -0
- {spatialproteomics-0.8.2 → spatialproteomics-0.8.4}/README.md +0 -0
- {spatialproteomics-0.8.2 → spatialproteomics-0.8.4}/setup.cfg +0 -0
- {spatialproteomics-0.8.2 → spatialproteomics-0.8.4}/spatialproteomics/__init__.py +0 -0
- {spatialproteomics-0.8.2 → spatialproteomics-0.8.4}/spatialproteomics/base_logger.py +0 -0
- {spatialproteomics-0.8.2 → spatialproteomics-0.8.4}/spatialproteomics/constants.py +0 -0
- {spatialproteomics-0.8.2 → spatialproteomics-0.8.4}/spatialproteomics/container.py +0 -0
- {spatialproteomics-0.8.2 → spatialproteomics-0.8.4}/spatialproteomics/image_container/ImageContainer.py +0 -0
- {spatialproteomics-0.8.2 → spatialproteomics-0.8.4}/spatialproteomics/image_container/__init__.py +0 -0
- {spatialproteomics-0.8.2 → spatialproteomics-0.8.4}/spatialproteomics/la/__init__.py +0 -0
- {spatialproteomics-0.8.2 → spatialproteomics-0.8.4}/spatialproteomics/nh/__init__.py +0 -0
- {spatialproteomics-0.8.2 → spatialproteomics-0.8.4}/spatialproteomics/nh/neighborhood.py +0 -0
- {spatialproteomics-0.8.2 → spatialproteomics-0.8.4}/spatialproteomics/nh/utils.py +0 -0
- {spatialproteomics-0.8.2 → spatialproteomics-0.8.4}/spatialproteomics/pl/__init__.py +0 -0
- {spatialproteomics-0.8.2 → spatialproteomics-0.8.4}/spatialproteomics/pl/utils.py +0 -0
- {spatialproteomics-0.8.2 → spatialproteomics-0.8.4}/spatialproteomics/pp/__init__.py +0 -0
- {spatialproteomics-0.8.2 → spatialproteomics-0.8.4}/spatialproteomics/pp/intensity.py +0 -0
- {spatialproteomics-0.8.2 → spatialproteomics-0.8.4}/spatialproteomics/pp/preprocessing.py +0 -0
- {spatialproteomics-0.8.2 → spatialproteomics-0.8.4}/spatialproteomics/sd/__init__.py +0 -0
- {spatialproteomics-0.8.2 → spatialproteomics-0.8.4}/spatialproteomics/sd/utils.py +0 -0
- {spatialproteomics-0.8.2 → spatialproteomics-0.8.4}/spatialproteomics/tl/__init__.py +0 -0
- {spatialproteomics-0.8.2 → spatialproteomics-0.8.4}/spatialproteomics/tl/tool.py +0 -0
- {spatialproteomics-0.8.2 → spatialproteomics-0.8.4}/spatialproteomics/tl/utils.py +0 -0
- {spatialproteomics-0.8.2 → spatialproteomics-0.8.4}/spatialproteomics.egg-info/SOURCES.txt +0 -0
- {spatialproteomics-0.8.2 → spatialproteomics-0.8.4}/spatialproteomics.egg-info/dependency_links.txt +0 -0
- {spatialproteomics-0.8.2 → spatialproteomics-0.8.4}/spatialproteomics.egg-info/requires.txt +0 -0
- {spatialproteomics-0.8.2 → spatialproteomics-0.8.4}/spatialproteomics.egg-info/top_level.txt +0 -0
- {spatialproteomics-0.8.2 → spatialproteomics-0.8.4}/tests/test_container.py +0 -0
- {spatialproteomics-0.8.2 → spatialproteomics-0.8.4}/tests/test_integration.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: spatialproteomics
|
|
3
|
-
Version: 0.8.
|
|
3
|
+
Version: 0.8.4
|
|
4
4
|
Summary: Spatialproteomics is an interoperable toolbox for analyzing highly multiplexed fluorescence image data
|
|
5
5
|
Author: Matthias Meyer-Bender, Harald Vohringer
|
|
6
6
|
Requires-Python: >=3.10
|
|
@@ -76,6 +76,7 @@ def threshold_labels(
|
|
|
76
76
|
def predict_cell_types_argmax(
|
|
77
77
|
sdata,
|
|
78
78
|
marker_dict: dict,
|
|
79
|
+
min_intensity: float = 0.0,
|
|
79
80
|
table_key: str = SDLayers.TABLE,
|
|
80
81
|
label_key: str = SDFeatures.LABELS,
|
|
81
82
|
copy: bool = False,
|
|
@@ -90,6 +91,7 @@ def predict_cell_types_argmax(
|
|
|
90
91
|
Args:
|
|
91
92
|
sdata (spatialdata.SpatialData): The spatialdata object containing the expression matrix.
|
|
92
93
|
marker_dict (dict): A dictionary containing the marker genes for each cell type.
|
|
94
|
+
min_intensity (float, optional): The minimum intensity threshold for assigning cells to a type. Cells with all marker intensities below this threshold will be assigned to "Unlabeled". Defaults to 0.0.
|
|
93
95
|
table_key (str, optional): The key under which the expression matrix is stored in the tables attribute of the spatialdata object. Defaults to "table".
|
|
94
96
|
label_key (str, optional): The key under which the cell type labels are stored in the obs attribute of the spatialdata object. Defaults to "celltype".
|
|
95
97
|
copy (bool, optional): Whether to create a copy of the spatialdata object. Defaults to False.
|
|
@@ -102,7 +104,9 @@ def predict_cell_types_argmax(
|
|
|
102
104
|
assert (
|
|
103
105
|
len(set(marker_dict.keys()) - set(expression_df.columns)) == 0
|
|
104
106
|
), f"The following markers were not found in quantification layer: {set(marker_dict.keys()) - set(expression_df.columns)}."
|
|
105
|
-
celltypes = _predict_cell_types_argmax(
|
|
107
|
+
celltypes = _predict_cell_types_argmax(
|
|
108
|
+
expression_df, list(marker_dict.keys()), list(marker_dict.values()), min_intensity=min_intensity
|
|
109
|
+
)
|
|
106
110
|
adata.obs[label_key] = celltypes
|
|
107
111
|
adata.obs[label_key] = adata.obs[label_key].astype("category")
|
|
108
112
|
|
|
@@ -792,6 +796,7 @@ class LabelAccessor:
|
|
|
792
796
|
overwrite_existing_labels: bool = False,
|
|
793
797
|
cell_col: str = "cell",
|
|
794
798
|
label_col: str = "label",
|
|
799
|
+
min_intensity: float = 0.0,
|
|
795
800
|
):
|
|
796
801
|
"""
|
|
797
802
|
Predicts cell types based on the argmax classification of marker intensities.
|
|
@@ -802,6 +807,7 @@ class LabelAccessor:
|
|
|
802
807
|
overwrite_existing_labels (bool, optional): Whether to overwrite existing labels. Defaults to False.
|
|
803
808
|
cell_col (str, optional): The name of the column to store cell IDs in the output dataframe. Defaults to "cell".
|
|
804
809
|
label_col (str, optional): The name of the column to store predicted cell types in the output dataframe. Defaults to "label".
|
|
810
|
+
min_intensity (float, optional): The minimum intensity threshold for assigning cells to a type. Defaults to 0.0.
|
|
805
811
|
|
|
806
812
|
Returns:
|
|
807
813
|
xr.Dataset: A new spatialproteomics object with the predicted cell types added as labels.
|
|
@@ -825,7 +831,10 @@ class LabelAccessor:
|
|
|
825
831
|
obj = self._obj.copy()
|
|
826
832
|
|
|
827
833
|
celltypes_argmax = _predict_cell_types_argmax(
|
|
828
|
-
pd.DataFrame(obj.pp[markers][key].values, columns=markers),
|
|
834
|
+
pd.DataFrame(obj.pp[markers][key].values, columns=markers),
|
|
835
|
+
markers=markers,
|
|
836
|
+
celltypes=celltypes,
|
|
837
|
+
min_intensity=min_intensity,
|
|
829
838
|
)
|
|
830
839
|
|
|
831
840
|
# putting everything into a dataframe
|
|
@@ -4,6 +4,8 @@ import numpy as np
|
|
|
4
4
|
import pandas as pd
|
|
5
5
|
from skimage.segmentation import relabel_sequential
|
|
6
6
|
|
|
7
|
+
from spatialproteomics.constants import Labels
|
|
8
|
+
|
|
7
9
|
from ..base_logger import logger
|
|
8
10
|
|
|
9
11
|
|
|
@@ -160,11 +162,17 @@ def _predict_cell_types_argmax(
|
|
|
160
162
|
expression_df: pd.DataFrame,
|
|
161
163
|
markers: List,
|
|
162
164
|
celltypes: List,
|
|
165
|
+
min_intensity: float = 0.0,
|
|
163
166
|
):
|
|
164
167
|
# getting the argmax for each cell
|
|
165
168
|
argmax_classification = np.argmax(expression_df[markers], axis=1)
|
|
166
169
|
|
|
167
170
|
# translating the argmax classification into cell types
|
|
168
|
-
celltypes_argmax = np.array(celltypes)[argmax_classification]
|
|
171
|
+
celltypes_argmax = np.array(celltypes, dtype=object)[argmax_classification]
|
|
172
|
+
|
|
173
|
+
# if all markers are below the minimum intensity, assign UNASSIGNED
|
|
174
|
+
if min_intensity > 0.0:
|
|
175
|
+
below_threshold = (expression_df[markers].max(axis=1) < min_intensity).values
|
|
176
|
+
celltypes_argmax[below_threshold] = Labels.UNLABELED
|
|
169
177
|
|
|
170
178
|
return celltypes_argmax
|
|
@@ -1114,6 +1114,18 @@ class PlotAccessor:
|
|
|
1114
1114
|
extent=bounds,
|
|
1115
1115
|
)
|
|
1116
1116
|
|
|
1117
|
+
# draw any pending boxes added via add_box()
|
|
1118
|
+
for box in self._obj.attrs.pop("_pending_boxes", []):
|
|
1119
|
+
rect = patches.Rectangle(
|
|
1120
|
+
(box["xlim"][0], box["ylim"][0]),
|
|
1121
|
+
box["xlim"][1] - box["xlim"][0],
|
|
1122
|
+
box["ylim"][1] - box["ylim"][0],
|
|
1123
|
+
edgecolor=box["color"],
|
|
1124
|
+
linewidth=box["linewidth"],
|
|
1125
|
+
facecolor="none",
|
|
1126
|
+
)
|
|
1127
|
+
ax.add_patch(rect)
|
|
1128
|
+
|
|
1117
1129
|
legend = []
|
|
1118
1130
|
|
|
1119
1131
|
if legend_image:
|
|
@@ -1401,20 +1413,24 @@ class PlotAccessor:
|
|
|
1401
1413
|
xr.Dataset
|
|
1402
1414
|
The updated spatialproteomics object.
|
|
1403
1415
|
"""
|
|
1404
|
-
if ax is None:
|
|
1405
|
-
ax
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1416
|
+
if ax is not None:
|
|
1417
|
+
# existing immediate-draw behaviour when ax is explicit
|
|
1418
|
+
rect = patches.Rectangle(
|
|
1419
|
+
(xlim[0], ylim[0]), # bottom left corner
|
|
1420
|
+
xlim[1] - xlim[0], # width
|
|
1421
|
+
ylim[1] - ylim[0], # height
|
|
1422
|
+
edgecolor=color,
|
|
1423
|
+
linewidth=linewidth,
|
|
1424
|
+
facecolor="none",
|
|
1425
|
+
)
|
|
1426
|
+
ax.add_patch(rect)
|
|
1427
|
+
return self._obj
|
|
1428
|
+
|
|
1429
|
+
# no ax provided: defer rendering by storing box params in the dataset attrs
|
|
1430
|
+
# the boxes are then rendered in pl.imshow() when the plot is drawn
|
|
1431
|
+
pending = list(self._obj.attrs.get("_pending_boxes", []))
|
|
1432
|
+
pending.append(dict(xlim=xlim, ylim=ylim, color=color, linewidth=linewidth))
|
|
1433
|
+
self._obj.attrs["_pending_boxes"] = pending
|
|
1418
1434
|
return self._obj
|
|
1419
1435
|
|
|
1420
1436
|
def autocrop(
|
|
@@ -602,12 +602,12 @@ def _threshold(
|
|
|
602
602
|
if (quantile is None and intensity is None) or (quantile is not None and intensity is not None):
|
|
603
603
|
raise ValueError("Please provide a quantile or absolute intensity cut off.")
|
|
604
604
|
|
|
605
|
-
if isinstance(quantile, (float, int)):
|
|
605
|
+
if isinstance(quantile, (float, int, np.generic)):
|
|
606
606
|
quantile = np.array([quantile])
|
|
607
607
|
if isinstance(quantile, list):
|
|
608
608
|
quantile = np.array(quantile)
|
|
609
609
|
|
|
610
|
-
if isinstance(intensity, (float, int)):
|
|
610
|
+
if isinstance(intensity, (float, int, np.generic)):
|
|
611
611
|
intensity = np.array([intensity])
|
|
612
612
|
if isinstance(intensity, list):
|
|
613
613
|
intensity = np.array(intensity)
|
|
@@ -626,68 +626,106 @@ def _threshold(
|
|
|
626
626
|
if quantile is not None:
|
|
627
627
|
assert len(channels) == len(quantile), "The number of channels must match the number of quantile values."
|
|
628
628
|
quantile_dict = dict(zip(channels, quantile))
|
|
629
|
-
|
|
629
|
+
# we cannot just use 0 in the get() here, because the minimum intensity of a marker might be above 0,
|
|
630
|
+
# #in which case we would be thresholding the wrong value. Instead, we use np.nan and then check for this later on.
|
|
631
|
+
quantile = np.array([quantile_dict.get(channel, np.nan) for channel in all_channels])
|
|
630
632
|
if intensity is not None:
|
|
631
633
|
assert len(channels) == len(intensity), "The number of channels must match the number of intensity values."
|
|
632
634
|
intensity_dict = dict(zip(channels, intensity))
|
|
633
|
-
intensity = np.array([intensity_dict.get(channel,
|
|
635
|
+
intensity = np.array([intensity_dict.get(channel, np.nan) for channel in all_channels])
|
|
634
636
|
else:
|
|
635
637
|
# If no channels provided, assume the threshold applies to all channels
|
|
636
638
|
if quantile is not None:
|
|
637
639
|
assert len(quantile) == 1 or len(quantile) == len(
|
|
638
640
|
all_channels
|
|
639
641
|
), "Quantile threshold must be a single value or a list of values with the same length as the number of channels. If you only want to threshold a subset of channels, you can use the channels argument."
|
|
640
|
-
quantile = np.full(len(all_channels), quantile.item() if quantile.size == 1 else quantile)
|
|
641
642
|
if intensity is not None:
|
|
642
643
|
assert len(intensity) == 1 or len(intensity) == len(
|
|
643
644
|
all_channels
|
|
644
645
|
), "Intensity threshold must be a single value or a list of values with the same length as the number of channels. If you only want to threshold a subset of channels, you can use the channels argument."
|
|
645
646
|
assert np.all(intensity >= 0), "Intensity values must be positive."
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
647
|
+
|
|
648
|
+
# Get underlying numpy array and its dtype
|
|
649
|
+
img = image.values # shape (C, Y, X)
|
|
650
|
+
img_dtype = img.dtype
|
|
650
651
|
|
|
651
652
|
if quantile is not None:
|
|
652
|
-
|
|
653
|
+
if quantile.size == 1:
|
|
654
|
+
quantile = np.full(len(all_channels), quantile.item(), dtype=float)
|
|
655
|
+
else:
|
|
656
|
+
quantile = np.asarray(quantile, dtype=float)
|
|
653
657
|
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
lower = np.quantile(image.values.reshape(image.values.shape[0], -1), quantile, axis=1).astype(image.dtype)
|
|
658
|
-
|
|
659
|
-
filtered = np.clip(
|
|
660
|
-
image, a_min=np.expand_dims(np.diag(lower) if lower.ndim > 1 else lower, (1, 2)), a_max=None
|
|
661
|
-
).astype(image.dtype) - np.expand_dims(np.diag(lower) if lower.ndim > 1 else lower, (1, 2)).astype(
|
|
662
|
-
image.dtype
|
|
663
|
-
)
|
|
658
|
+
if intensity is not None:
|
|
659
|
+
if intensity.size == 1:
|
|
660
|
+
intensity = np.full(len(all_channels), intensity.item(), dtype=img_dtype)
|
|
664
661
|
else:
|
|
665
|
-
#
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
662
|
+
# casting to float here to allow for NAs (important when using the channels argument)
|
|
663
|
+
intensity = np.asarray(intensity, dtype=float)
|
|
664
|
+
|
|
665
|
+
max_val = np.max(img)
|
|
666
|
+
assert np.all(
|
|
667
|
+
intensity[~np.isnan(intensity)] <= max_val
|
|
668
|
+
), "Intensity values must be smaller than the maximum intensity."
|
|
672
669
|
|
|
673
|
-
|
|
674
|
-
lower = lower[:, np.newaxis, np.newaxis] # Reshape to add height and width dimensions.
|
|
670
|
+
filtered = None
|
|
675
671
|
|
|
676
|
-
|
|
677
|
-
|
|
672
|
+
# --- QUANTILE BRANCH ---
|
|
673
|
+
if quantile is not None:
|
|
674
|
+
assert np.all(quantile[~np.isnan(quantile)] >= 0) and np.all(
|
|
675
|
+
quantile[~np.isnan(quantile)] <= 1
|
|
676
|
+
), "Quantile values must be between 0 and 1."
|
|
678
677
|
|
|
678
|
+
flat = img.reshape(img.shape[0], -1)
|
|
679
|
+
lower = np.array([np.quantile(flat[i], q) if not np.isnan(q) else 0.0 for i, q in enumerate(quantile)]).astype(
|
|
680
|
+
img_dtype
|
|
681
|
+
)
|
|
682
|
+
|
|
683
|
+
lower = lower[:, np.newaxis, np.newaxis]
|
|
684
|
+
filtered = np.empty_like(img)
|
|
685
|
+
|
|
686
|
+
if shift:
|
|
687
|
+
for c in range(img.shape[0]):
|
|
688
|
+
lc = lower[c, 0, 0]
|
|
689
|
+
if np.isnan(quantile[c]): # no-op channel: copy as-is
|
|
690
|
+
np.copyto(filtered[c], img[c])
|
|
691
|
+
else:
|
|
692
|
+
np.maximum(img[c], lc, out=filtered[c])
|
|
693
|
+
filtered[c] -= lc
|
|
694
|
+
else:
|
|
695
|
+
for c in range(img.shape[0]):
|
|
696
|
+
lc = lower[c, 0, 0]
|
|
697
|
+
np.copyto(filtered[c], img[c])
|
|
698
|
+
if not np.isnan(quantile[c]): # only threshold specified channels
|
|
699
|
+
mask = filtered[c] < lc
|
|
700
|
+
filtered[c][mask] = img_dtype.type(0)
|
|
701
|
+
|
|
702
|
+
# --- INTENSITY BRANCH (dtype-safe & channel-wise) ---
|
|
679
703
|
if intensity is not None:
|
|
704
|
+
base = img if filtered is None else filtered
|
|
705
|
+
result = np.empty_like(base)
|
|
706
|
+
n_channels = base.shape[0]
|
|
707
|
+
|
|
680
708
|
if shift:
|
|
681
|
-
|
|
682
|
-
|
|
709
|
+
for c in range(n_channels):
|
|
710
|
+
if np.isnan(intensity[c]): # no-op channel
|
|
711
|
+
np.copyto(result[c], base[c])
|
|
712
|
+
else:
|
|
713
|
+
thr = img_dtype.type(intensity[c])
|
|
714
|
+
np.maximum(base[c], thr, out=result[c])
|
|
715
|
+
result[c] -= thr
|
|
683
716
|
else:
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
717
|
+
zero = img_dtype.type(0)
|
|
718
|
+
for c in range(n_channels):
|
|
719
|
+
np.copyto(result[c], base[c])
|
|
720
|
+
if not np.isnan(intensity[c]): # only threshold specified channels
|
|
721
|
+
thr = img_dtype.type(intensity[c])
|
|
722
|
+
mask = result[c] < thr
|
|
723
|
+
result[c][mask] = zero
|
|
724
|
+
|
|
725
|
+
filtered = result
|
|
726
|
+
|
|
727
|
+
if filtered is None:
|
|
728
|
+
raise RuntimeError("Internal error: neither quantile nor intensity branch produced a result.")
|
|
691
729
|
|
|
692
730
|
return filtered
|
|
693
731
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: spatialproteomics
|
|
3
|
-
Version: 0.8.
|
|
3
|
+
Version: 0.8.4
|
|
4
4
|
Summary: Spatialproteomics is an interoperable toolbox for analyzing highly multiplexed fluorescence image data
|
|
5
5
|
Author: Matthias Meyer-Bender, Harald Vohringer
|
|
6
6
|
Requires-Python: >=3.10
|
|
@@ -7,7 +7,7 @@ def test_to_zarr_image(ds_image):
|
|
|
7
7
|
with tempfile.TemporaryDirectory() as temp_dir:
|
|
8
8
|
output_path = os.path.join(temp_dir, "zarr_writing_test.zarr")
|
|
9
9
|
try:
|
|
10
|
-
ds_image.drop_encoding().to_zarr(output_path)
|
|
10
|
+
ds_image.drop_encoding().to_zarr(output_path, consolidated=False)
|
|
11
11
|
assert os.path.exists(output_path) and os.path.isdir(
|
|
12
12
|
output_path
|
|
13
13
|
), f"Directory {output_path} was not created."
|
|
@@ -21,7 +21,7 @@ def test_to_zarr_segmentation(ds_segmentation):
|
|
|
21
21
|
with tempfile.TemporaryDirectory() as temp_dir:
|
|
22
22
|
output_path = os.path.join(temp_dir, "zarr_writing_test.zarr")
|
|
23
23
|
try:
|
|
24
|
-
ds_segmentation.drop_encoding().to_zarr(output_path)
|
|
24
|
+
ds_segmentation.drop_encoding().to_zarr(output_path, consolidated=False)
|
|
25
25
|
assert os.path.exists(output_path) and os.path.isdir(
|
|
26
26
|
output_path
|
|
27
27
|
), f"Directory {output_path} was not created."
|
|
@@ -35,7 +35,7 @@ def test_to_zarr_labels(ds_labels):
|
|
|
35
35
|
with tempfile.TemporaryDirectory() as temp_dir:
|
|
36
36
|
output_path = os.path.join(temp_dir, "zarr_writing_test.zarr")
|
|
37
37
|
try:
|
|
38
|
-
ds_labels.drop_encoding().to_zarr(output_path)
|
|
38
|
+
ds_labels.drop_encoding().to_zarr(output_path, consolidated=False)
|
|
39
39
|
assert os.path.exists(output_path) and os.path.isdir(
|
|
40
40
|
output_path
|
|
41
41
|
), f"Directory {output_path} was not created."
|
|
@@ -49,7 +49,7 @@ def test_to_zarr_neighborhoods(ds_neighborhoods):
|
|
|
49
49
|
with tempfile.TemporaryDirectory() as temp_dir:
|
|
50
50
|
output_path = os.path.join(temp_dir, "zarr_writing_test.zarr")
|
|
51
51
|
try:
|
|
52
|
-
ds_neighborhoods.drop_encoding().to_zarr(output_path)
|
|
52
|
+
ds_neighborhoods.drop_encoding().to_zarr(output_path, consolidated=False)
|
|
53
53
|
assert os.path.exists(output_path) and os.path.isdir(
|
|
54
54
|
output_path
|
|
55
55
|
), f"Directory {output_path} was not created."
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{spatialproteomics-0.8.2 → spatialproteomics-0.8.4}/spatialproteomics/image_container/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{spatialproteomics-0.8.2 → spatialproteomics-0.8.4}/spatialproteomics.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
{spatialproteomics-0.8.2 → spatialproteomics-0.8.4}/spatialproteomics.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|