How to extract the first 20 ORA_SCORE_UP corresponding cell pairs and GO from ORA_results
Excuse me,I've plotted the first 20 up-regulated ligand receptor pairs using PlotORA, but how do I know which cells these LR mainly come from and their function?
Hi,
First, please note that the purpose of the over-representation test is to identify ligand-receptor pairs (or else) that are consistently up-regulated (or down-) across the tissue, namely across several cell type pairs. So it should not be a signal restricted to a single cell type pair.
However, I agree that it might still be useful to identify which subset of cell type pairs they come from. There is no automatic way to do that. You can either work with the shiny app or write some custom code.
Using the shiny app (on a toy model)
Let's say PlotOra returns the following:
Then, you have to look at each LRI manually. Let's focus on B2m:Cd247. First, return to the app tab with the plots and use the filtering options to select the LRIs you want.
After filtering, you will get the CCIs only associated with these LRIs. You can see the cell type pairs in the table.
Using code
First, run PlotOra() and identify some LRIs of interest (say, B2m:Cd247). Then get the CCI result table with GetTableCCI() and filter that table to only keep the LRI you want.
Please let me know if you need more details.
For function/GO terms, you can do the following for your LRI of interest:
library(scDiffCom)
scDiffCom::LRI_mouse$LRI_curated_GO[LRI == "B2m:Cd247"]
This will return the GO IDs associated with this LRI that can you use for downstream exploration.