Commit 4387f699 authored by Gervaise H. Henry's avatar Gervaise H. Henry 🤠

Calculate UMAP for epi and st sub

parent c1200b07
......@@ -13,20 +13,38 @@ source("./r.scripts/sc-TissueMapper_functions.R")
source("./r.scripts/sc-TissueMapper_process.R")
load("./analysis/sc10x.Rda")
load("./analysis/sc10x.Epi.Rda")
load("./analysis/sc10x.St.Rda")
try(
if (as.numeric(substring(sc10x@version,1,1))<3){
sc10x <- UpdateSeuratObject(sc10x)
sc10x.Epi <- UpdateSeuratObject(sc10x.Epi)
sc10x.St <- UpdateSeuratObject(sc10x.St)
}
)
sc10x <- RunUMAP(sc10x,dims=1:30,reduction="cca.aligned")
sc10x.Epi <- RunUMAP(sc10x.Epi,dims=1:30,reduction="cca.aligned")
sc10x.St <- RunUMAP(sc10x.St,dims=1:30,reduction="cca.aligned")
Idents(object=sc10x) <- "Merge_Epi.dws_St.go_NE"
Idents(object=sc10x.Epi) <- "Epi.dws.sub_NE"
Idents(object=sc10x.St) <- "St.go"
sc10x <- RenameIdents(object=sc10x, "OE1" = "Club")
sc10x <- RenameIdents(object=sc10x, "OE2" = "Hillock")
sc10x.Epi <- RenameIdents(object=sc10x.Epi, "OE1" = "Club")
sc10x.Epi <- RenameIdents(object=sc10x.Epi, "OE2" = "Hillock")
postscript(paste0("./analysis/UMAP.aggr.eps"))
DimPlot(sc10x,reduction="umap",label=FALSE,order=rev(c("BE","LE","Hillock","Club","NE","Fib","SM","Endo","Leu")),cols=rev(c(brewer.pal(5,"Reds")[2:5],"grey50",brewer.pal(5,"Blues")[2:5])))
dev.off()
postscript(paste0("./analysis/UMAP.epi.eps"))
DimPlot(sc10x.Epi,reduction="umap",label=FALSE,order=rev(c("BE","LE","Hillock","Club","NE")),cols=rev(c("grey50",brewer.pal(5,"Blues")[2:5])))
dev.off()
postscript(paste0("./analysis/UMAP.st.eps"))
DimPlot(sc10x.St,reduction="umap",label=FALSE,order=rev(c("Fib","SM","Endo","Leu")),cols=rev(c(brewer.pal(5,"Reds")[2:5])))
dev.off()
write.table(Embeddings(object = sc10x, reduction = "umap"),file=paste0("./analysis/UMAP.aggr.csv"),row.names=TRUE,col.names=NA,append=FALSE,sep=",")
write.table(Embeddings(object = sc10x.Epi, reduction = "umap"),file=paste0("./analysis/UMAP.epi.csv"),row.names=TRUE,col.names=NA,append=FALSE,sep=",")
write.table(Embeddings(object = sc10x.St, reduction = "umap"),file=paste0("./analysis/UMAP.st.csv"),row.names=TRUE,col.names=NA,append=FALSE,sep=",")
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