Cell type classification using an integrated reference
0
0
Entering edit mode
4 weeks ago
kayah • 0

I'm following the tutorial of scRNA-seq cell type annotation now(https://satijalab.org/seurat/articles/integration_mapping), but wondered that how Large Seurat file looks like. Because I want to anchor my data(which is analyzing nowdays..) to reference data but it didn't work well because of file format. for example I'm wondering that where is gene name. When I write a code like "View(mydata@meta.data)" then I can see barcode and nCount_RNA, nFeature_RNA, percent.mt, clusters but I can't find any gene name here. So my questions are how can I see gene name in my Seurat data set, and also what file format is need to run <<FindTransferAnchors>>??? this is how my code looks like. and my trouble site is last line, which try to look for anchors. Thank you!

library(Seurat)
library(SeuratObject)
library(dplyr)
library(tidyverse)
library(patchwork) 
WAT_M_Y <- Read10X(data.dir = "~/Desktop/GSE137869/WAT-M-Y/") 

colnames(WAT_M_Y) <- gsub("_", "-", colnames(WAT_M_Y))

WAT_M_Y <- CreateSeuratObject(counts = WAT_M_Y, 
                              project = "WAT_M_Y",
                              min.cells = 3,
                              min.features = 200)

WAT_M_Y [["percent.mt"]]<-PercentageFeatureSet(WAT_M_Y, pattern =  "^Mt-")


WAT_M_O <- Read10X(data.dir = 
                          "~/Desktop/GSE137869/WAT-M-O/") 
colnames(WAT_M_O) <- gsub("_", "-", colnames(WAT_M_O))
WAT_M_O <- CreateSeuratObject(counts = WAT_M_O, 
                              project = "WAT_M_O",
                              min.cells = 3,
                              min.features = 200)

WAT_M_O [["percent.mt"]]<-PercentageFeatureSet(WAT_M_O, pattern =  "^Mt-")
male_wat <- merge(WAT_M_Y, y = c(WAT_M_O), 
             add.cell.ids = c("WAT_M_Y", "WAT_M_O"),
             project = "male_wat")

male_wat@meta.data$type <- c(rep("male_young", ncol(WAT_M_Y)),
                        rep("male_old", ncol(WAT_M_O)))

show(male_wat)
male_wat <- NormalizeData(male_wat)
male_wat <- FindVariableFeatures(male_wat)
male_wat <- ScaleData(male_wat)
male_wat <- RunPCA(male_wat)
male_wat <- FindNeighbors(male_wat, dims = 1:30, reduction = "pca")
male_wat <- FindClusters(male_wat, resolution = 0.6, cluster.name = "unintegrated_clusters")
male_wat <- RunUMAP(male_wat, dims = 1:30, reduction = "pca", reduction.name = "umap.unintegrated")
DimPlot(male_wat, reduction = "umap.unintegrated", group.by = c("type", "seurat_clusters"))


male_wat <- IntegrateLayers(object = male_wat, method = CCAIntegration, orig.reduction = "pca", new.reduction = "integrated.cca",
                        verbose = FALSE)
# re-join layers after integration
male_wat[["RNA"]] <- JoinLayers(male_wat[["RNA"]])

male_wat <- FindNeighbors(male_wat, reduction = "integrated.cca", dims = 1:30)
male_wat <- FindClusters(male_wat, resolution = 1)
male_wat <- RunUMAP(male_wat, dims = 1:30, reduction = "integrated.cca")
View(male_wat@meta.data)
# Visualization
DimPlot(male_wat, reduction = "umap", group.by = c("type"))
wat_reference <- readRDS('~/Desktop/GSE137869/mouse_all_lite.rds')
wat_male.anchors <- FindTransferAnchors(reference = wat_reference, query = male_wat, dims = 1:30,
                                        reference.reduction = "cca")
scRNAseq • 237 views
ADD COMMENT
1
Entering edit mode

how can I see gene name in my Seurat data set

To view genes names, you can run following code-

rownames(male_wat)

ADD REPLY

Login before adding your answer.

Traffic: 1669 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6