CSE512-15S / fp-tdurham-ajh24-chiasson-ningli30

EPICViz - http://cse512-15s.github.io/fp-tdurham-ajh24-chiasson-ningli30/
0 stars 3 forks source link

Scale branch lengths to match division time points in lineage #4

Open andrewhill157 opened 9 years ago

andrewhill157 commented 9 years ago

Currently all branches in the tree with equal depth have equal length. This should not be the case, as they should reflect cell division times. This will involve:

  1. Calculating division times and creating a scale factor
  2. Scaling y values for both links and nodes in lineages accordingly in a way that doesn't mess up page appearance.
tdurham86 commented 9 years ago

I added a new attribute to the cell metadata stored in cellmap. Now each element of cellmap contains a property called 'lifespan', which is an integer indicating how many time points in our data contain that cell. It may be useful in setting branch lengths. I also found the following thread that might help us with this issue:

https://github.com/mbostock/d3/issues/213

It references a project that generates a phylogenetic tree with variable branch lengths (http://www.jasondavies.com/tree-of-life/) by customizing the xy coordinates in the layout. An important difference is that this project uses a cluster layout instead of a tree layout, but a similar strategy may work with the tree layout. Or we could try generating the tree using the cluster layout.