Skip to content

Commit

Permalink
add logging statements showing how many nuclei/cytosol ids are remove…
Browse files Browse the repository at this point in the history
…d through filtering
  • Loading branch information
sophiamaedler committed Jun 4, 2024
1 parent 8bc5d1e commit 32254d4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/sparcscore/pipeline/workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -916,6 +916,8 @@ def cellpose_segmentation(self, input_image):

masks_nucleus = filter_nucleus.filter(masks_nucleus)

self.log(f"Removed {len(filter_nucleus.ids_to_remove)} nuclei as they fell outside of the threshold range {filter_nucleus.threshold}.")

# perform filtering for cytosol size
thresholds, confidence_interval = self.get_params_cellsize_filtering(
"cytosol"
Expand All @@ -940,6 +942,7 @@ def cellpose_segmentation(self, input_image):
)
masks_cytosol = filter_cytosol.filter(masks_cytosol)

self.log(f"Removed {len(filter_cytosol.ids_to_remove)} cytosols as they fell outside of the threshold range {filter_cytosol.threshold}.")
if not self.filter_status:
self.log(
"No filtering performed. Cytosol and Nucleus IDs in the two masks do not match. Before proceeding with extraction an additional filtering step needs to be performed"
Expand Down

0 comments on commit 32254d4

Please sign in to comment.