Skip to content

Commit 4c482d4

Browse files
committed
remove all occurances of .attrs["cell_ids"]
1 parent 6accb6c commit 4c482d4

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

src/scportrait/pipeline/extraction.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -324,9 +324,7 @@ def _get_segmentation_info(self):
324324
# this mask will be used to calculate the cell centers
325325
if self.n_masks == 2:
326326
# perform sanity check that the masks have the same ids
327-
assert (
328-
_sdata[self.nucleus_key].attrs["cell_ids"] == _sdata[self.cytosol_key].attrs["cell_ids"]
329-
), "Nucleus and cytosol masks contain different cell ids. Cannot proceed with extraction."
327+
# THIS NEEDS TO BE IMPLEMENTED HERE
330328

331329
self.main_segmenation_mask = self.nucleus_key
332330

@@ -370,9 +368,7 @@ def _get_centers(self):
370368
), "Cell ids in centers are not unique. Cannot proceed with extraction."
371369

372370
# double check that the cell_ids contained in the seg masks match to those from centers
373-
assert set(self.centers_cell_ids) == set(
374-
_sdata[self.main_segmenation_mask].attrs["cell_ids"]
375-
), "Cell ids from centers do not match those from the segmentation mask. Cannot proceed with extraction."
371+
# THIS NEEDS TO BE IMPLEMENTED HERE
376372

377373
def _get_classes_to_extract(self):
378374
if self.partial_processing:

src/scportrait/pipeline/project.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -954,10 +954,8 @@ def load_input_from_sdata(
954954
# ensure that the provided nucleus and cytosol segmentations fullfill the scPortrait requirements
955955
# requirements are:
956956
# 1. The nucleus segmentation mask and the cytosol segmentation mask must contain the same ids
957-
if self.nuc_seg_status and self.cyto_seg_status:
958-
assert (
959-
self.sdata[self.nuc_seg_name].attrs["cell_ids"] == self.sdata[self.cyto_seg_name].attrs["cell_ids"]
960-
), "The nucleus segmentation mask and the cytosol segmentation mask must contain the same ids."
957+
# if self.nuc_seg_status and self.cyto_seg_status:
958+
# THIS NEEDS TO BE IMPLEMENTED HERE
961959

962960
# 2. the nucleus segmentation ids and the cytosol segmentation ids need to match
963961
# THIS NEEDS TO BE IMPLEMENTED HERE

0 commit comments

Comments
 (0)