Commit ede95d6f authored by Gervaise Henry's avatar Gervaise Henry 🤠
Browse files

Fix cell ID recovery

parent 70c2fcd6
load("./genesets/scDWS.250.rda")
load("./genesets/cibersort.rda")
singler = CreateBigSingleRObject(GetAssayData(sc10x,assay="RNA"), annot = NULL, "PdPbPc_deep", min.genes = 0,
singler = CreateBigSingleRObject(GetAssayData(sc10x,assay="RNA"), annot = NULL, "huBl", min.genes = 0,
technology = "10X", species = "Human", citation = "",
ref.list = list(scDWS.250), normalize.gene.length = F, variable.genes = "de",
fine.tune = T, do.signatures = T, clusters = NULL, do.main.types = F,
reduce.file.size = T, numCores = SingleR.numCores)
reduce.file.size = T, numCores = 10)
# cells.epi <-names(singler$singler[[1]]$SingleR.single.main$labels[singler$singler[[1]]$SingleR.single.main$labels[,1]=="Epi",])
# cells.fmst <-names(singler$singler[[1]]$SingleR.single.main$labels[singler$singler[[1]]$SingleR.single.main$labels[,1]=="FMSt",])
......@@ -13,19 +13,19 @@ singler = CreateBigSingleRObject(GetAssayData(sc10x,assay="RNA"), annot = NULL,
# cells.st <- c(cells.fmst,cells.endo)
# cells.leu <-names(singler$singler[[1]]$SingleR.single.main$labels[singler$singler[[1]]$SingleR.single.main$labels[,1]=="Leu",])
cells.be <-names(singler$singler[[1]]$SingleR.single$labels[singler$singler[[1]]$SingleR.single$labels[,1]=="BE",])
cells.le <-names(singler$singler[[1]]$SingleR.single$labels[singler$singler[[1]]$SingleR.single$labels[,1]=="LE",])
cells.hillock <-names(singler$singler[[1]]$SingleR.single$labels[singler$singler[[1]]$SingleR.single$labels[,1]=="Hillock",])
cells.club <-names(singler$singler[[1]]$SingleR.single$labels[singler$singler[[1]]$SingleR.single$labels[,1]=="Club",])
cells.ne <-names(singler$singler[[1]]$SingleR.single$labels[singler$singler[[1]]$SingleR.single$labels[,1]=="NE",])
cells.fib <-names(singler$singler[[1]]$SingleR.single$labels[singler$singler[[1]]$SingleR.single$labels[,1]=="Fib",])
cells.sm <-names(singler$singler[[1]]$SingleR.single$labels[singler$singler[[1]]$SingleR.single$labels[,1]=="SM",])
cells.endo <-names(singler$singler[[1]]$SingleR.single$labels[singler$singler[[1]]$SingleR.single$labels[,1]=="Endo",])
cells.be <-names(singler$singler[[1]]$SingleR.single$labels[singler$singler[[1]]$SingleR.single$labels=="BE"])
cells.le <-names(singler$singler[[1]]$SingleR.single$labels[singler$singler[[1]]$SingleR.single$labels=="LE"])
cells.hillock <-names(singler$singler[[1]]$SingleR.single$labels[singler$singler[[1]]$SingleR.single$labels=="Hillock"])
cells.club <-names(singler$singler[[1]]$SingleR.single$labels[singler$singler[[1]]$SingleR.single$labels=="Club"])
cells.ne <-names(singler$singler[[1]]$SingleR.single$labels[singler$singler[[1]]$SingleR.single$labels=="NE"])
cells.fib <-names(singler$singler[[1]]$SingleR.single$labels[singler$singler[[1]]$SingleR.single$labels=="Fib"])
cells.sm <-names(singler$singler[[1]]$SingleR.single$labels[singler$singler[[1]]$SingleR.single$labels=="SM"])
cells.endo <-names(singler$singler[[1]]$SingleR.single$labels[singler$singler[[1]]$SingleR.single$labels=="Endo"])
cells.epi <- c(cells.be,cells.le,cells.hillock,cells.club,cells.ne)
cells.fmst <- c(cells.fib,cells.sm)
cells.st <- c(cells.fmst,cells.endo)
cells.leu <- names(singler$singler[[1]]$SingleR.single$labels[singler$singler[[1]]$SingleR.single$labels[,1]=="Leu",])
cells.leu <- names(singler$singler[[1]]$SingleR.single$labels[singler$singler[[1]]$SingleR.single$labels=="Leu"])
Idents(sc10x,cells=cells.epi) <- "Epi"
Idents(sc10x,cells=cells.fmst) <- "FMSt"
......@@ -94,7 +94,7 @@ for (i in c("epi","fmst","st","leu")){
dev.off()
}
singler.leu = CreateBigSingleRObject(GetAssayData(sc10x.leu,assay="RNA"), annot = NULL, "PdPbPc_deep", min.genes = 0,
singler.leu = CreateSinglerObject(GetAssayData(sc10x.leu,assay="RNA"), annot = NULL, "huBl", min.genes = 0,
technology = "10X", species = "Human", citation = "",
ref.list = list(cibersort), normalize.gene.length = F, variable.genes = "de",
fine.tune = T, do.signatures = T, clusters = NULL, do.main.types = T,
......@@ -112,11 +112,7 @@ postscript(paste0("./analysis/vis/singler/UMAP_leu.eps"))
print(plot)
dev.off()
Idents(sc10x,cells=cells.be) <- "BE"
Idents(sc10x,cells=cells.le) <- "LE"
Idents(sc10x,cells=cells.hillock) <- "Hillock"
Idents(sc10x,cells=cells.club) <- "Club"
Idents(sc10x,cells=cells.ne) <- "NE"
Idents(sc10x,cells=cells.epi) <- "Epi"
Idents(sc10x,cells=cells.fib) <- "Fib"
Idents(sc10x,cells=cells.sm) <- "SM"
Idents(sc10x,cells=cells.endo) <- "Endo"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment