stjude / punctatools

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

Parameters sensitive to individual cell intensity #20

Open dwbaggett opened 2 years ago

dwbaggett commented 2 years ago

🚀 Feature

Either an new option, or a modification of existing modes which increases the change in sensitivity based on the expression of a cell.

Motivation

Images containing cells of various expression levels often result in cells with lower-expression being under-segmented. while sensitivity seems to change per-image if global_background = FALSE, it doesn't seem to change on a per-cell basis within a given image.

Pitch

When analyzing a cell, parameters such as threshold_detection or threshold_segmentation will be automatically adjusted based on the cells background fluorescence.

Alternatives

I don't know if this would work, but it might be worth investigating if making parameters automatically adjust in response to the background of the LoG transformed image might be of some use?

This may already be in effect but I don't fully undertsand how it works, In which case a detailed explanation or tutorial may be useful.

Additional context

An example image showing puncta singal in green, with superimposed puncta segmentation. Day2_wellC4_NK5A_DMSO_-_Position_2_GFP

When you remove the GFP signal, you can easily see that cells in the upper half of the image show low intensity puncta that aren't segmented. (puncta segmentation shown using the Glasby_on_Dark LUT) Day2_wellC4_NK5A_DMSO_-_Position_2_noGFP

amedyukhina commented 2 years ago

Ok, I am not quite sure how to address this. I have to think about it.

Have you tried the following strategy?

  1. At the center detection stage, try a lower value of threshold_detection to make sure you detect all low-intensity puncta
  2. At the center filtering stage, set global_background to False, and play around with the values for background_percentile and threshold_background to filter out false-positive puncta but keep low-intensity puncta in the upper half of the image

Would this provide a good enough estimate of the puncta centers?

There is of course still a chance that low-intensity puncta will be removed at the segmentation stage due to the use of a global threshold (since there were some problems with local thresholding due to bleed-through from neighboring cells).