Skip to content

Commit

Permalink
only check loaded segmentation masks if available
Browse files Browse the repository at this point in the history
  • Loading branch information
sophiamaedler committed Jan 17, 2025
1 parent 144025f commit 696ea5e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/scportrait/pipeline/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -888,9 +888,10 @@ def load_input_from_sdata(
# ensure that the provided nucleus and cytosol segmentations fullfill the scPortrait requirements
# requirements are:
# 1. The nucleus segmentation mask and the cytosol segmentation mask must contain the same ids
assert (
self.sdata[self.nuc_seg_name].attrs["cell_ids"] == self.sdata[self.cyto_seg_name].attrs["cell_ids"]
), "The nucleus segmentation mask and the cytosol segmentation mask must contain the same ids."
if self.nuc_seg_status in self.sdata.keys() and self.cyto_seg_status in self.sdata.keys():
assert (
self.sdata[self.nuc_seg_name].attrs["cell_ids"] == self.sdata[self.cyto_seg_name].attrs["cell_ids"]
), "The nucleus segmentation mask and the cytosol segmentation mask must contain the same ids."

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

0 comments on commit 696ea5e

Please sign in to comment.