r - 如何在 Seurat 的 DoHeatmap 图中重新排序单元格(ggplot2)
问题描述
我正在用 R 中的 Seurat 绘制热图
require(Seurat)
data <- data.frame(cell1=c(-0.5, 0.5), cell2=c(-0.8, 0.3), cell3=c(2.0, 0.1), cell4=c(1.0, 1.0))
rownames(data) <- c("gene1", "gene2")
test <- CreateSeuratObject(data)
test@scale.data <- data
DoHeatmap(test)
这就是我得到的
我想在这里用自定义顺序重新排序单元格。我试过DoHeatmap(test, data.use=<reordered data>)
然后p <- DoHeatmap(…, plot=FALSE)
重新排序p$data
,但无济于事
解决方案
推荐阅读
- response - Apache Bench“每个请求的时间”随着并发性的增加而减少
- css - 用于专注于按钮的 Css 覆盖
- cordova - 错误:JDK 1.8 或更高版本的要求检查失败。我使用的是 java 16.0
- javascript - Firestore onSnapshot() 返回 null
- wordpress - 所有页面/编号的Wordpress 5重定向
- arrays - 将 CSV 文件读入结构的动态数组 C
- g1gc - 为什么 G1GC 中的 XX:G1HeapRegionSize 必须是 2 的幂?
- reactjs - 在 React 中如何创建一个组件,该组件可以获取 HTML 元素属性并在作为道具传递给子元素之前对其进行调整
- angular - AWS Cognito 电子邮件验证和登录
- r - R中的Highcharts:为组织结构图中的链接添加标签