perslab / CELLEX

CELLEX (CELL-type EXpression-specificity)
GNU General Public License v3.0
38 stars 9 forks source link

Why all genes showing NaN for the esmu score in one of the cell types on my end? #39

Open nh-codem opened 4 days ago

nh-codem commented 4 days ago

here's the code:

adata = sc.read_h5ad("xxxxx")

ctype = "XXXX"
adata_subset = adata [adata .obs.ctype== ctype].copy()
counts_data = pd.DataFrame(adata_subset.X.toarray() ,index= adata_subset.obs_names, columns = adata_subset.var_names).T.rename_axis('gene', inplace=False)
metadata_sub = adata_subset.obs[["celltypes"]]

eso = cellex.ESObject(data=counts_data, annotation=metadata_sub, verbose=False)
eso.compute(verbose=False)    

image