milopy
milopy copied to clipboard
Native python implementation for NB-GLM instead of `edgeR`
Gathering some suggestions:
- Patsy for model matrix encoding https://patsy.readthedocs.io/en/latest/overview.html
- GLM implementation in
pymc3
https://docs.pymc.io/notebooks/GLM-poisson-regression.html
statsmodels https://www.statsmodels.org/stable/generated/statsmodels.formula.api.negativebinomial.html#statsmodels.formula.api.negativebinomial
tensorflow might be useful for GLMs: https://www.tensorflow.org/probability/examples/Generalized_Linear_Models I've not tested/used this, but it gives a stable API.
batchGLM / diffxpy from theislab
Theislab dude here. Just wanted to say that we have some people working on batchGLM again and I think that it would be a good choice for you in the future.
Hi @Zethson, thanks for the heads up. I actually have some bandwidth now to look into this and try a few options out.
Hi @Zethson, thanks for the heads up. I actually have some bandwidth now to look into this and try a few options out.
Well, batchglm will still take a few months to be usable and well documented, but feel free to take a look nevertheless :) (development is happening on a couple of branches so don't look at master).
Hi @Zethson, thanks for the heads up. I actually have some bandwidth now to look into this and try a few options out.
Well, batchglm will still take a few months to be usable and well documented, but feel free to take a look nevertheless :) (development is happening on a couple of branches so don't look at master).
batchglm developer here with a minor update on this for @emdann and @Zethson: The python port of edgeR using batchglm as backend is implemented for your purposes but I didn't have the time for testing / deployment yet. It's probably going to take till January until I find time for that but let me just say that for my small testing dataset it is already pretty much exactly reproducing edgeR's results.
Excellent @picciama ! Thank you very much! Really think that a Python native edgeR will be super useful for the community. Just a big bonus that we can add this to Milopy.
CC @ivirshup
BTW @picciama this is where the new batchGLM based implementation should then end up in -> https://github.com/theislab/pertpy/blob/development/pertpy/tools/_milopy.py#L306 (Just another if case)