Closed giovp closed 3 years ago
That's a great idea, thanks! We haven't had the time to do this, but hopefully in future. Thanks, Mirjana
Hi Giovanni @giovp and cellphonedb-people,
I've made a fork where you can use statistical_analysis and anaylsis via python on adata objects. It works like this for example:
import cellphonedb as cphdb
outs=cphdb.statistical_analysis_scanpy(adata, var_names=adata.var_names, obs_names=adata.obs_names, obs_key='cell_type')
obs_key must be something that groups the cells in adata.obs (like 'louvain' or sth like that). Cellphonedb checks for interactions between these groups.
Definetly improvable, but seems to work fine (there is a jupyter notebook in the fork which shows that the results are the same as for conventional API usage). Would be cool to make cellphonedb work with sparse data as well.
Best, Stefan
That's really great, many thanks!
Hi @stefanpeidli ! hope you are doing well!
fun fact, since we had no reply, we had the awesome @michalk8 reimplementing with speed up + couple other of improvements. We are testing it and should be released with an upcoming package we are wrapping up. Will keep you posted!
Hi @giovp,
is this available already?
hey @grst , my bad missing this. Yes it is! You can find an example here: https://squidpy.readthedocs.io/en/latest/auto_examples/graph/compute_ligrec.html
it's much faster and also uses a larger database (omnipath, whihc contains cellphonedb as well as many others). Looking forward to feedbacks!
very cool, thanks!
Hi, was wondering: is there any plan to provide an API to use cellphonedb from within python? This would make it super convenient to include cellphonedb in a standard single cell analysis workflow (e.g. with scanpy) and the community could build up other tools on top of it. I'm thinking something like this:
Thank you!