Commit 23afe24b authored by Gervaise Henry's avatar Gervaise Henry 🤠
Browse files

Update QuSAGE including leu ID with cybersort

parent b5f7d29a
source("./r.scripts/sc-TissueMapper_functions.R")
source("./r.scripts/sc-TissueMapper_process.R")
# 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)
......@@ -91,10 +93,27 @@ names(gene.set.leu.lin)[1:12] <- "Lymphoid"
names(gene.set.leu.lin)[13:22] <- "Myeloid"
gene.set.lym <- gene.set[9:20]
# names(gene.set.lym)[1:2] <- "B cells"
# names(gene.set.lym)[3] <- "Plasma cells"
# names(gene.set.lym)[3] <- "CD8 T cells"
# names(gene.set.lym)[5:9] <- "CD4 T cells"
# names(gene.set.lym)[10] <- "Gamma delta T cells"
gene.set.myl <- gene.set[21:30]
# names(gene.set.lym)[1:4] <- "Monocytes and Macrophages"
# names(gene.set.lym)[5:6] <- "Dendritic cells"
# names(gene.set.lym)[7:8] <- "Mast cells"
# names(gene.set.lym)[9] <- "Eosinophil"
# names(gene.set.lym)[10] <- "Neutrophil"
rm(gene.set1)
results <- scQuSAGE(sc10x,gs=gene.set,save=TRUE,type="lg",id="integrated_snn_res.5",ds=0,nm="ALL",print="2")
sc10x <- results[[1]]
results.cor.lin <- results[[2]]
results.clust.lin.id <- results[[3]]
rm(results)
results <- scQuSAGE(sc10x,gs=gene.set.lin,save=TRUE,type="lg",id="integrated_snn_res.0.1",ds=0,nm="lin",print="2")
sc10x <- results[[1]]
results.cor.lin <- results[[2]]
......@@ -105,26 +124,25 @@ sc10x.epi <- scSubset(sc10x,i="lin","Epi")
sc10x.st <- scSubset(sc10x,i="lin","St")
sc10x.leu <- scSubset(sc10x,i="lin","Leu")
results <- scPC(sc10x.epi,pc=50,hpc=0.9,file="epi",print="2",cca=TRUE)
results <- scPC(sc10x.epi,pc=100,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")
results <- scPC(sc10x.st,pc=50,hpc=0.9,file="st",print="2",cca=TRUE)
results <- scPC(sc10x.st,pc=100,hpc=0.9,file="st",print="2")
sc10x.st <- results[[1]]
pc.use.st <- results[[2]]
rm(results)
sc10x.st <- scCluster(sc10x.st,res=res,red="pca",dim=pc.use.st,print="2",folder="st")
results <- scPC(sc10x.leu,pc=50,hpc=0.9,file="leu",print="2",cca=TRUE)
results <- scPC(sc10x.leu,pc=100,hpc=0.9,file="leu",print="2")
sc10x.leu <- results[[1]]
pc.use.leu <- results[[2]]
rm(results)
sc10x.leu <- scCluster(sc10x.leu,res=res,red="pca",dim=pc.use.leu,print="2",folder="leu.lin")
#min <- min(table(sc10x$integrated_snn_res.1))
results <- scQuSAGE(sc10x.epi,gs=gene.set.epi,save=TRUE,type="lg",id="integrated_snn_res.1",ds=0,nm="epi",print="2")
results <- scQuSAGE(sc10x.epi,gs=gene.set.epi,save=TRUE,type="lg",id="integrated_snn_res.0.5",ds=0,nm="epi",print="2")
sc10x.epi <- results[[1]]
results.cor.epi <- results[[2]]
results.clust.epi.id <- results[[3]]
......@@ -136,7 +154,7 @@ results.cor.st <- results[[2]]
results.clust.st.id <- results[[3]]
rm(results)
results <- scQuSAGE(sc10x.leu,gs=gene.set.leu.lin,save=TRUE,type="lg",id="integrated_snn_res.0.2",ds=0,nm="leu.lin",print="2")
results <- scQuSAGE(sc10x.leu,gs=gene.set.leu.lin,save=TRUE,type="lg",id="integrated_snn_res.0.5",ds=0,nm="leu.lin",print="2")
sc10x.leu.lin <- results[[1]]
results.cor.leu.lin <- results[[2]]
results.clust.leu.lin.id <- results[[3]]
......@@ -145,25 +163,25 @@ rm(results)
sc10x.lym <- scSubset(sc10x.leu.lin,i="leu.lin","Lymphoid")
sc10x.myl <- scSubset(sc10x.leu.lin,i="leu.lin","Myeloid")
results <- scPC(sc10x.lym,pc=50,hpc=0.9,file="lym",print="2",cca=TRUE)
results <- scPC(sc10x.lym,pc=100,hpc=0.9,file="lym",print="2")
sc10x.lym <- results[[1]]
pc.use.lym <- results[[2]]
rm(results)
sc10x.lym <- scCluster(sc10x.lym,res=res,red="pca",dim=pc.use.lym,print="2",folder="lym")
results <- scPC(sc10x.myl,pc=50,hpc=0.9,file="myl",print="2",cca=TRUE)
results <- scPC(sc10x.myl,pc=100,hpc=0.9,file="myl",print="2")
sc10x.myl <- results[[1]]
pc.use.myl <- results[[2]]
rm(results)
sc10x.myl <- scCluster(sc10x.myl,res=res,red="pca",dim=pc.use.myl,print="2",folder="myl")
results <- scQuSAGE(sc10x.lym,gs=gene.set.lym,save=TRUE,type="lg",id="integrated_snn_res.0.5",ds=0,nm="lym",print="2")
results <- scQuSAGE(sc10x.lym,gs=gene.set.lym,save=TRUE,type="lg",id="integrated_snn_res.1",ds=0,nm="lym",print="2")
sc10x.lym <- results[[1]]
results.cor.lym <- results[[2]]
results.clust.lym.id <- results[[3]]
rm(results)
results <- scQuSAGE(sc10x.myl,gs=gene.set.myl,save=TRUE,type="lg",id="integrated_snn_res.0.5",ds=0,nm="myl",print="2")
results <- scQuSAGE(sc10x.myl,gs=gene.set.myl,save=TRUE,type="sm",id="integrated_snn_res.1",ds=0,nm="myl",print="2")
sc10x.myl <- results[[1]]
results.cor.myl <- results[[2]]
results.clust.myl.id <- results[[3]]
......
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