Commit 672e8547 authored by Gervaise Henry's avatar Gervaise Henry 🤠
Browse files

Update run script for musAdPrF

parent 8194e9b0
......@@ -27,9 +27,9 @@ scFolders()
sc10x <- scLoad(p=project.name,cellranger=3,ref="mm10")
lg=500
hg=3000
hm=0.05
lg=250
hg=2000
hm=0.1
results <- scQC(sc10x,lg=lg,hg=hg,hm=hm,sub=FALSE,sp="mu")
sc10x <- results[[1]]
counts.cell.raw <- results[[2]]
......@@ -41,53 +41,53 @@ rm(lg)
rm(hg)
rm(hm)
results <- scCellCycle(sc10x,sub=FALSE,sp="mu")
sc10x <- results[[1]]
genes.s <- results[[2]]
genes.g2m <- results[[3]]
rm(results)
# results <- scCellCycle(sc10x,sub=FALSE,sp="mu")
# sc10x <- results[[1]]
# genes.s <- results[[2]]
# genes.g2m <- results[[3]]
# rm(results)
sc10x.l <- list()
sc10x.l[["Pd"]] <- subset(sc10x,subset= Donor=="Donor")
sc10x.l[["Pb"]] <- subset(sc10x,subset= BPH=="BPH")
sc10x.l[["Pc"]] <- subset(sc10x,subset= Cancer=="Cancer")
sc10x.l[["mu1"]] <- subset(sc10x,subset= samples=="musAd001_PrF")
sc10x.l[["mu2"]] <- subset(sc10x,subset= samples=="musAd002_PrF")
sc10x.l[["mu3"]] <- subset(sc10x,subset= samples=="musAd003_PrF_St")
sc10x <- scCCA(sc10x.l)
rm(sc10x.l)
sc10x@project.name <- project.name
#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)
#gc()
# 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)
# gc()
results <- scPC(sc10x,pc=50,hpc=0.9,file="pre.stress",print="2",cca=TRUE)
sc10x <- results[[1]]
pc.use.prestress <- results[[2]]
rm(results)
sc10x <- scCluster(sc10x,res=0.5,red="pca",dim=pc.use.prestress,print="2",folder="pre.stress")
# sc10x <- scCluster(sc10x,res=0.5,red="pca",dim=pc.use.prestress,print="2",folder="pre.stress")
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"
# 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"
results <- scScore(sc10x,score="Stress",geneset=as.list(genes.stress),cut.pt=0.75,anchor=c("EGR1","FOS","JUN"))
sc10x.preStress <- results[[1]]
sc10x <- results[[2]]
rm(results)
# results <- scScore(sc10x,score="Stress",geneset=as.list(genes.stress),cut.pt=0.75,anchor=c("EGR1","FOS","JUN"))
# sc10x.preStress <- results[[1]]
# sc10x <- results[[2]]
# rm(results)
#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)
#gc()
# 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)
# gc()
results <- scPC(sc10x,pc=50,hpc=0.9,file="post.stress",print="2",cca=TRUE)
sc10x <- results[[1]]
pc.use.poststress <- results[[2]]
rm(results)
# results <- scPC(sc10x,pc=50,hpc=0.9,file="post.stress",print="2",cca=TRUE)
# sc10x <- results[[1]]
# pc.use.poststress <- results[[2]]
# rm(results)
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")
sc10x <- scCluster(sc10x,res=res,red="pca",dim=pc.use.prestress,print="2",folder="ALL")
save(sc10x,file=paste0("./analysis/sc10x.raw.rda"))
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