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

Include more options for niche definitions #789

Open
timtreis opened this issue Jan 8, 2024 · 11 comments
Open

Include more options for niche definitions #789

timtreis opened this issue Jan 8, 2024 · 11 comments
Assignees
Labels
graph 🕸️ squidpy2.0 Everything releated to a Squidpy 2.0 release workstream Major workstreams for the Squidpy 2.0 release

Comments

@timtreis
Copy link
Member

timtreis commented Jan 8, 2024

Currently, squidpy focusses mostly on local spatial neighborhoods for niche analysis purposes. However, there are other definitions which one could use. Including other options could increase tool usage and enable other usecases, f.e. nische-detection-robustness testing?

Pinging @melonora @LLehner @MohammedZidane

@timtreis timtreis added squidpy2.0 Everything releated to a Squidpy 2.0 release workstream Major workstreams for the Squidpy 2.0 release labels Jan 8, 2024
@timtreis
Copy link
Member Author

Hey @LLehner, let's discuss the feature in this issue. Here there's the monkeybread package that we mentioned during the meeting: https://monkeybread.readthedocs.io/en/latest/

@LLehner
Copy link
Member

LLehner commented May 13, 2024

Neighborhood based:

VI and Bayesian methods:

  • DestVI ("Unlike other methods, DestVI learns both discrete cell-type-specific profiles and continuous sub-cell-type latent variations using a conditional deep generative model")
  • BayesSpace

OT-based:

  • SPOT (Cluster cells based on their niche similarity, not their expression similarity)

MRF-based:

GRN based:

  • NicheHotSpotter ("NicheHotSpotter calculates the probability that a signalling node participates in niche–stem cell signalling from the stationary distribution of a finite discrete time-homogenous Markov chain model")

Cell-Cell-Communiation based:
One could reason about niches by analyzing cellular interactions:

pre-trained (foundational) models:
Perhaps one could utlize pre-trained (foundational) models to predict niches.

@timtreis
Copy link
Member Author

Amazing, thank you! Could you also briefly look into the respective requirements? Ideally I'd hope that there is a small subset that we can add without adding to our dependencies (core) and the other methods will complain about their specific solvers or whatever not being installed when they're called (addon).

Then we could start with the core methods and also merge them without adding to the dependency load of the base package before things are evaluated and stable and later on cast the addon ones into the template we talked about

@chiarasch
Copy link

Great progress in #831! @migueLib and I think about adding Kasumi from @jtanevski to squidpy, also referring to the recent addition of sliding_windows in #859

@LLehner
Copy link
Member

LLehner commented Oct 1, 2024

Hi @chiarasch, thank you for the offer! That would indeed be a great addition. I just skimmed through the paper and if i understand correctly the third level representation which is part of the output is the cluster label, which would be the niche a cell is assigned to, right?

Another question: If you are set on implementing this, do you have a rough timeline in mind until when its ready? Just asking because if you plan to start right now you could add it to #831, otherwise make a new PR, as #831 should get merged soon.

@jtanevski
Copy link

Hi @LLehner. You are right that the third level is the output. However, Kasumi outputs a class label per tissue patch/window and not per cell. That makes it a bit different from the related approaches. The package is updated and it allows also for clustering of windows based on the composition of cell types or marker abundance/expression in general as an alternative that, as a scope and representation, lends itself also to application of other approaches.

@LLehner
Copy link
Member

LLehner commented Oct 1, 2024

Hi @LLehner. You are right that the third level is the output. However, Kasumi outputs a class label per tissue patch/window and not per cell.

Ah, i see. Well that shouldn't be a problem, i mean you can just assign the patch label to every cell that resides within this patch (if one is interested in labels per cell). But just to understand correctly, can the third level label be interpreted as a niche label?

@jtanevski
Copy link

Hi @LLehner. You are right that the third level is the output. However, Kasumi outputs a class label per tissue patch/window and not per cell.

Ah, i see. Well that shouldn't be a problem, i mean you can just assign the patch label to every cell that resides within this patch (if one is interested in labels per cell). But just to understand correctly, can the third level label be interpreted as a niche label?

In principle yes, but it's going to be tricky if you want to do that since the windows can overlap leading to a fuzzy instead of crisp assignment :)

@chiarasch
Copy link

Thanks for checking @LLehner! It is indeed a bit trickier to compare it to the more "classical" niche identification methods, also in the context of how you are comparing them atm. We thought about adding it during the hackathon in November, so I would create another PR and we can deepen our discussions then! :)

Out of interest, which other methods do you plan to add to the current PR?

@timtreis
Copy link
Member Author

timtreis commented Oct 1, 2024

I'll let @LLehner elaborate more on the exact method choices, but the core thought is "We don't want crazy imports or massive reimplementation work" 👌

Just wanted to ping @FrancescaDr who's working on the sliding window PR. This method could f.e. be a cool way to demonstrate both functionalities later for squidpy-notebooks, wdyt?

@LLehner
Copy link
Member

LLehner commented Oct 1, 2024

We thought about adding it during the hackathon in November, so I would create another PR and we can deepen our discussions then! :)

Great, looking forward to it!

Out of interest, which other methods do you plan to add to the current PR?

SPOT will be added next. Then we would also like to implement BANKSY and perhaps a HMRF-based approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
graph 🕸️ squidpy2.0 Everything releated to a Squidpy 2.0 release workstream Major workstreams for the Squidpy 2.0 release
Projects
None yet
Development

No branches or pull requests

5 participants