今天我们来分享一下一款新的细胞通讯分析软件----RNAMagnet
我们来详细了解一下这个软件的功能:
安装:
install.packages("devtools")
devtools::install_github("veltenlab/rnamagnet")
我们来逐步分析一下这个软件:
第一步:获取包内的配受体对
require(RNAMagnet)
require(ggplot2)
require(Seurat)
ligrec <- getLigandsReceptors("1.0.0",cellularCompartment = c("ECM","Surface","Both"),manualAnnotation = "Correct")
head(ligrec)
我们来详细看一下这个函数:
?getLigandsReceptors
参数的解读
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). 人鼠之间的配受体转换。
• Alternatively, a data frame with the same column names as ‘ligandsReceptors_1.0.0’ can be used.这个我们应该不会用到。
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)。 这个参数我们一般选择为Correct,越准确越好。
ligandClass:
A character vector to select permitted classes of ligands.Defaults to all, i.e. ‘c("Other","Cytokine","Chemokine","GrowthFactor","Interleukin")’ 这个地方选择配受体的生物学类型。
这个地方还是值得注意的,库里面的配受体我查看过了,只有小鼠的注释,默认该软件只能运行小鼠,如果是人的样本,需要我们自己准备配受体对,例如cellphoneDB的配受体对。
第二步,分析细胞之间的adhere
我们先来看看函数:
?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的距离(一种算法)。
参数:
anchors: A character vector of anchor populations. Entries must be levels of ‘seurat@ident’ 这个参数是用来指定计算细胞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")
得到结果:
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
这个结果的解读来看,每个细胞的方向就是我们指定的anchors,看看细胞的方向和adhere。
结果解读在这里:
* 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)
图片.png
可以看到各个cluster之间的对于anchors的adhere。
接下来就是推断细胞之间的相互作用了,
result <- RNAMagnetSignaling(NicheData10x, .version = "2.1.0")
PlotSignalingNetwork(result, threshold = 0.01)
图片.png
这个软件大家不妨尝试一下。
接下来就是原理
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。细胞黏附分子对于细胞空间位置的重要作用。作者编辑了完整的注释完好的细胞粘附受体及其同源质膜或细胞外基质结合配体的详细list,并开发了RNA-Magnet算法,以研究是否可以通过表达cell adhesion molecules来预测细胞的相对位置。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。依据膜结合的配受体来计算细胞之间的物理距离,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).作者运用自己的数据来运用该软件,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。下面是作者的图(对细胞距离的预判):
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。看到这里,相信大家明白了函数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.
网友评论