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

Fix human corr axes labels

parent a7e3307e
......@@ -106,7 +106,7 @@ cor.lin <- as.matrix(singler.lin@listData$scores)
cor.lin <- cor.lin[c(1:2,7:12,14,4,6,13,3,5),]
cor.lin.ann <- columnAnnotation(Cell.Lineage=factor(sc10x$`Cell Lineage`[match(singler.lin@rownames,sc10x$integrated_snn_res.0.5)][c(1:2,7:12,14,4,6,13,3,5)],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])))
postscript(paste0("./analysis/vis/diy/CorrCustom_lin.eps"))
Heatmap(scale(t(cor.lin)),name="Correlation Z-Score",cluster_rows=FALSE,cluster_columns=FALSE,col=rev(heat.colors(2)),top_annotation=cor.lin.ann,row_title="ImmGen Cell Types",column_title_side="bottom",column_title="Mouse Clusters")
Heatmap(scale(t(cor.lin)),name="Correlation Z-Score",cluster_rows=FALSE,cluster_columns=FALSE,col=rev(heat.colors(2)),top_annotation=cor.lin.ann,row_title="HPCA Cell Types",column_title_side="bottom",column_title="Human Prostate Clusters")
dev.off()
sc10x.epi$Phenotype <- sc10x.epi$samples
......@@ -183,7 +183,7 @@ cor.epi <- as.matrix(singler.epi@listData$scores)
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 Cell Types",column_title_side="bottom",column_title="Mouse Epi Clusters")
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()
labs.fmst <- singler.fmst$labels
......@@ -201,8 +201,8 @@ cor.fmst <- as.matrix(singler.fmst@listData$scores)
cor.fmst <- cor.fmst[order(sc10x.fmst$`Cell Type`[match(singler.fmst@rownames,names(sc10x.fmst$`Cell Type`))]),]
cor.fmst.ann <- columnAnnotation(Cell.Type=factor(sc10x.fmst$`Cell Type`[match(singler.fmst@rownames,names(sc10x.fmst$`Cell Type`))][order(sc10x.fmst$`Cell Type`[match(singler.fmst@rownames,names(sc10x.fmst$`Cell Type`))])],levels=c("Fib","SM")),col=list(Cell.Type=c("Fib"=brewer.pal(n=3,name="Dark2")[1],"SM"=brewer.pal(n=3,name="Dark2")[2])))
postscript(paste0("./analysis/vis/diy/CorrCustom_fmst.eps"))
Heatmap(scale(t(cor.fmst)),name="Correlation Z-Score",cluster_rows=FALSE,cluster_columns=FALSE,col=rev(heat.colors(2)),top_annotation=cor.fmst.ann,row_title="Human Cell Types",column_title_side="bottom",column_title="Mouse FMSt Clusters")
Heatmap(scale(t(cor.fmst)),name="Correlation Z-Score",cluster_rows=FALSE,cluster_columns=FALSE,col=rev(heat.colors(2)),top_annotation=cor.fmst.ann,row_title="Human FMSt Cell Types",column_title_side="bottom",column_title="Human FMSt Cells")
dev.off()
write.table(table(sc10x$`Cell Type`,sc10x$samples),file="./analysis/vis/diy/Table_pops.Samples.csv",sep=",",quote=FALSE,row.names=TRUE,col.names=NA)
write.table(table(sc10x$`Cell Type`,sc10x$Phenotype),file="./analysis/vis/diy/Table_pops.Phenotype.csv",sep=",",quote=FALSE,row.names=TRUE,col.names=NA)
\ No newline at end of file
write.table(table(sc10x$`Cell Type`,sc10x$Phenotype),file="./analysis/vis/diy/Table_pops.Phenotype.csv",sep=",",quote=FALSE,row.names=TRUE,col.names=NA)
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