Commit 196cb978 authored by Gervaise Henry's avatar Gervaise Henry 🤠
Browse files

Fix saves

parent 5742d25e
......@@ -20,9 +20,11 @@ setwd("../")
source("./r.scripts/sc-TissueMapper_functions.R")
source("./r.scripts/sc-TissueMapper_process.R")
project.name="PdPbPc"
scFolders()
sc10x <- scLoad(p="Pd")
sc10x <- scLoad(p=project.name)
results <- scQC(sc10x,lg=500,hg=2500,hm=0.1,sub=FALSE)
sc10x <- results[[1]]
......@@ -41,8 +43,6 @@ genes.s <- results[[2]]
genes.g2m <- results[[3]]
rm(results)
save.image(file="./analysis/Data.cc.RData")
sc10x.l <- list()
sc10x.l[["D17"]] <- subset(sc10x,subset= D17=="D17")
sc10x.l[["D27"]] <- subset(sc10x,subset= D27=="D27")
......@@ -51,8 +51,6 @@ sc10x.l[["D35"]] <- subset(sc10x,subset= D35=="D35")
sc10x <- scCCA(sc10x.l)
rm(sc10x.l)
save.image(file="./analysis/Data.cca.RData")
#gc()
sc10x <- ScaleData(object=sc10x,vars.to.regress=c("nFeature_RNA","percent.mito","S.Score","G2M.Score"),do.par=TRUE,num.cores=45,verbose=FALSE)
#sc10x <- ScaleData(object=sc10x,vars.to.regress=c("nFeature_RNA","percent.mito"),do.par=TRUE,num.cores=45,verbose=FALSE)
......@@ -63,12 +61,8 @@ sc10x <- results[[1]]
pc.use.prestress <- results[[2]]
rm(results)
save.image(file="./analysis/Data.prestresspc.RData")
sc10x <- scCluster(sc10x,res=0.5,red="pca",dim=pc.use.prestress,print="2",folder="pre.stress")
save.image(file="./analysis/Data.prestresscluster.RData")
genes.stress <- read_delim("./genesets/genes.deg.Stress.csv",",",escape_double=FALSE,trim_ws=TRUE,col_names=TRUE)
genes.stress <- genes.stress[1]
colnames(genes.stress) <- "scDWS.Stress"
......@@ -78,8 +72,6 @@ sc10x.preStress <- results[[1]]
sc10x <- results[[2]]
rm(results)
save.image(file="./analysis/Data.stress.RData")
#gc()
sc10x <- ScaleData(object=sc10x,vars.to.regress=c("nFeature_RNA","percent.mito","S.Score","G2M.Score"),do.par=TRUE,num.cores=45,verbose=FALSE)
#sc10x <- ScaleData(object=sc10x,vars.to.regress=c("nFeature_RNA","percent.mito"),do.par=TRUE,num.cores=45,verbose=FALSE)
......@@ -90,13 +82,9 @@ sc10x <- results[[1]]
pc.use.poststress <- results[[2]]
rm(results)
save.image(file="./analysis/Data.poststresspc.RData")
res <- c(seq(0.1,0.5,0.1),0.75,seq(1,5,1))
sc10x <- scCluster(sc10x,res=res,red="pca",dim=pc.use.poststress,print="2",folder="ALL")
save.image(file="./analysis/Data.poststresscluster.RData")
# gene.set1 <- read_delim("./genesets/DEG_Epi_5FC.txt","\t",escape_double=FALSE,trim_ws=TRUE,col_names=FALSE)
# gene.set1 <- as.list(gene.set1)
# names(gene.set1) <- "Epi"
......@@ -185,4 +173,7 @@ sc10x <- results[[1]]
results.cor.all.pops <- results[[2]]
results.clust.all.pops.id <- results[[3]]
rm(results)
rm(gene.set)
\ No newline at end of file
rm(gene.set)
save(sc0x,file=paste0("./analysis/",project.name,".RData"))
save.image(file="./analysis/Data.RData")
\ No newline at end of file
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