This vignette demonstrates the use of RNAMagnet for infering putative signaling interactinos in the context of data from the bone marrow niche. A second vignette describes the use of RNAMagnet for analyzing cellular co-localization and physical cell-cell interactions.

The idea behind of RNAMagnet is to identify, for each single cell from a dataset, which cell population this cell is particularly likely to interact with. Potential signaling interactions between cells and anchors are scored based on the mutual expression level of ligands and their cognate receptors. We can retrieve the underlying receptor-ligand lists using getLigandsReceptors.

require(RNAMagnet)
require(ggplot2)

ligrec <- getLigandsReceptors("1.0.0",cellularCompartment = c("Secreted","Both"),manualAnnotation = "Correct")
head(ligrec)

The data at hand

Let's familiarize ourselves with the dataset at hand: Our dataset contains 7497 cells from 32 populations and is stored as an object of class seurat.

NicheDataColors <-
c(Erythroblasts = "#bc7c7c", Chondrocytes = "#a6c7f7", Osteoblasts = "#0061ff", 
`Fibro/Chondro p.` = "#70a5f9", `pro-B` = "#7b9696", `Arteriolar ECs` = "#b5a800", 
`B cell` = "#000000", `large pre-B.` = "#495959", `Sinusoidal ECs` = "#ffee00", 
Fibroblasts = "#70a5f9", `Endosteal fibro.` = "#264570", `Arteriolar fibro.` = "#567fba", 
`Stromal fibro.` = "#465f82", `small pre-B.` = "#323d3d", `Adipo-CAR` = "#ffb556", 
`Ng2+ MSCs` = "#ab51ff", Neutrophils = "#1f7700", `T cells` = "#915400", 
`NK cells` = "#846232", `Schwann cells` = "#ff00fa", `Osteo-CAR` = "#ff0000", 
`Dendritic cells` = "#44593c", Myofibroblasts = "#dddddd", Monocytes = "#8fff68", 
`Smooth muscle` = "#ff2068", `Ery prog.` = "#f9a7a7", `Mk prog.` = "#f9e0a7", 
`Ery/Mk prog.` = "#f9cda7", `Gran/Mono prog.` = "#e0f9a7", `Neutro prog.` = "#c6f9a7", 
`Mono prog.` = "#f4f9a7", LMPPs = "#a7f9e9", `Eo/Baso prog.` = "#a7b7f9", 
HSPC = "#c6f9a7")
qplot(x = Embeddings(NicheData10x,reduction="tsne")[,1], y = Embeddings(NicheData10x,reduction="tsne")[,2], color =Idents(NicheData10x)) + scale_color_manual(values = NicheDataColors) + theme_bw() + theme(panel.grid = element_blank(), axis.text = element_blank(), axis.title = element_blank())

Running RNAMagnet for signaling interactions

Simply run RNAMagnetSignanling:

  result <- RNAMagnetSignaling(NicheData10x, .version = "1.0.0")

The result is an object of class rnamagnet. The specificty slot of this object contains a numerical value for each single cell describing the propensity of that cell to receive signals from the 32 different cell types; see ?RNAMagnetBase for a description of the underlying algorithm. We can plot these data to visualize e.g. the ability of different cells to receive signals from Adipo-CAR cells:

qplot(x =Embeddings(NicheData10x,reduction="tsne")[,1], y=Embeddings(NicheData10x,reduction="tsne")[,2], color = result@specificity[,"Adipo-CAR"] ,size=I(0.75)) + scale_color_gradientn(name = "Strength of signal\nfrom Adipo-CAR",colours = c("black","blue","red")) + theme_bw() + theme(panel.grid = element_blank(), axis.text = element_blank(), axis.title = element_blank())

...or we can summarise these scores at the level of cell types, and draw a network representation.

PlotSignalingNetwork(result, threshold = 0.01)

To have a closer look at the molecules mediating the interactions, we can use the function getRNAMagnetGenes.

getRNAMagnetGenes(result, "Osteo-CAR", "pro-B")


veltenlab/rnamagnet documentation built on June 24, 2021, 6:19 p.m.