Commit c1200b07 authored by Gervaise Henry's avatar Gervaise Henry 🤠

Add code for calculating UMAP on pre-analized Pd

parent 672e8547
###RUN TO START
gc()
library(methods)
library(optparse)
library(Seurat)
library(RColorBrewer)
library(viridis)
options(bitmapType="cairo")
setwd("../")
source("./r.scripts/sc-TissueMapper_functions.R")
source("./r.scripts/sc-TissueMapper_process.R")
load("./analysis/sc10x.Rda")
try(
if (as.numeric(substring(sc10x@version,1,1))<3){
sc10x <- UpdateSeuratObject(sc10x)
}
)
sc10x <- RunUMAP(sc10x,dims=1:30,reduction="cca.aligned")
Idents(object=sc10x) <- "Merge_Epi.dws_St.go_NE"
sc10x <- RenameIdents(object=sc10x, "OE1" = "Club")
sc10x <- RenameIdents(object=sc10x, "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()
write.table(Embeddings(object = sc10x, reduction = "umap"),file=paste0("./analysis/UMAP.aggr.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