Commit 069373dc authored by Gervaise H. Henry's avatar Gervaise H. Henry 🤠

Replace heatmap code which was accidentally removed

parent 49153fc7
......@@ -160,21 +160,11 @@ DotPlot(sc10x.fmst,features=rev(c("DCN","MYL9")),dot.scale=10,cols=rev(heat.colo
dev.off()
singler.epi@listData$scores <- singler.epi@listData$scores[,c(1,2,4,3,5)]
plot <- plotScoreHeatmap(singler.epi,show.labels=FALSE,show.pruned=FALSE,annotation_col=labs.epi,cluster_rows=FALSE,annotation_colors=labs.epi.col)
postscript(paste0("./analysis/vis/diy/Corr_epi.eps"))
print(plot)
dev.off()
cor.epi <- as.matrix(singler.epi@listData$scores)
labs.fmst <- singler.fmst$labels
labs.fmst <- data.frame(Cell.Type=labs.fmst,row.names=rownames(singler.fmst))
labs.fmst$Cell.Type <- factor(labs.fmst$Cell.Type,levels=c("Fib","SM"))
labs.fmst.col <- list(
Cell.Type=c(Fib=hue_pal()(2)[1],SM=hue_pal()(2)[2])
)
plot <- plotScoreHeatmap(singler.fmst,show.labels=FALSE,show.pruned=FALSE,annotation_col=labs.fmst,cluster_rows=FALSE,annotation_colors=labs.fmst.col)
postscript(paste0("./analysis/vis/diy/Corr_fmst.eps"))
print(plot)
cor.epi <- cor.epi[order(sc10x.epi$`Cell Type`[match(singler.epi@rownames,names(sc10x.epi$`Cell Type`))]),]
cor.epi.ann <- columnAnnotation(Cell.Type=factor(sc10x.epi$`Cell Type`[match(singler.epi@rownames,names(sc10x.epi$`Cell Type`))][order(sc10x.epi$`Cell Type`[match(singler.epi@rownames,names(sc10x.epi$`Cell Type`))])],levels=c("BE","LE","Hillock","Club","NE")),col=list(Cell.Type=c("BE"=brewer.pal(n=5,name="Dark2")[1],"LE"=brewer.pal(n=5,name="Dark2")[2],"Hillock"=brewer.pal(n=5,name="Dark2")[3],"Club"=brewer.pal(n=5,name="Dark2")[4],"NE"=brewer.pal(n=5,name="Dark2")[5])))
postscript(paste0("./analysis/vis/diy/CorrCustom_epi.eps"))
Heatmap(scale(t(cor.epi)),name="Correlation Z-Score",cluster_rows=FALSE,cluster_columns=FALSE,col=rev(heat.colors(2)),top_annotation=cor.epi.ann,row_title="Human Epi Cell Types",column_title_side="bottom",column_title="Human Epi Cells")
dev.off()
cor.fmst <- as.matrix(singler.fmst@listData$scores)
......
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