我们在采用monocle做细胞拟时序分析的时候,常常会不满意于原图的配色,而软件自带的配色是根据降维后分出的cell type进行颜色的分类的
plot_cell_trajectory(HSMM, color_by = "CellType")
那么我们可以通过
plot_cell_trajectory(HSMM, color_by = "CellType") + scale_color_manual(breaks = c("X", "Y", "Z"), values=c("darkblue", "darkred", "orange")) + theme(legend.position = "right")
#或者
plot_cell_trajectory(HSMM, color_by = "CellType") + geom_point(aes(size = Pseudotime , color = CellType)) + scale_color_manual(breaks = c("X", "Y", "Z"), values=c("darkblue", "darkred", "orange")) + theme(legend.position = "right")
来完成
参考:
https://github.com/cole-trapnell-lab/monocle-release/issues/139