这是一个集成的函数,很多小伙伴被一些美图”迷了眼“,需要这样、那样的形式。单独做又很麻烦,且容易出错。要求既要这样展示,又要那样展示。所以我们直接做了一个集成的函数,完成一些美丽的可视化,尽力满足需求。这里要展示的单细胞marker基因平均表达量热图,按理来说有很多教程,可是有些小伙伴在热图注释、顺序调整、热图美化上面晕头转向,所以我们熬点夜解决这个问题。
参考:
https://www.bilibili.com/video/BV1w5mMYpE7B/?spm_id_from=333.999.0.0&vd_source=05b5479545ba945a8f5d7b2e7160ea34
ks_Singcellmean_heatmap(object = sce_cca,
marker_cluster = df_markers,
group.by = "celltype",
cellOrder = c("Myonuclei","NPCs","SMC","Tenocytes",
"Adipocytes","Endothelial","Macrophages",
"Mesenchymal","MuSCs","Myoblasts"),
cell_cols = c("#edc951","#8AAD05","#cc2a36","#4f372d","#00a0b0","#7A989A",
"#849271","#CF9546","#C67052","#C1AE8D"),
text_size=9,
gene_anno = F)
image.png
ks_Singcellmean_heatmap(object = sce_cca,
marker_cluster = df_markers,
group.by = "celltype",
cellOrder = c("Myonuclei","NPCs","SMC","Tenocytes",
"Adipocytes","Endothelial","Macrophages",
"Mesenchymal","MuSCs","Myoblasts"),
cell_cols = c("#edc951","#8AAD05","#cc2a36","#4f372d","#00a0b0","#7A989A",
"#849271","#CF9546","#C67052","#C1AE8D"),
text_size=9,
gene_anno = T)
image.png
ks_Singcellmean_heatmap(object = sce_cca,
marker_cluster = df_markers,
group.by = "celltype",
cellOrder = c("Myonuclei","NPCs","SMC","Tenocytes",
"Adipocytes","Endothelial","Macrophages",
"Mesenchymal","MuSCs","Myoblasts"),
cell_cols = c("#edc951","#8AAD05","#cc2a36","#4f372d","#00a0b0","#7A989A",
"#849271","#CF9546","#C67052","#C1AE8D"),
text_size=9,
direction="vertical",
gene_anno=F)
image.png
ks_Singcellmean_heatmap(object = sce_cca,
marker_cluster = df_markers,
group.by = "celltype",
cellOrder = c("Myonuclei","NPCs","SMC","Tenocytes",
"Adipocytes","Endothelial","Macrophages",
"Mesenchymal","MuSCs","Myoblasts"),
cell_cols = c("#edc951","#8AAD05","#cc2a36","#4f372d","#00a0b0","#7A989A",
"#849271","#CF9546","#C67052","#C1AE8D"),
text_size=9,
direction="vertical",
gene_anno=T)
image.png
网友评论