wiggins-lab / SuperSegger

A completely automated MATLAB-based trainable image cell segmentation, fluorescence quantification and analysis suite, particularly well suited for high-throughput time lapse fluorescence microscopy of in vivo bacterial cells.
GNU General Public License v3.0
32 stars 20 forks source link

Short axis not stable over a cell-cycle #35

Open Huggzz opened 4 years ago

Huggzz commented 4 years ago

Hello,

It seems like the calculation of the short axis might be slightly off in some way as it seems to slightly increase (by a factor of 1.1) over the cell cycle which causes problems when wanting to compute the evolution of the volume (with the formula of a spherocylinder) over the cell cycle and hence also the evolution of the concentration (when I do these computations myself). Is it because it is averaged over the perpendicular direction? which means that when the cell becomes longer this mechanically increases the short axis?

Best,

Hugo

pawiggins commented 4 years ago

Hey Hugo:

I’ll take a look when I get the chance.

Here are my thoughts off the top of my head:

SS does this calculation in a least two ways so it depends where you are finding this value.

I suspect the one you are using rotates the cell mask and computes a mean width from the mask by summing the pixels in the mask and then dividing by the length (of the rotated cell). Clearly as the cell gets longer, there is a smaller and smaller fraction of the cell that is pole proximal and therefore the “average width” grows.

You could also compute the maximum width from the rotated cell. This is also pretty problematic since it is pretty noisy in practice. There are other things you could do… but I don’t think we did them. ;)

I know this sounds crazy to you, but we never intended the width to be used as you are. If you actually care about this in detail, I think you should make your own little module that calculates this directly from the phase image and then adds a new field.

—PAW 

On Jul 22, 2020, at 7:36 AM, HuggyHugMe notifications@github.com wrote:

Hello,

It seems like the calculation of the short axis might be slightly off in some way as it seems to slightly increase (by a factor of 1.1) over the cell cycle which causes problems when wanting to compute the evolution of the volume (with the formula of a spherocylinder) over the cell cycle and hence also the evolution of the concentration (when I do these computations myself). Is it because it is averaged over the perpendicular direction? which means that when the cell becomes longer this mechanically increases the short axis?

Best,

Hugo

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/wiggins-lab/SuperSegger/issues/35, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJTP3IK5TZ2Q7RSKHHXHIATR432OTANCNFSM4PEYYSHQ.

Huggzz commented 4 years ago

Hi Paul,

Thank you for your answer and confirming my doubt :). Given that I have already done the segmentation for quite a big amount of data, so far the idea I came up with was to correct this slightly off value post segmentation by inferring the width with a more precise formula, that is computing the width from the Long Axis and the Area using the formula for the area of a stadium shape (instead of a rectangle) which is possible as the formula is quadratic.

I still have an increase in the width, although it is a bit lower (about 5% instead of 10% on average) but that might be due to biological reasons as well I guess. Do you think this calculation makes sense when computed from the superSegger output?

Thank you for your help! Best,

Hugo

pawiggins commented 4 years ago

Hey Hugo:

To be honest, I worry that the numbers are worse than you think.

At the end of the day, effectively we set some arbitrary threshold in phase to define the outside of the cell. What’s more, at least in some circumstances, we dilate that to make sure that all the membrane fluorescence is within the cell. Furthermore, the algorithm requires at least a pixel between neighboring cells that are touching… and phase contrast itself is complicated due to the halo artifact.

If I were really serious, I would get a membrane-protein fluor-fusion strain and use fluorescence to determine where the membrane actually is by comparing the observed fluor to a model that accounts for the PSF. Then I would use this ground truth to calibrate against the phase image and hope to develop a phase-based algorithm that was, at least, calibrated.

I would also try to not use the cell mask directly for this computation since generating the mask truncates the precision, at any position, to an integer number of pixels. Clearly by averaging over the length of the cell, you would hope to increase this… but clearly this is sub-optimal.

—PAW

On Jul 23, 2020, at 8:11 AM, HuggyHugMe notifications@github.com wrote:

Hi Paul,

Thank you for your answer and confirming my doubt :). Given that I have already done the segmentation for quite a big amount of data, so far the idea I came up with was to correct this slightly off value post segmentation by inferring the width with a more precise formula, that is computing the width from the Long Axis and the Area using the formula for the area of a stadium shape (instead of a rectangle) which is possible as the formula is quadratic.

I still have an increase in the width, although it is a bit lower (about 5% instead of 10% on average) but that might be due to biological reasons as well I guess. Do you think this calculation makes sense when computed from the superSegger output?

Thank you for your help! Best,

Hugo

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/wiggins-lab/SuperSegger/issues/35#issuecomment-663063231, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJTP3INRAYCR6HJB7H2R4NDR5BHKHANCNFSM4PEYYSHQ.