-
Notifications
You must be signed in to change notification settings - Fork 79
Description
At the moment, draw_svg() spaces apart mutations evenly on a branch. Now that we have introduced mutation times we should really use the time value (if defined) to place mutations on branches when drawing trees.
This would be easy, apart from the fact that there may be mutations above the root. In this case, we need to scale the tree so that, rather than a fixed root branch length (which is a hack anyway), the tree height is given by the oldest mutation above the root node. When plotting a whole tree sequence, we need to find the oldest of these values. Unfortunately, this is not quite as easy as finding max(ts.tables.mutations.time), because I think we can have valid mutations that are not above any node on any tree. We previously hit this issue for node times, and solved it by defining a ts.max_root_time property. I wonder if we now need a ts.max_mutation_time property too?