Skip to content
Snippets Groups Projects
Commit a645e818 authored by Gervaise Henry's avatar Gervaise Henry :cowboy:
Browse files

Change lin ID to single mode

parent a8a133ff
Branches
Tags
2 merge requests!6Develop,!5Refactor
......@@ -104,10 +104,10 @@ if (opt$s == "hu"){
rm(lin)
}
#singler <- SingleR(sc10x.se,ref=ref,method="single",labels=labels,de.method="wilcox",BPPARAM=BiocParallel::MulticoreParam(workers=20))
#labs <- singler$labels
singler <- SingleR(sc10x.se,ref=ref,clusters=sc10x.se$integrated_snn_res.1,labels=labels,de.method="wilcox",BPPARAM=BiocParallel::MulticoreParam(workers=20))
labs <- singler$labels[match(sc10x.se$integrated_snn_res.1,singler@rownames)]
singler <- SingleR(sc10x.se,ref=ref,method="single",labels=labels,de.method="wilcox",BPPARAM=BiocParallel::MulticoreParam(workers=20))
labs <- singler$labels
#singler <- SingleR(sc10x.se,ref=ref,clusters=sc10x.se$integrated_snn_res.1,labels=labels,de.method="wilcox",BPPARAM=BiocParallel::MulticoreParam(workers=20))
#labs <- singler$labels[match(sc10x.se$integrated_snn_res.1,singler@rownames)]
sc10x$pop <- labs
labs.raw <- labs
labs[labs %in% c("Differentiating Basal","Proliferating Basal","Basal","Mesothelial","Alveolar Epithelial Type 2","Club","Alveolar Epithelial Type 1","Ciliated","Signaling Alveolar Epithelial Type 2","Proximal Basal","Neuroendocrine","Mucous","Ionocyte","Serous","Proximal Ciliated","Goblet")] <- "Epithelia"
......@@ -209,7 +209,7 @@ if (opt$o == "pr" && opt$s == "hu") {
singler.epi <- SingleR(sc10x.se.epi,ref=pop.epi,method="single",labels=pop.epi$label.fine,de.method="wilcox",BPPARAM=BiocParallel::MulticoreParam(workers=20))
sc10x.epi$pop <- singler.epi$labels
Idents(sc10x.epi) <- "pop"
sc10x[["pop"]][row.names(sc10x.epi[["pop"]])] <- sc10x.epi[["pop"]][,"pop"]
sc10x[["pop"]][row.names(sc10x.epi[["pop"]]),] <- sc10x.epi[["pop"]][,"pop"]
#DimPlot(sc10x.epi,group.by="pop",reduction="umap",label=TRUE,repel=TRUE)+theme(legend.position="none")
} else if (opt$o == "pr" && opt$s == "mu") {
sc10x.epi$pop <- sc10x.epi$lin
......@@ -218,7 +218,6 @@ if (opt$o == "pr" && opt$s == "hu") {
}
sc10x$pop <- sc10x$lin
sc10x$pop[names(sc10x.epi$pop)] <- sc10x.epi$pop
sc10x$pop[names(sc10x.leu$pop)] <- sc10x.leu$pop
#DimPlot(sc10x,group.by="pop",reduction="umap",label=TRUE,repel=TRUE)+theme(legend.position="none")
......
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