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

GG_lyf

关注

阅读 188

2022-04-21

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)

0 0 举报