modkit icon indicating copy to clipboard operation
modkit copied to clipboard

Kolmogorov-Smirnov as a way of comparing methylomes

Open Ge0rges opened this issue 4 months ago • 6 comments

Hi @ArtRand,

I wanted to mention here a statistical test that might prove a useful contribution to modkit. In my study I have been trying to ask the question "How different are two methylomes?". In the last few weeks, I have settled on the Kolmogorov-Smirnov test which has proven quite useful. It gives you a p-value of significance as to whether the distributions are identical or not, and when significant it gives you the d-value indicating broadly the largest distance between the distributions on an understandable scale of 0 to 1.

My implementation handles the large number of methylation sites by basically bootstrapping the KS test, then calculating the p-value from the number of times the resulting d-value is above the observed d-value. I then do a multiple test correction as well on the p-value.

Let me know what you think!

Ge0rges avatar Jul 10 '25 20:07 Ge0rges