Skip to content
Snippets Groups Projects
Commit eac456ca authored by Gervaise Henry's avatar Gervaise Henry 🤠
Browse files

Fix sc_LineageSubClust.R

parent 41748578
No related merge requests found
......@@ -49,7 +49,7 @@ sc10x.Group.Epi <- SubsetData(object=sc10x.Group,ident.use="Epi")
sc10x.Group.St <- SubsetData(object=sc10x.Group,ident.use="St")
tryCatch({
sc10x.Group.UK <- SubsetData(object=sc10x.Group,ident.use="?")
},error={UK <- FALSE})
},error=function(e){UK <<- FALSE})
rm(sc10x.Group)
#re-detect variable genes in Epi + St subsets
......@@ -78,6 +78,7 @@ plot <- PCElbowPlot(object=sc10x.Group.St,num.pc=50)
plot <- plot+theme(axis.text.x=element_text(size=20),axis.text.y=element_text(size=20),axis.title.x=element_text(size=20),axis.title.y=element_text(size=20))
plot(plot)
dev.off()
if (UK==TRUE){
postscript(paste0("./analysis/",opt$g,"/qc/Plot_PCElbow.UK.eps"))
plot <- PCElbowPlot(object=sc10x.Group.UK,num.pc=50)
......@@ -113,11 +114,11 @@ if (UK==TRUE){
dev.off()
}
re-cluster at different resolutions and generate figures
#re-cluster at different resolutions and generate figures
if (UK==TRUE){
pops <- c("Epi","St","UK"){
pops <- c("Epi","St","UK")
} else {
pops <- c("Epi","St"){
pops <- c("Epi","St")
}
for (j in pops){
if (j=="Epi"){
......@@ -145,8 +146,7 @@ for (j in pops){
sc10x.Group.St <- sc10x.Group
} else {
sc10x.Group.UK <- sc10x.Group
}
}
}}
rm(pops)
rm(sc10x.Group)
rm(plot)
......@@ -154,7 +154,6 @@ rm(i)
rm(j)
#make generic variables of run specific variables
rm(UK)
rm(PC.Max)
opt.subclust <- opt
rm(opt)
......@@ -165,6 +164,7 @@ save(sc10x.Group.St,file=paste0("./analysis/sc10x.",Project.Name,".",opt.subclus
if (UK==TRUE){
save(sc10x.Group.UK,file=paste0("./analysis/sc10x.",Project.Name,".",opt.subclust$g,".UKSubcluster",sub.file,".Rda"))
}
rm(UK)
rm(sc10x.Group.Epi)
rm(sc10x.Group.St)
rm(sc10x.Group.UK)
......
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