plotly / plotly/plotly.js

Adding a dendrogram to heatmaps

未关闭
#6,894 3 条评论 9 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

feature P3
主要语言
JavaScript
星标
18.3k
派生
2k
平均合并
2 天 12 小时
30 天内合并 PR
28

描述

I know there is a duplicate issue, but it looks like that isn't being watched anymore and I'll add a little more detail here.

Duplicate issue: https://github.com/plotly/plotly.js/issues/1321

In many bioinformatics applications, heatmaps are made and need to be grouped on some factor relevant to each column in the heatmap. For example, you may have a heatmap where the columns are the samples and the rows are number of molecules A, B, C, and D found in each sample. Each sample is categorized as either female or male. In a normal heatmap, you would not be able to visualize the differences in numbers of molecules between male and female since they are randomly placed left to right. So, you add a dendrogram to sort the samples into similar groups based on the data used to generate the heatmap.

Since many bioinformaticians use R, they will use a package like pheatmap to create a heatmap with the dendrograms on both the x and y axes. This blog post shows a good example in a bioinformatics context. I am copying the image over for easy access:

image

I would like to have this in plotly js since I am creating a web application to visualize some bioinformatics data. Without the dengrogram, a lot of these plots are meaningless. I could create the plots on the backend and have the front end access them, but that is not as performant as moving the logic over to the front end. In the duplicate issue, there are references to dash_bios clustergram function, but that still requires the plot to be generated on the back end in cases when the front end is written in a javascript framework such as react.

To get this to work, we will need some sort of dendrogram creating tool. I did a cursory search and did not find anything; however, I am not really sure how this is implemented in python either. If someone has more knowledge, I would be interested to hear about it. I would be willing to commit some code to help implement it, but would need guidance from folks more familiar with plotly.js internals and dendrogram calculations.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先查看重复的 issue #1321 和链接的 pheatmap 示例,以了解所请求的树状图行为。该 issue 未提及任何文件、测试或入口点,因此在实现之前需要 plotly.js 维护者提供指导。完成的标准是客户端树状图能够在不由后端生成的情况下对热图的行和列进行分组。

由索引模型根据 Issue 内容生成。

评估

技术栈
javascript
领域
data-visualization
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。