merenlab / anvio

An analysis and visualization platform for 'omics data
http://merenlab.org/software/anvio
GNU General Public License v3.0
413 stars 142 forks source link

Tree scale bar on Sidebar #2278

Closed metehaansever closed 21 hours ago

metehaansever commented 1 month ago

Do Not Merge

image

I was using same approach with Ete3 but I realize they have some problem with their calculation. Due to that, I open a issue to ETE to understand what is wrong with that calculation: https://github.com/etetoolkit/ete/issues/753

metehaansever commented 4 weeks ago

I'm looking for tools that produce the same scale bar results for the same newick tree. Below, I show visualization tools that perform correct rerooting for newick trees and have a scale bar(That doesn't mean they calculated scale bar correctly).

Tool Nodes Branches Default behavior Correct rerooting Scale bar
Archaeopteryx Nodes
ATV Branches
Dendroscope ✓a Dialoga ✓a
ETE (GUI) Branches
EvolView Branches
FigTree Both
iTOL Input dependent
PhyloWidget Nodes
TreeView Branches
T-REX Branches (✓)
APE ✓a Nodes ✓a
BioPerl Nodes
BioPython Nodes
Dendropy ✓a Nodes (✓)
ETE (API) Branches
Geneious (✓) Nodes
MEGA Branches
Mesquite Nodes
Newick Utilities ✓a Nodes ✓a
Pycogent/scikit-bio Branches

Here is my test Tree from our phylogenomic workflow:

(Prevotella_intermedia_19600:0.05650,Prevotella_denticola_19594:0.03030,(Prevotella_dentalis_19591:0.06281,(((Salmonella_enterica_21806:0.0,Salmonella_enterica_22289:0.0,Salmonella_enterica_22047:0.0):0.00138,(Escherichia_albertii_6917:0.00229,(Escherichia_coli_6920:0.0,Escherichia_coli_9038:0.0):0.00077)0.874:0.00864)1.000:0.87683,((Bacteroides_fragilis_2347:0.0,Bacteroides_fragilis_2346:0.0):0.00055,Bacteroides_fragilis_2334:0.00067)1.000:0.09888)0.996:0.06766)0.993:0.02687);

  1. For that tree ETE GUI returns 0.20 and ITOL's default value is always 1 for every tree.
  2. Evolview has same behaviour with ITOL but it starts from 0.1.
meren commented 4 weeks ago

This is excellent work, Mete! Thanks for evaluating other tools, as well.

One quick question. Does this bar here will change if people zoom-in or zoom-out?

image

If not, we can think of a way to ensure its relevance. For instance, when people click Draw it woudl appear, but if they zoom in or zoom out it would disappear and the div would be replaced with "Click Draw to See the Tree Scale" or something (removing the need to adjust it in real time to different levels of zoom behavior).

metehaansever commented 4 weeks ago

This is excellent work, Mete! Thanks for evaluating other tools, as well.

One quick question. Does this bar here will change if people zoom-in or zoom-out?

image

If not, we can think of a way to ensure its relevance. For instance, when people click Draw it woudl appear, but if they zoom in or zoom out it would disappear and the div would be replaced with "Click Draw to See the Tree Scale" or something (removing the need to adjust it in real time to different levels of zoom behavior).

I didn't add any interactive behavior to avoid breaking the zoom functionality of our chart, but your idea sounds great!