auspice icon indicating copy to clipboard operation
auspice copied to clipboard

Unrooted layout struggles with polytomies

Open sidneymbell opened this issue 2 years ago • 2 comments

Current Behavior

image image

Expected behavior

The current layout code for calculating the (x,y) coordinates for the unrooted layout is deterministic, and doesn't include any sort of offset for showing multiple samples in the same place on the tree. This is particularly pronounced when the root is a large polytomy, I think because the current code doesn't draw / display the root at all.

Possible solution

A few ideas:

  1. As a first step, concatenating or staggering the sample names in the label would at least help indicate that there are multiple samples there
  2. Scale the size of the sample dot according to how many samples it represents
  3. Calculate coordinates of a "box" around the node and insert a small swarmplot to show each sample separately

Additional context

I'm also trying to create a nice layout for unrooted trees with lots of polytomies -- would love to collaborate on this!

sidneymbell avatar Jun 10 '22 19:06 sidneymbell

Thanks @sidneymbell -- I think solution 1 (perhaps in conjunction with no. 2?) is the best. We could explore changing the angle tip names are drawn at, essentially fanning them out around that node. This will also be relevant for scatterplots where nodes can be located at the same position.

jameshadfield avatar Jun 30 '22 00:06 jameshadfield

#1423 is prerequisite for this issue (I think)

jameshadfield avatar Jun 30 '22 00:06 jameshadfield