Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
XianLZ2301 opened this issue Jun 4, 2024 · 2 comments

Comments

@XianLZ2301
Copy link

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!

@duypham2108
Copy link
Collaborator

@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.

@BradBalderson
Copy link
Collaborator

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants