BiomedicalMachineLearning/stLearn

A problem of quantifying the interaction between two specific cell types and doing spatial mapping

XianLZ2301 opened this issue · 2 comments

Hello!
I'm currently exploring spatial transcriptomic data from colorectal cancer tissues using stlearn. I would like to know if there is a method in stlearn to quantify the receptor ligand interaction between two specified cell types and map it to HE sections. For example, I would like to explore the top 50 ligand pairs and intensities between macrophages and cancer cells. And map the intensity of the interaction between cancer cells and macrophages in a particular interactions pair (e.g. THBS1_ITGB1) on HE sections.
Looking forward to your response.
Thank you!

@BradBalderson Hi Brad, do you have any idea of this issue?

I just think you can specify lrs parameter to be a list with only one LR.
However, it cannot perform the permutation test, just can compute the co-localization score only.

Hi @XianLZ2301, is it a custom set of LR genes, or do they exist in our current database? (which is based on NATMI).

If it is not custom set of LRs, the features you described should be already present in stLearn, described in the tutorial here:
https://stlearn.readthedocs.io/en/latest/tutorials/stLearn-CCI.html

For instance:

fig, axes = plt.subplots(ncols=2, figsize=(8,6))
st.pl.lr_result_plot(data, use_result='-log10(p_adjs)', use_lr=best_lr, show_color_bar=False, ax=axes[0])
st.pl.lr_result_plot(data, use_result='lr_sig_scores', use_lr=best_lr, show_color_bar=False, ax=axes[1])
axes[0].set_title(f'{best_lr} -log10(p_adjs)')
axes[1].set_title(f'{best_lr} lr_sig_scores')

Also this, which tries to show cell types and LRs interacting at the same time for a given pair, which I think is roughly what you want (it can be tricky to see though):

st.pl.lr_plot(data, best_lr,
              inner_size_prop=0.08, middle_size_prop=.3, outer_size_prop=.5,
              outer_mode='binary', pt_scale=150,
              use_label='cell_type', show_image=True,
              sig_spots=True)