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

circle_plot function for visualizing cell-cell communication #139

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

WeipengMO
Copy link

Hi Daniel,

Thank you for developing such an excellent tool! This PR introduces updates to the circle_plot function in the plotting module, which visualizes cell-cell communication networks using a circular layout.

Basic Usage

The circle_plot function can be used to visualize the interactions between all cell types:

li.plotting.circle_plot(
    adata,
    liana_res
)

image

To focus on the interactions of a specific cell type, you can specify the source_cell_type and/or target_cell_type parameter:

li.plotting.circle_plot(
    adata,
    liana_res,
    source_cell_type = 'CD4 T cells'
)

image

I also added a jupyter notebook (circle_plot.zip) to introduce the examples and provide context. Let me know if you'd like me to make any further changes!

Best,
Weipeng

@dbdimitrov
Copy link
Collaborator

dbdimitrov commented Sep 9, 2024

Hi @WeipengMO,

I made some changes to align the function a bit more to the rest in liana, would you like to have a look and let me know what you think?

Thanks a lot for the PR 🙏

PS. We still need to list it in the API docs and add a test - let me know I you prefer that I do it.

Copy link
Author

@WeipengMO WeipengMO left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Daniel,

Thanks for the update. It looks good. I made a minor tweak to remove the unused liana_res parameter.

@dbdimitrov
Copy link
Collaborator

Hi @WeipengMO,

The only thing I'm not 100% convinced of is the groupby parameter and saving the colours to the anndata object. It makes the function specific to the ligand-receptor/single-cell methods of liana only, while it could be a bit more general (e.g. for spatial data or tensor/mofa results).

Would there be any issues if we omit these lines and have the function be a bit more broadly applicable? How strongly do you feel about this?

@WeipengMO
Copy link
Author

Hi @dbdimitrov ,

I agree with your perspective. Since my current work primarily focuses on single-cell sequencing, so I focus on these aspects for now. However, I understand the value of making the function more generalizable to accommodate other types of results. This would make it more versatile for broad applications, including spatial data, which I plan to work with. 🫡

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

Successfully merging this pull request may close these issues.

3 participants