wdecoster / methplotlib

Plotting tools for nanopore methylation data
MIT License
90 stars 13 forks source link

What kind of analysis to use in differential_modification.py for multiway analysis? #7

Open endrebak opened 5 years ago

endrebak commented 5 years ago

By the way, allele_specific_modification.py does something very similar to differential_modification.py, only focussing on a simpler case of a 1 vs 1 comparison. The same improvements can probably be made in both scripts. The differential_modification script would eventually need better stats handling when comparing groups of samples, but for now I've just implemented this as a simple fisher exact test, which does suffice for within sample allele_specific_modification but is not optimal for across multiple samples differential_modification...

What kind of differential analysis did you have in mind for a multiway comparison?

wdecoster commented 5 years ago

Right now we're just handling groups of samples as they were only one sample and adding all methylated and non-methylated counts together, without i) increasing power by making use of multiple observations and while at the same time ii) ignoring any heterogeneity within the groups. For a 3 vs 3 comparison we should be comparing 3 ratios vs 3 ratios... but I'm not yet sure what's the most appropriate test for that.