plotly / plotly/plotly.js

Adding a dendrogram to heatmaps

Aperta
#6,894 3 commenti 9 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

feature P3
Lingua principale
JavaScript
Stelle
18.3k
Fork
2k
Merge medio
2g 12h
PR unite (30g)
28

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia esaminando l’issue duplicata #1321 e gli esempi di pheatmap collegati per comprendere il comportamento richiesto del dendrogramma. L’issue non indica file, test o punti di ingresso, quindi prima dell’implementazione sono necessarie indicazioni da parte dei maintainer di plotly.js. Il lavoro sarebbe completo quando i dendrogrammi lato client potranno raggruppare le righe e le colonne della heatmap senza generazione da parte del backend.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
javascript
Ambito
data-visualization
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.