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

Pearson correlation Negative #25

Closed
KabitaBaral1 opened this issue May 4, 2020 · 3 comments
Closed

Pearson correlation Negative #25

KabitaBaral1 opened this issue May 4, 2020 · 3 comments

Comments

@KabitaBaral1
Copy link

Hi,

I am using NicheNet on some brain dataset and when I use a certain celltype as receiver (ependymal cell), and any other cell type (Neural stem cell, neuroblast) as sender it seems to run everything smoothly.

But if I try to perfrom NicheNet with Ecell as sender and any other cell type as receiver, I get negative value in pearson coorelation.
Further, The following code snipet :
p_ligand_target_network = vis_ligand_target %>% make_heatmap_ggplot("Prioritized ligands","Predicted target genes", color = "purple",legend_position = "top", x_axis_position = "top",legend_title = "Regulatory potential") + theme(axis.text.x = element_text(face = "italic")) + scale_fill_gradient2(low = "whitesmoke", high = "purple", breaks = c(0,0.006,0.012))

from the following vigentte: https://github.com/saeyslab/nichenetr/blob/master/vignettes/seurat_steps.md

stops working giving me this error:
Error in factor(x, levels = colnames(matrix), ordered = TRUE) :
object 'x' not found

Is it because there's no interaction between Ecell and other cell types with Ecell contributing Ligands and other celltypes being receptor?

Thank you

@browaeysrobin
Copy link
Member

Hi @KabitaBaral1

Pearson correlation values around 0 indicate that for the ligands expressed in the sender cells (Ecell in your case), no enrichment of target genes in the geneset of interest is found compared to the background. This means that NicheNet does not find evidence dat the sender cell is regulating gene expression changes in the receiver cell.
If these values are negative, this means that there is an enrichment of the top predicted target genes in the background compared to the gene set of interest. When these values are negative, but very close to zero, then there is nothing to worry about. But when these values are really negative, this can indicate that something went wrong in the analysis, probably in the definition of background and gene set of interest. Can you give more details about the values of these pearson correlations and your definition of background and gene set of interest?

For the error when trying to create the ligand-target heatmap: kan you check how vis_ligand_target looks like?
But anyway, there is no point in creating a ligand-target matrix for ligands with negative pearson correlations because NicheNet does not find evidence dat the sender cell ligand are regulating target genes in the receiver cell.

@KabitaBaral1
Copy link
Author

Hi,
Thank you for getting back to me. That clarified few questions. So, to answer to your questions,
I am using the Seurat vignetter:
https://github.com/saeyslab/nichenetr/blob/master/vignettes/seurat_steps.md
and my conditions are:
condition_oi = "female"
condition_reference = "male" (so, basically gender differences).
I have female cells more than male cells (female 1200 and male 350) so, I was wondering if that might have affected the result.
When I run it with Ecell as receptor, it works perfectly fine but when I run with Ecell as ligand, my correlation values are negative as follows:

  test_ligand auroc aupr pearson rank
1 Mif 0.34356404 0.00291089 0.00419426 1
2 App 0.25067917 0.0020881 -0.0056524 2
3 Clstn1 0.44466365 0.00268853 -0.0181459 3
4 Calr 0.25294308 0.00194054 -0.0182766 4
5 Cadm1 0.26465071 0.00198809 -0.0191381 5
6 Npnt 0.32655239 0.00248044 -0.0193553 6
7 Apoe 0.24139715 0.0019454 -0.0238557 7
8 Zp3 0.34107374 0.00228892 -0.0302484 8
9 Hbegf 0.29304657 0.00208202 -0.0314473 9
10 Nrg1 0.2902652 0.00204751 -0.0330598 10

For vis_ligand_target, I get this as output:
<0 x 0 matrix>

Then, for :
p_ligand_target_network = vis_ligand_target %>% make_heatmap_ggplot("Prioritized ligands","Predicted target genes", color = "purple",legend_position = "top", x_axis_position = "top",legend_title = "Regulatory potential") + theme(axis.text.x = element_text(face = "italic")) + scale_fill_gradient2(low = "whitesmoke", high = "purple", breaks = c(0,0.006,0.012))

I get: Error in factor(x, levels = colnames(matrix), ordered = TRUE) :
object 'x' not found

So, could it be that my defined conditions that is, male Vs female is what's causing the problem or that it has nothing to do with this condition, its just that my Ecell is not sending any ligand to receiver cells and thus its negative?

Also, another question I had is, Is it possible to actually perform NicheNet analysis without actually specifying any conditions (like male Vs female) and just observe if there's any interaction between two cell types (since we are not really interested to see if the interaction changes after a condition but just in the typical ligand-receptor interaction between these cells in homeostatic condition).

Thank you again

@browaeysrobin
Copy link
Member

Hi @KabitaBaral1

If you use male-vs-female as conditions, then you assume that cell-cell interactions cause the differences between the male and the female condition in the receiver cell. Dependent on your research question, this might be the case or not, and if not, this might be causing the problem.

If you use Ecell as sender cell, you get AUROC values under 0.50 and negative PCCs. This indicate that there are more targets of the Ecell ligands in the background of expressed genes compared to DE genes between male and female. This can be due to issues in defining the background of expressed genes or the DE genes (for this: check the number of expressed genes in the receiver cell type, the number of DE genes etc.), but it can also be due to the possible false assumption that ligands from Ecell cause (at least partially) the differences between the male and the female condition in the receiver cell. This does not necessarily mean however that Ecell is not sending any ligand to receiver cells, though.

Also, another question I had is, Is it possible to actually perform NicheNet analysis without actually specifying any conditions (like male Vs female) and just observe if there's any interaction between two cell types (since we are not really interested to see if the interaction changes after a condition but just in the typical ligand-receptor interaction between these cells in homeostatic condition).

NicheNet is a tool that let you study how ligands affect gene expression in putatively neighboring/interacting cells, and prioritize the most important ligands based on their effect. But to do this you need to have data about this effect in gene expression you want to study. So, there need to be 'some kind of' differential expression in a receiver cell population, caused by ligands from one of more interacting sender cell populations.

If you would just be interested in the ligand-receptor interactions in homeostatic conditions (and you only have homeostatic condition data), you can always just infer ligand-receptor interactions based on their expression level. This is the end goal in some other tools like CellphoneDB, or an intermediary step in the NicheNet pipeline: (cf step 3 in the vignette you mention). However, prioritizing expressed ligand-receptor interactions based on observed target genes via NicheNet will be harder because you don’t have a clear set of genes affected by the intercellular communication process only. You could still do it, by using the total set of genes in the genome as the background, and all genes expressed in your cell type as gene set of interest. But I don’t really recommend that because not all expressed genes will be influenced by cell-cell interactions, on the contrary most genes will probably be expressed because they are part of general and cell-type specific gene expression programs. And if you can't discriminate between cell-intrinsic and cell-extrinsic effects in your data, and you will still use NicheNet, then you risk that ligands will be falsely linked to some 'cell-intrinsic' genes. And this will confound the analysis and lead to irrelevant and noisy predictions.

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

2 participants