File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44import scanpy as sc
55import anndata
66
7+ import os
8+
79import seaborn as sns
810import matplotlib .pyplot as plt
911import imc_analysis as imc
5759
5860p = 'PANEL_G'
5961uE = 'uE_broad'
60- # density = imc.tl.celltype_density(
61- # adata_dict[p],
62- # celltype = uE,
63- # condition_keys = ['pathology', 'radio'])
62+ density = imc .tl .celltype_density (
63+ adata_dict [p ],
64+ celltype = uE ,
65+ condition_keys = ['pathology' , 'radio' ])
6466
6567# for cond in ['pathology', 'radio']:
6668# imc.tl.grouped_mwu_test(
7678# pval_form=pval_form
7779# )
7880
79-
80-
8181# Area based comparison
8282area = adata_dict [p ].obs .groupby (['roi' ,uE ])[['area' ]].sum ().pivot_table (index = 'roi' , columns = uE )
8383area = area / 1e6
110110#for p in adata_dict:
111111celltype = 'uE_broad'
112112p = 'PANEL_G'
113- p = 'PANEL_H'
113+ # p = 'PANEL_H'
114114for feat in ['pathology' , 'radio' ]:
115115 for ct in tqdm (adata_dict [p ].obs [celltype ].unique ()):
116116
You can’t perform that action at this time.
0 commit comments