Commit af3ad249 authored by Gervaise H. Henry's avatar Gervaise H. Henry 🤠

Add hupop figs to mus diy

parent 266a45c8
......@@ -27,12 +27,10 @@ module unload R/3.5.1-gccmkl
module load R/3.6.1-gccmkl
if [[ "$1" == "PdPgb" ]] || [[ "$1" == "PdPb" ]]
then
# Rscript ../r.scripts/SingleR.R --p "$1" --s "$2" --o "$3"
echo 1
elif [ "$3" == "epi" || "$3" == "fmst" ]
Rscript ../r.scripts/SingleR.R --p "$1" --s "$2" --o "$3"
elif [[ "$3" == "epi" ]] || [["$3" == "fmst" ]]
then
# Rscript ../r.scripts/huPr_muPr.R --p "$1" --r "$3"
echo 2
Rscript ../r.scripts/huPr_muPr.R --p "$1" --r "$3"
fi
module unload R/3.5.1-gccmkl
......
......@@ -44,22 +44,6 @@ postscript(paste0("./analysis/vis/diy/UMAP_lin.split.eps"))
DimPlot(sc10x,split.by="Region")+scale_color_viridis(discrete=TRUE,option="magma")+theme_cowplot()
dev.off()
labs.lin <- singler.lin$labels
labs.lin <- replace(labs.lin,labs.lin=="Epithelial cells","Epi")
labs.lin <- replace(labs.lin,labs.lin %in% c("Stromal cells","Fibroblasts"),"FMSt")
labs.lin <- replace(labs.lin,labs.lin == "Endothelial cells","Endo")
labs.lin <- replace(labs.lin,labs.lin %in% c("Macrophages","Monocytes","B cells","DC","Eosinophils","Neutrophils","T cells","ILC","NK cells","Basophils","Mast cells","Tgd","NKT","B cells, pro","Microglia"),"Leu")
labs.lin <- data.frame(Cell.Lineage=labs.lin,row.names=rownames(singler.lin))
labs.lin$Cell.Lineage <- factor(labs.lin$Cell.Lineage,levels=c("Epi","FMSt","Endo","Leu"))
labs.lin.col =list(
Cell.Lineage=c(Epi=magma(4)[1],FMSt=magma(4)[2],Endo=magma(4)[3],Leu=magma(4)[4])
)
singler.lin@listData$scores <- singler.lin@listData$scores[,c(14,7,5,9,10,16,12,3,11,2,1,4,8,13,15,6)]
plot <- plotScoreHeatmap(singler.lin,show.labels=FALSE,show.pruned=FALSE,annotation_col=labs.lin,cluster_rows=FALSE,annotation_colors=labs.lin.col,cells.order= as.integer(c(1,2,3,4,5,16,14,8,9,10,15,13,12,7,11,6)))
postscript(paste0("./analysis/vis/diy/Corr_lin.eps"))
print(plot)
dev.off()
cor.lin <- as.matrix(singler.lin@listData$scores)
cor.lin <- cor.lin[c(1:5,8:10,13:18,20:21,19,12,7,11,6,22),]
cor.lin.ann <- columnAnnotation(Cell.Lineage=factor(c(rep("Epi",16),rep("FMSt",2),"Endo",rep("Leu",3)),levels=c("Epi","FMSt","Endo","Leu")),col=list(Cell.Lineage=c("Epi"=magma(4)[1],"FMSt"=magma(4)[2],"Endo"=magma(4)[3],"Leu"=magma(4)[4])))
......@@ -119,19 +103,6 @@ postscript(paste0("./analysis/vis/diy/UMAP_epi.split.ur.eps"))
DimPlot(sc10x.epi.ur)+scale_color_brewer(palette="Dark2")+theme_cowplot()
dev.off()
labs.epi <- data.frame(ID=singler.epi$labels,`Cell Type`=c("APr LE","BE","Ur","VPr LE","ED","DLPr LE"),row.names=rownames(singler.epi))
labs.epi$ID <- factor(labs.epi$ID,levels=c("BE","Ur","LE"))
labs.epi.col =list(
ID=c(BE="brown4",Ur="brown3",LE="brown2"),
Cell.Type=c(BE=viridis(6)[1],Ur=viridis(6)[2],`VPr LE`=viridis(6)[3],`DLPr LE`=viridis(6)[4],`APr LE`=viridis(6)[5],ED=viridis(6)[6])
)
labs.epi$Cell.Type <- factor(labs.epi$Cell.Type,levels=c("BE","Ur","VPr LE","DLPr LE","APr LE","ED"))
singler.epi@listData$scores <- singler.epi@listData$scores[,c(1,3,2)]
plot <- plotScoreHeatmap(singler.epi,show.labels=FALSE,show.pruned=FALSE,annotation_col=labs.epi,cluster_rows=FALSE,annotation_colors=labs.epi.col,cells.order= as.integer(c(5,1,2,3,6,4)))
postscript(paste0("./analysis/vis/diy/Corr_epi.eps"))
print(plot)
dev.off()
cor.epi <- as.matrix(singler.epi@listData$scores)
cor.epi <- cor.epi[c(2,3,4,6,1,5),]
cor.epi.ann <- columnAnnotation(Cell.Type=factor(c("BE","Ur","VP LE","DLP LE","AP LE","ED"),levels=c("BE","Ur","VP LE","DLP LE","AP LE","ED")),col=list(ID=c("BE"="brown3","Ur"="brown2","LE"="brown1"),Cell.Type=c("BE"=brewer.pal(n=6,name="Dark2")[1],"Ur"=brewer.pal(n=6,name="Dark2")[2],"VP LE"=brewer.pal(n=6,name="Dark2")[3],"DLP LE"=brewer.pal(n=6,name="Dark2")[4],"AP LE"=brewer.pal(n=6,name="Dark2")[5],"ED"=brewer.pal(n=6,name="Dark2")[6])))
......@@ -151,6 +122,18 @@ postscript(paste0("./analysis/vis/diy/Dot_epi.sc.eps"))
DotPlot(sc10x.epi,features=rev(c("Svs2","Krt8","Cd24a","Dpp4","Pbsn","Msmb","Sbp","Tgm4","Trp63","Krt5","Krt4","Ly6d","Psca","Tacstd2","Ly6e","Ly6a","Prom1")),dot.scale=10,cols=rev(heat.colors(2)))
dev.off()
sc10x.epi$`Cell ID` <- factor(sc10x.epi$hu_pops,levels=c("BE","Ur","LE"))
Idents(sc10x.epi) <- "Cell ID"
postscript(paste0("./analysis/vis/diy/UMAP_epi_hupop.eps"))
DimPlot(sc10x.epi)+theme_cowplot()
dev.off()
postscript(paste0("./analysis/vis/diy/UMAP_epi_hupop.split.eps"))
DimPlot(sc10x.epi,split.by="Region")+theme_cowplot()
dev.off()
postscript(paste0("./analysis/vis/diy/Dot_epi_hupop.anchor.eps"))
DotPlot(sc10x.epi,features=rev(c("Krt5","Trp63","Psca","Krt4","Pbsn","Msmb")),dot.scale=10,cols=rev(heat.colors(2)))
dev.off()
deg.lin <- FindAllMarkers(sc10x,assay="SCT",slot="data",logfc.threshold=0,test.use="MAST",only.pos=TRUE)
deg.epi <- FindAllMarkers(sc10x.epi,assay="SCT",slot="data",logfc.threshold=0,test.use="MAST",only.pos=TRUE)
......
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