empress
empress copied to clipboard
Extend clade collapsing to include the entire root node
We discussed this briefly during this morning's meeting. Clade collapsing currently works by drawing the root node, and then creating a collapsed clade shape extending downwards from the bottom of the root node: notice, e.g., the long magenta horizontal line followed by a short triangle at 3 o'clock in the screenshot below:
It should be possible to extend the "height" of the clade shape to start instead from the parent of the root. In the rectangular layout this means starting at the parent's x-coordinate (depth in the tree) but the root's y-coordinate, in the circular layout this means starting at the parent's radius but the root's angle, and in the unrooted layout I think this just means starting at the parent node entirely.
Here is what a prototype of this functionality looks like, applied to the same dataset in the same layout:
It's subjective, but I think this provides a slightly more intuitive way of looking at things.
This functionality is in this branch (it would require some finagling before merging it in, since node circle drawing and clade clicking both have not been updated to reflect how clades are now drawn) -- if we agree that working on this would be worthwhile, this would be a good thing to have in for the paper's figures.
@fedarko iirc we decided to keep clade collapsing as it currently is because iTol/other views do the same correct?
@kwcantrell It looks like many tools handle collapsing similarly to how we currently handle it, yeah (i.e. they draw the root of the collapsed clade and then draw the collapsed clade shape below that, rather than including the root in the collapsed clade shape). Like, I just spent a few minutes going through google results for "collapsed phylogenetic tree" and pretty much all of the results I've seen draw the root first. Honestly this was surprising to me, since I think the proposed way looks a bit nicer in some cases, but I guess that means this isn't a very high-priority issue.
I do think it would be nice to have this as a configurable option for clade collapsing (in addition to the symmetric vs. asymmetric stuff), though.