Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tree scale bar on Sidebar #2278

Merged
merged 24 commits into from
Jul 4, 2024
Merged

Tree scale bar on Sidebar #2278

merged 24 commits into from
Jul 4, 2024

Conversation

metehaansever
Copy link
Contributor

@metehaansever metehaansever commented Jun 3, 2024

Do Not Merge

  • Items scale bar
  • Layer scale bar (Dendogram)
  • Update export func with other modes
  • Polish the scale bar

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:
etetoolkit/ete#753

@metehaansever
Copy link
Contributor Author

metehaansever commented Jun 5, 2024

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
Copy link
Member

meren commented Jun 5, 2024

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
Copy link
Contributor Author

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!

@metehaansever metehaansever merged commit 5a0b11e into master Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants