今天我們來分享一下一款新的細胞通訊分析軟件----RNAMagnet
我們來詳細了解一下這個軟件的功能:
安裝:
install.packages("devtools")
devtools::install_github("veltenlab/rnamagnet")
我們來逐步分析一下這個軟件:
第一步:獲取包內(nèi)的配受體對
require(RNAMagnet)
require(ggplot2)
require(Seurat)
ligrec <- getLigandsReceptors("1.0.0",cellularCompartment = c("ECM","Surface","Both"),manualAnnotation = "Correct")
head(ligrec)
我們來詳細看一下這個函數(shù):
园爷?getLigandsReceptors
參數(shù)的解讀
version : 默認是latest
? latest points to ‘2.1.0’
? 1.0.0 包含所有在骨髓中表達的基因的人工注釋。This version was used for analysis is the Baccin et al paper. Information on heterodimeric receptors is only included for integrins.也就是說1.0.0版本具有很大的局限性,僅運用于該文章磅叛。
? 2.0.0 contains manual annotation for all genes in the geneome (not yet complete). 庫很全面但是沒有完成记盒。
? 2.1.0 integrates heterodimer information for non-integrn receptors from cellphoneDB. 這個地方主要是添加了cellphoneDB的多聚體信息。
? 3.0.0 adds a translation of the complete cellphoneDB to mouse homologues (not tested). 人鼠之間的配受體轉(zhuǎn)換。
? Alternatively, a data frame with the same column names as ‘ligandsReceptors_1.0.0’ can be used.這個我們應(yīng)該不會用到吓蘑。
cellularCompartment :
A character vector to select permitted localizations of the *ligand*. Valid entries are ‘Membrane’挣柬, ‘ECM’, ‘Secreted’ and ‘Both’, which refers to membrane-bound ligands that can also be secreted.這個地方選擇配受體分析的類型潮酒。我們一般都是選在分泌型的。
manualAnnotation:
A character vector to select permitted annotation status of the interaction. Valid entries are ‘Correct’邪蛔, ‘Incorrect’, ‘Not Expressed’ (i.e. entries not annotated in v1.0.0) and ‘Irrelevant’ (i.e. entries we consider correct but not relevant at homeostasis, e.g. interactions involving activated components of the complement system)急黎。 這個參數(shù)我們一般選擇為Correct,越準(zhǔn)確越好。
ligandClass:
A character vector to select permitted classes of ligands.Defaults to all, i.e. ‘c("Other","Cytokine","Chemokine","GrowthFactor","Interleukin")’ 這個地方選擇配受體的生物學(xué)類型勃教。
這個地方還是值得注意的淤击,庫里面的配受體我查看過了,只有小鼠的注釋故源,默認該軟件只能運行小鼠污抬,如果是人的樣本,需要我們自己準(zhǔn)備配受體對绳军,例如cellphoneDB的配受體對印机。
第二步,分析細胞之間的adhere
我們先來看看函數(shù):
门驾?RNAMagnetAnchors
Description:
RNAMagnet comes in two flavors: ‘RNAMagnetAnchors’ and
‘RNAMagnetSignaling’. This function is meant to identify, for each
single cell from a ‘seurat’ object, the propensity to physically
adhere to a set of anchor populations. For example, this function
can identify if a single cell is more likely to bind to arteriolar
or sinusoidal vessels.
從描述上看射赛,計算每個細胞對于anchors的物理adhere,其實就是計算細胞與anchors的距離(一種算法)奶是。
參數(shù):
anchors: A character vector of anchor populations. Entries must be levels of ‘seurat@ident’ 這個參數(shù)是用來指定計算細胞adhere的anchors楣责。
return: Determines object to return; one of "summary" or "rnamagnet-class" 。
##我們運行一下:
result <- RNAMagnetAnchors(NicheData10x, anchors = c("Sinusoidal ECs","Arteriolar ECs","Smooth muscle","Osteoblasts"), .version = "1.0.0")
得到結(jié)果:
direction adhesiveness X1 X2
AAACCCAAGCCGTTGC-1 1 75.78937 0.0063449571 -0.0063449571
AAACCCAGTTAATCGC-1 1 74.40186 0.0095516182 -0.0095516182
AAACGAAAGTTAGTAG-1 1 67.19046 0.0053974087 -0.0053974087
AAACGAATCTTGGGCG-1 1 53.83670 0.0206724136 -0.0206724136
AAAGTCCTCTTCTTCC-1 2 80.60037 -0.0009649741 0.0009649741
AAAGTGACAAGTATCC-1 2 64.71945 -0.0062044244 0.0062044244
這個結(jié)果的解讀來看诫隅,每個細胞的方向就是我們指定的anchors腐魂,看看細胞的方向和adhere。
結(jié)果解讀在這里:
* The anchor population that a cell is most specifically interacting with ('direction')
* The overall strength of the interaction ('adhesiveness')
* Specificity scores for interaction with each of the anchor populations.
第三步:做一些可視化:
require(plyr)
require(reshape2)
require(pheatmap)
result$id <- Idents(NicheData10x)
summarised <- ddply(result, c("id"), summarise, RNAmagnet.score = table(direction) / length(direction), n = rep(length(direction),4), RNAmagnet.adhesiveness = rep(mean(adhesiveness),4), experiment = names(table(direction)))
castMagnet <- dcast(subset(summarised, RNAmagnet.adhesiveness > 35), id ~ experiment, value.var = "RNAmagnet.score")
rownames(castMagnet) <- castMagnet[,1]
castMagnet <- castMagnet[,-1]
castMagnet <- t(apply(castMagnet,1,function(x) (x-min(x)) / (max(x)-min(x))))
pheatmap(castMagnet, cluster_cols = F, annotation_legend = F, annotation_names_col = F, color = colorRampPalette(c("white","white","blue","red"))(100), fontsize=8, treeheight_row = 20)
可以看到各個cluster之間的對于anchors的adhere逐纬。
接下來就是推斷細胞之間的相互作用了蛔屹,
result <- RNAMagnetSignaling(NicheData10x, .version = "2.1.0")
PlotSignalingNetwork(result, threshold = 0.01)
這個軟件大家不妨嘗試一下。
接下來就是原理
How the spatial
relationships of cell types are established and maintained in complex organs such as the BM remains poorly understood豁生。It has been suggested that the expression of cell adhesion molecules represents an important mechanism that translates basic genetic information into complex three-dimensional patterns of cells in tissues兔毒。細胞黏附分子對于細胞空間位置的重要作用。作者編輯了完整的注釋完好的細胞粘附受體及其同源質(zhì)膜或細胞外基質(zhì)結(jié)合配體的詳細list甸箱,并開發(fā)了RNA-Magnet算法育叁,以研究是否可以通過表達cell adhesion molecules來預(yù)測細胞的相對位置。RNA-Magnet predicts the potential physical interactions between single cells and selected attractor populations (anchors) based on the expression patterns of the cell-surface receptors and their cognate surface-expressed binding partners芍殖。依據(jù)膜結(jié)合的配受體來計算細胞之間的物理距離豪嗽,RNA-Magnet provides scores for the strength of attraction (RNA-Magnet adhesiveness) for each cell and a direction indicating the attractor population the cell is most attracted to (RNA-Magnet location).作者運用自己的數(shù)據(jù)來運用該軟件,To investigate whether RNA-Magnet is able to recapitulate the spatial relationships of BM cell types, we introduced four anchor populations representing the following niches: osteoblasts for the endosteal niche, sinusoidal ECs for the sinusoidal niche, as well as arterial ECs and smooth muscle cells to represent the arteriolar niches豌骏。The predicted adhesiveness of BM populations to distinct niches correlated strongly with their degree of differential localization, as measured by spatial transcriptomics龟梦。下面是作者的圖(對細胞距離的預(yù)判):
Localization was also recapitulated with high accuracy for almost all populations 。 including the differential localization of Adipo- and Osteo-CAR cells to the sinusoidal and arteriolar endothelia, respectively窃躲。Together, these observations demonstrate the ability of RNA-Magnet to predict spatial localization from single-cell gene expression data and highlight the importance of cell adhesion proteins for tissue organization in the BM计贰。看到這里蒂窒,相信大家明白了函數(shù)RNAMagnetAnchors的用處到底是什么了躁倒。
接下來我們來看一下通訊的原理:Systems-level analysis of intercellular signalling interactions of
BM cell types.
We applied RNA-Magnet to soluble signalling mediators (for example cytokines, growth factors and so on) and their receptors to gain a systems-level overview of potential intercellular signalling interactions荞怒。In accordance with the specific localization of the Osteo- and Adipo-CAR populations to arteriolar or sinusoidal scaffolds,an analysis of the net signalling output of distinct local niches implied that lymphoid and myeloid progenitors receive strong input from cytokines produced in the vascular and especially sinusoidal niches。也是計算特異的配受體對秧秉。
如何計算細胞之間的交流強度褐桌?
- Ligand-receptor pairs are selected based on the parameters ‘.version’, ‘.cellularCompartment’ and ‘.manualAnnotation’. Choice of ‘.cellularCompartment’ is crucial for determining the algorithm's behavior, e.g. if set to ‘c("Secreted","Both")’, paracrine signaling interactions involving soluble ligands are investigated.
- Dropout values in the expression levels of ligands and receptors are imputed using ‘magic’福贞。
- Mean expression level of ligands and receptors is computed for all anchor populations.
- For each cell or anchor population, the expression of each ligand and receptor is encoded as a fuzzy logic variable
- Fuzzy logic AND is used to compute probabilities for a given interaction to be active between a single cell and an anchor population
- An interaction score is computed as the sum of interaction probabilities across all possible ligand-receptor pairs
- Specificty scores are computed by comparing interaction scores to average interaction scores in a local neighborhood.