biocore/empress

Support adjusting scale factors of the tree

Open

#409 opened on Oct 6, 2020

 (2 comments) (0 reactions) (0 assignees)JavaScript (32 forks)auto 404
feature requestgood first issue

Repository metrics

Stars
 (56 stars)
PR merge metrics
 (PR metrics pending)

Description

From talking with @kwcantrell about this recently (IIRC), I don't think the actual 4020 x 4020 width x height values matter given how the Empress drawer works -- what matters is the ratio between them (so setting e.g. 4020 x 2010 will make the plot wider than it is tall, the opposite will make the plot taller than it is wide, etc.)

I think this should only? make a difference for the rectangular layout, since it'll allow us to stretch out the vertical distance between tips. The current distance is pretty small, so when ultrametric trees are used (like the Qemistree example in Fig. 2B)...

image

... The tips look kind of like a blob.

Setting the width to 1005 (so the ratio is now 1005 x 4020, aka 1 x 4) makes the tree look a lot prettier:

image

Steps required for this, I think:

  • Change the (default) width/height from 4020 x 4020 to 1 x 1, so it's easier for users to understand
  • Create UI elements that allow user to change these values (should be in layout options) -- maybe changing them auto-relayouts the tree, or there's an update button (idk)
  • have side panel? detect when the ratio values change and update these as Empress.js attributes
  • add tests with different ratios I guess

Contributor guide