spatialdm_global does not work with a list of specified index, pair_selection_matrix would change adata
wyq977 opened this issue · 1 comments
wyq977 commented
Hi I found out there's a bug in spatialdm_global
Line 155 in aa17624
For example, if there are 400 lr pairs after extract_lr
, one select 10 pairs for computation.
User cannot specify specified_ind as in globle_st_compute(adata) would also be still 400 (or 400x400)
That would throw a error in calculation due to
adata.uns['global_stat']['z']['st'].shape != np.zeros(total_len).shape
Also in this function, it would change/remove the ligand
, receptor
and geneInter
in adata
. Namely, the changes to adata would NOT be local.
For example, if one only specify 2 pairs, after calculation, ligand
, receptor
and geneInter
would be reduced to 2.
You have to re-run extract_lr
to get the full list.
Line 92 in aa17624