Closed ilcink closed 4 years ago
The code looks fine on first glance. We don't have a vignette for something like CellPhoneDB. A quick google search yields this which may work: https://rdrr.io/github/GrigoriiNos/rimmi.rnaseq/man/cellphone_for_seurat.html
“Setup the Seurat objects” description for Seurat v3.0 https://satijalab.org/seurat/v3.0/immune_alignment.html slightly differs from Seurat v3.1 https://satijalab.org/seurat/v3.1/immune_alignment.html
My version of Seurat is v3.1.5. I have 7 datasets, which were processed separately: 3 healthy control samples (like ctrl) and 4 samples from patients (like stim). Can I use the following code to analyse my data with “integration” approach, as you have described it for stimulated vs. control PBMC datasets? :
ctrl1.data <- Read10X(data.dir = "…/Documents/R working directory/10x ctrl data1/") ctrl1 <- CreateSeuratObject(counts = ctrl1.data, project = "CTRL_1", min.cells = 3, min.features = 200) ctrl2.data <- Read10X(data.dir = "…/Documents/R working directory/10x ctrl data2/") ctrl2 <- CreateSeuratObject(counts = ctrl2.data, project = "CTRL_2", min.cells = 3, min.features = 200) ctrl3.data <- Read10X(data.dir = "…/Documents/R working directory/10x ctrl data3/") ctrl3 <- CreateSeuratObject(counts = ctrl3.data, project = "CTRL_3", min.cells = 3, min.features = 200) ctrl <- merge(ctrl1, y = c(ctrl2, ctrl3), add.cell.ids = c("ctrl1", "ctrl2", "ctrl3"), project = "IMMUNE_CTRL")
stim1.data <- Read10X(data.dir = "…/Documents/R working directory/10x stim data1/") stim1<- CreateSeuratObject(counts = stim1.data, project = "STIM_1", min.cells = 3, min.features = 200) stim2.data <- Read10X(data.dir = "…/Documents/R working directory/10x stim data2/") stim2<- CreateSeuratObject(counts = stim2.data, project = "STIM_2", min.cells = 3, min.features = 200) stim3.data <- Read10X(data.dir = "…/Documents/R working directory/10x stim data3/") stim3<- CreateSeuratObject(counts = stim3.data, project = "STIM_3", min.cells = 3, min.features = 200) stim4.data <- Read10X(data.dir = "…/Documents/R working directory/10x stim data4/") stim4<- CreateSeuratObject(counts = stim4.data, project = "STIM_4", min.cells = 3, min.features = 200) stim <- merge(stim1, y = c(stim2, stim3, stim4), add.cell.ids = c("stim1", "stim2", "stim3", "stim4"), project = "IMMUNE_STIM")
ctrl$stim <- "CTRL" ctrl <- subset(ctrl, subset = nFeature_RNA > 500) ctrl <- NormalizeData(ctrl, verbose = FALSE) ctrl <- FindVariableFeatures(ctrl, selection.method = "vst", nfeatures = 2000)
stim$stim <- "STIM" stim <- subset(stim, subset = nFeature_RNA > 500) stim <- NormalizeData(stim, verbose = FALSE) stim <- FindVariableFeatures(stim, selection.method = "vst", nfeatures = 2000)
immune.anchors <- FindIntegrationAnchors(object.list = list(ctrl, stim), dims = 1:30) immune.combined <- IntegrateData(anchorset = immune.anchors, dims = 1:30) DefaultAssay(immune.combined) <- "integrated" immune.combined <- ScaleData(immune.combined, verbose = FALSE) immune.combined <- RunPCA(immune.combined, npcs = 30, verbose = FALSE) immune.combined <- RunUMAP(immune.combined, reduction = "pca", dims = 1:30) immune.combined <- FindNeighbors(immune.combined, reduction = "pca", dims = 1:30) immune.combined <- FindClusters(immune.combined, resolution = 0.5) DimPlot(immune.combined, reduction = "umap", group.by = "seurat_clusters")
Thank you!
P.S. Is there any vignette available on ligand-receptor interactions (/any cell-cell interactions) between different clusters?