biocore / biocore/empress

Support a "daylight" step for the unrooted layout algorithm

Open
#436 0 comments 0 reactions 0 assignees View on GitHub
feature request good first issue
Dominant language
JavaScript
Stars
56
Forks
32
PR merge metrics
No merged PRs in 30d

Description

Felsenstein 2004 has a chapter on tree layout which gives a few examples of tree layouts. One of these is the equal-angle algorithm which Empress (and [Gneiss](https://github.com/biocore/gneiss/blob/d83c4ef7e35c9eaef2c534dc3d00264183286af7/gneiss/plot/_dendrogram.py#L263), and PyCogent, ...) uses for unrooted layouts. This works pretty well, but it could be improved -- there are a few places in the moving pictures tree, for example, where there's unused space (so some of the branches could be angled outward a bit to separate them and take advantage of this space):

![image](https://user-images.githubusercontent.com/4177727/97388482-63e3cf80-1895-11eb-9b36-75858cfcd9e1.png)
![image](https://user-images.githubusercontent.com/4177727/97388574-9f7e9980-1895-11eb-8728-f7b57eb3e383.png)

Felsenstein describes the equal-daylight algorithm, an extension of the equal-angle algorithm that is apparently efficient and makes even prettier drawings. It doesn't seem like it would be really difficult to implement (... hopefully ...), so this might be a nice way to make the first layouts the user sees in Empress look even nicer.

(If having an extra step in the unrooted layout would be a problem for massive trees, we could probably make this optional, and/or detect the tree size and adjust accordingly.)

Contributor guide

Open the contributing guide

Research direction

Start by locating Empress's unrooted equal-angle layout implementation and compare it with the equal-daylight algorithm described by Felsenstein 2004 and the linked Gneiss implementation. Determine how the additional layout step should behave for large trees and whether it should be optional; done means unrooted trees use the new daylight layout without regressing existing drawings.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data-visualization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.