Commit aaebc0ef authored by Gervaise Henry's avatar Gervaise Henry 🤠
Browse files

Change number of PC's to calculate in ID subclust based on cell #

parent da792c49
......@@ -78,35 +78,70 @@ sc10x.leu <- subset(sc10x, idents="Leu")
res <- c(seq(0.1,0.5,0.1),0.75,seq(1,5,1))
results <- scPC(sc10x.epi,pc=1000,hpc=0.9,file="epi",print="2")
if (ncol(sc10x.epi) > 1000) {
pc.calc.epi <- 1000
} else if (ncol(sc10x.epi) > 500 {
pc.calc.epi <- 500
} else if (ncol(sc10x.epi) > 100 {
pc.calc.epi <- ncol(sc10x.epi)-1
}
results <- scPC(sc10x.epi,pc=pc.calc.epi,hpc=0.9,file="epi",print="2")
sc10x.epi <- results[[1]]
pc.use.epi <- results[[2]]
rm(results)
sc10x.epi <- scCluster(sc10x.epi,res=res,red="pca",dim=pc.use.epi,print="2",folder="epi")
#DimPlot(sc10x.epi,group.by="integrated_snn_res.0.1",reduction="umap",label=TRUE,repel=TRUE)+theme(legend.position="none")
results <- scPC(sc10x.fmst,pc=1000,hpc=0.9,file="fmst",print="2")
if (ncol(sc10x.fmst) > 1000) {
pc.calc.fmst <- 1000
} else if (ncol(sc10x.fmst) > 500 {
pc.calc.fmst <- 500
} else if (ncol(sc10x.fmst) > 100 {
pc.calc.fmst <- ncol(sc10x.fmst)-1
}
results <- scPC(sc10x.fmst,pc=pc.calc.fmst,hpc=0.9,file="fmst",print="2")
sc10x.fmst <- results[[1]]
pc.use.fmst <- results[[2]]
rm(results)
sc10x.fmst <- scCluster(sc10x.fmst,res=res,red="pca",dim=pc.use.fmst,print="2",folder="fmst")
#DimPlot(sc10x.fmst,group.by="integrated_snn_res.0.1",reduction="umap",label=TRUE,repel=TRUE)+theme(legend.position="none")
results <- scPC(sc10x.fib,pc=1000,hpc=0.9,file="all",print="2")
if (ncol(sc10x.fib) > 1000) {
pc.calc.fib <- 1000
} else if (ncol(sc10x.fib) > 500 {
pc.calc.fib <- 500
} else if (ncol(sc10x.fib) > 100 {
pc.calc.fib <- ncol(sc10x.fib)-1
}
results <- scPC(sc10x.fib,pc=pc.calc.fib,hpc=0.9,file="all",print="2")
sc10x.fib <- results[[1]]
pc.use.fib <- results[[2]]
rm(results)
sc10x.fib <- scCluster(sc10x.fib,res=res,red="pca",dim=pc.use.fib,print="2",folder="fib")
#DimPlot(sc10x.fib,group.by="integrated_snn_res.0.1",reduction="umap",label=TRUE,repel=TRUE)+theme(legend.position="none")
results <- scPC(sc10x.sm,pc=1000,hpc=0.9,file="sm",print="2")
if (ncol(sc10x.sm) > 1000) {
pc.calc.sm <- 1000
} else if (ncol(sc10x.sm) > 500 {
pc.calc.sm <- 500
} else if (ncol(sc10x.sm) > 100 {
pc.calc.sm <- ncol(sc10x.sm)-1
}
results <- scPC(sc10x.sm,pc=pc.calc.sm,hpc=0.9,file="sm",print="2")
sc10x.sm <- results[[1]]
pc.use.sm <- results[[2]]
rm(results)
sc10x.sm <- scCluster(sc10x.sm,res=res,red="pca",dim=pc.use.sm,print="2",folder="sm")
#DimPlot(sc10x.sm,group.by="integrated_snn_res.0.1",reduction="umap",label=TRUE,repel=TRUE)+theme(legend.position="none")
results <- scPC(sc10x.leu,pc=1000,hpc=0.9,file="leu",print="2")
if (ncol(sc10x.leu) > 1000) {
pc.calc.leu <- 1000
} else if (ncol(sc10x.leu) > 500 {
pc.calc.leu <- 500
} else if (ncol(sc10x.leu) > 100 {
pc.calc.leu <- ncol(sc10x.leu)-1
}
results <- scPC(sc10x.leu,pc=pc.calc.leu,hpc=0.9,file="leu",print="2")
sc10x.leu <- results[[1]]
pc.use.leu <- results[[2]]
rm(results)
......
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