interactivereport / cellxgene_VIP

Enables cellxgene to generate violin, stacked violin, stacked bar, heatmap, volcano, embedding, dot, track, density, 2D density, sankey and dual-gene plot in high-resolution SVG/PNG format. It also performs differential gene expression analysis and provides a Command Line Interface (CLI) for advanced users to perform analysis using python and R.
https://cellxgenevip-ms.bxgenomics.com
MIT License
129 stars 44 forks source link

functions for DEG analysis #106

Open jianglch opened 6 months ago

jianglch commented 6 months ago

Dear cellxgene_vip authors, I am looking into the script used for DEG analysis VIPInterface.py and can't figure out where function "compute_diffexp_ttest" come from. I guess it is corresponding to the cellxgene t-test option in the frontend. scripts relevant: if data['DEmethod']=='default': if sum(mask[0]==True)<10 or sum(mask[1]==True)<10: raise ValueError('Less than 10 cells in a group!')

with app.get_data_adaptor(url_dataroot=data['url_dataroot'],dataset=data['dataset']) as scD:

scD=data['data_adapter']
if scD is not None:
  #res = diffDefault.diffexp_ttest(scD,mask[0].to_numpy(),mask[1].to_numpy(),scD.data.shape[1])# shape[cells as rows, genes as columns]
  res = scD.compute_diffexp_ttest(mask[0].to_numpy(),mask[1].to_numpy(),scD.data.shape[1]-1,0.01)

Thanks for your input!

jianglch commented 6 months ago

should be someting linked to https://github.com/sinnamone/cellxgene/blob/main/backend/czi_hosted/compute/diffexp_generic.py and https://gitlab-ce.gwdg.de/loosolab/container/cellxgene/-/blob/seve/standard-endpoint-naming/server/data_anndata/anndata_adaptor.py. I will read the code more carefully.