stjude / punctatools

Detection, colocalization, and quantification of spots / puncta
Other
9 stars 7 forks source link

Trimming of for Cellpose #19

Open dwbaggett opened 2 years ago

dwbaggett commented 2 years ago

🚀 Feature

An option to remove stacks with a ROI signal below a certain threshold

Motivation

When segmenting ROI such as cells or nuclei, cellpose appears to normalize the signal in each image before segmenting, particularly when doing 2D analysis. This leads to an over-extension of the cellpose mask in the z-directions, where diffuse, out-of-focus, signal is interpreted as an ROI. This over-extension leads to challenges in proper parameter selection, and segmentation.

Pitch

An additional flag to allow for "pruning" of analyzed z-frames based on the max ROI signal intensity of the z-frame.

Alternatives

This could feasibly exist either as a part of the setup_ROI_segmentation and run_ROI_segmentation notebooks, or exist as a standalone pre-processing utility script/notebook. The second option would depend on puncta analysis notebooks to be able to batch analyze stacks of different sizes. I do not know that the notebooks as-is currently allow for different sized z-stacks.

Additional context

3D_Cellpose 3D_Raw

amedyukhina commented 2 years ago

This should be relatively straightforward to implement. Stacks of different sizes will not be an issue.