scverse / scanpy

Single-cell analysis in Python. Scales to >1M cells.
https://scanpy.readthedocs.io
BSD 3-Clause "New" or "Revised" License
1.89k stars 595 forks source link

Is it possible to test for bimodality in scanpy? #1086

Open erikadudki opened 4 years ago

erikadudki commented 4 years ago

Is there a way to test if particular genes of a single-cell-RNA-seq-dataset show bimodal distributions, in order to infer heterogeneity?
e.g. like in: https://www.nature.com/articles/nature13437

erikadudki commented 4 years ago

@Koncopd @ivirshup @flying-sheep @gokceneraslan Is there something in this direction implemented in scanpy? I would be happy to hear from you. If it exist already, I wouldn't have to implement it on my own :)

LuckyMD commented 4 years ago

Hi @erikadudki,

Sorry for the slow replies to this post. There is no test implemented for bimodality in scanpy at the moment. For modeling you could look into diffxpy, where you may be able to fit a gaussian mixture model to do model selection. Otherwise I guess statsmodels is the way forward for this in python.

ColeWunderlich commented 4 years ago

@erikadudki If you are willing to dabble in R, the scDD package seeks to address this problem specifically. It may also be worth looking at for inspiration if you want to pursue your own implementation in python.