biocore / empress

A fast and scalable phylogenetic tree viewer for microbiome data analysis
BSD 3-Clause "New" or "Revised" License
45 stars 31 forks source link

Show text labels alongside tips #503

Open neptuneyt opened 3 years ago

neptuneyt commented 3 years ago

Dear empress team, Thanks for your hard work with empress. My issue is how to show tip lable name on the tree plot, just like: image Thanks a lot!

fedarko commented 3 years ago

Thanks for the diagram @neptuneyt! This makes a lot of sense, and would be a very useful feature to support.

I do not think EMPress' drawing code has much support built in for text yet, although from some brief reading (1, 2) it seems like it should be possible to get around this by overlaying the text on top of the Canvas. I'm not sure how easy this would be, though.

neptuneyt commented 3 years ago

Thank you for your patience. The reason I did this is because I want to place the corresponding heatmap on the right according to the name of the tree on the left (an example below). It can hardly use the built-in add-layer function of empress to do this because of several hundred of them. To achieve this goal, do you have any good suggestions? image

fedarko commented 3 years ago

I don't think adding over hundreds of barplot layers is feasible in EMPress right now, sorry; it might become more doable when we add support for automatically modifying the state of the EMPress application as part of #131. This may make it possible to automatically generate hundreds of barplot layers in a visualization in a configuration file and then upload that configuration file to EMPress, without having to manually click through things hundreds of times... but until that time I don't think there is a good way in EMPress to handle this.

For now, I think iTOL, ggtree, or other tree viewers might be better at automatically visualizing hundreds of barplot layers at once as you've described.

neptuneyt commented 3 years ago

Thanks a lot!