saeyslab / multinichenetr

MultiNicheNet: a flexible framework for differential cell-cell communication analysis from multi-sample multi-condition single-cell transcriptomics data
GNU General Public License v3.0
107 stars 14 forks source link

Condition-specific cell types - Can you run multinichenetr on datasets that have varying cell type composition? #32

Closed olympiahardy closed 3 months ago

olympiahardy commented 11 months ago

Hi there,

Thank you for all the hard work on developing this tool!

I was wondering if/how multinichenetr can be run on a dataset that has some cell types that are condition specific. For example if I had a macrophage sub-population that was present in one condition but completely absent in the other I wouldn't be able to run the differential expression analysis. I know that CellChat has a functionality where you can harmonise the cell type annotations across conditions by setting the expression values to 0 where it is absent in a given condition, but then that matters less when the tool is only doing a comparative analysis rather than a differential expression for ligand receptor pairs between conditions.

I hope that all makes sense, I'd love to hear your thoughts or perhaps suggestions to workaround this. At the moment all I have is to try and harmonise the cell type labels by using broader annotations but then you lose the granularity of sub-clusters.

Thanks!

Olympia

browaeysrobin commented 11 months ago

Hi @olympiahardy

In the current release, there is indeed no possibility to handle condition-specific cell types. It has been on our mind to add this option in a future release.

For the moment you can indeed use a broader annotation for that specific cell type. Some ligands/receptors/target genes in this output may be reflective of the condition-specific subpopulation.

olympiahardy commented 11 months ago

Hi, That makes sense, thank you for the reply. I'll give it a go and see what comes out, looking forward to the developments in the next release!!

Boehmin commented 6 months ago

Hi @browaeysrobin, I am also working with the same issue. You mentioned the following in the closed issue #38 Related to this, you can check issue https://github.com/saeyslab/multinichenetr/issues/32 and the solution I propose there; we will be releasing a work-around to handle condition-specific cell types soon (within one month).

Has this work-around been released? I have those clusters "somewhat" annotated in all my conditions, but one for example has only 5 cells in one of my conditions. This does not necessarily inspire confidence for DEG. I`m not sure how else to approach this, or what else is referred to by "broader" annotation. We have single nuclei data, this cluster of nuclei is virtually non-existent in a healthy condition so I am not sure how a "broader" annotation would fix this, or what to annotate these nuclei as.

browaeysrobin commented 6 months ago

Hi @Boehmin

You can find the current workaround for this by: 1) installing the dev-branch of this package (devtools::install_github("saeyslab/multinichenetr", "dev-branch")) 2) following the vignette: https://github.com/saeyslab/multinichenetr/blob/dev-branch/vignettes/condition_specific_celltype_MISC.Rmd

If steps in this workflow don't work anymore, let me know.

olympiahardy commented 6 months ago

Hi @browaeysrobin,

Thank you for releasing this vignette, I have tested it on my own data and haven't run into any problems! I have a question regarding interpretation as I want to ensure I'm not drawing any false conclusions.

If we compare two circos plots in my condition of interest (M) compared to (A/S):

Circos X shows the top 50 prioritised predicted ligand/receptors for cell types present in this condition found to be differentially expressed in condition M when compared to conditions A and S. These prioritised ligand/receptor interactions can be discussed in relation to all three conditions in the experiment.

Circos Y shows the top 50 prioritised predicted ligand/receptors for all cell types in the dataset with the inclusion of condition-specific cell types. Where this is true, for these cell types the predicted ligand/receptors have been prioritised based on gene expression within condition M rather than differential expression across conditions. The returned ligand/receptor interactions between condition-specific cell types may reflect the underlying biology specific to condition M but are not directly comparable to the other conditions in this analysis.

And then regarding other visualisations such as the ligand activity plot, if I adapted the source code to take the dataframe _multinichenet_output$prioritization_tables_with_condition_specific_celltype_receiver$ligand_activities_target_detbl instead of the list _ligand_activities_targetsDEgenes am I correct in understanding that I could then visualise downstream targets associated with these condition-specific cell types? To clarify if not clear, does the ligand_activities_target_de_tbl in condition-specific analysis equate to ligand_activities_targets_DEgenes in the usual multinichenetr analysis?

Sorry for the long message and thanks again for the vignette!

browaeysrobin commented 6 months ago

Hi @olympiahardy

Wrt circos Y: it depends on the role of the condition-specific cell types (sender or receiver). If an interaction ends up in the top50 interactions...

-involving a condition-specific (will abbreviate CoS) cell type as sender then this means: the ligand is cell-type specific for the CoS cell type + binds a receptor, which is likely DE in the receiver, + likely induces DE target genes in the receiver. -involving a condition-specific (will abbreviate CoS) cell type as receiver then this means: the receptor is cell-type specific for the CoS cell type + binds a ligand, which is likely DE in the sender.

So your statement "...may reflect the underlying biology specific to condition M but are not directly comparable to the other conditions in this analysis" is not entirely correct since a prioritized interaction will most likely contain information that is comparable to the other conditions.

multinichenet_output$prioritization_tables_with_condition_specific_celltype_receiver$ligand_activities_target_de_tbl instead of the list ligand_activities_targets_DEgenes am I correct in understanding that I could then visualise downstream targets associated with these condition-specific cell types?

No. Because we cannot calculate DE genes for CoS receiver cell types, we cannot infer ligand activities and target genes for them.

browaeysrobin commented 3 months ago

https://github.com/saeyslab/multinichenetr/blob/main/vignettes/condition_specific_celltype_MISC.knit.md is a new vignette of multinichenetr 2.0.0 demonstrating these workflows.