ingewortel / celltrackR

An R package for the analysis and interpretation of cell migration tracks.
13 stars 3 forks source link

Statistical test on MSD #4

Open schienstockd opened 2 years ago

schienstockd commented 2 years ago

Hello,

I really like your package. We have integrated it into our processing workflow for two-photon images.

I am just wondering, do you have a way to test for statistical significance on MSD plots?

ingewortel commented 1 year ago

Hi!

Apologies for the late response, I normally get an email notification but seem to have missed it.

We do not have specific methods implemented, but you can of course use any existing statistical methods in R.

The problem with the MSD plots is that you are comparing curves, which is more difficult than simply comparing collections of values.

If you know of any specific tests we could try to implement them, but so far the best I have found is to fit a the curve to a theoretical model (e.g. Furth's equation) to obtain model parameters like persistence time and motility coefficient (see tutorial: https://ingewortel.github.io/celltrackR/vignettes-out/simulation.html). You can then get multiple of these estimates by bootstrapping the tracks (i.e, resampling with replacement to get many different datasets of the same size). For an example, see Figure S1 in https://www.biorxiv.org/content/10.1101/2022.07.21.500464v1.full.

Important is that you cannot compare the bootstrapped parameters with a classical statistical test to get a p-value, because the p-value would simply be determined by the number of times you bootstrap. But you can use bootstrapping to get confidence intervals for e.g. the difference in motility coefficient or persistence time, and make an estimation graphic like those in https://www.nature.com/articles/s41592-019-0470-3. That would be a way to do some statistics on your MSD curves.