0
点赞
收藏
分享

微信扫一扫

【cellchat】Inference and analysis of cell-cell communication-基础篇,一个condition

GG_lyf 2022-04-21 阅读 188
r语言

cellchat需要两个输入:基因表达矩阵 + cell label。表达矩阵行为基因列为细胞,标准化+log。cell label为dataframe,行名为细胞,第一列为cell label.

从seurat v3 object中提取cell chat 所需要的两个输入文件:

data.input <- GetAssayData(seurat_object, assay = "RNA", slot = "data") # normalized data matrix
labels <- Idents(seurat_object)
meta <- data.frame(group = labels, row.names = names(labels)) # create a dataframe of the cell labels
library(CellChat)
library(patchwork)
options(stringsAsFactors = FALSE)

 

  • part I: data input and preprocessing, initialization of the cellchat object 

(1)load data

# Here we load a scRNA-seq data matrix and its associated cell meta data
#load(url("https:
举报

相关推荐

0 条评论