veg / phylotree.js

Interactive viewer of phylogenetic trees
http://phylotree.hyphy.org
MIT License
169 stars 71 forks source link

Newick files without lengths should not be coerced to distances of 1 #440

Open gaurav opened 10 months ago

gaurav commented 10 months ago

In previous versions of phylotree.js, a Newick file without lengths was read as a Newick file without length. In the current version of phylotree.js, a Newick file without length is assumed to have a length of 1 at each edge. This is annoying in two ways:

  1. Phylogenies are incorrectly drawn to appear as if the length is 1, which could be misleading.
  2. It makes it harder for phylotree.js to be used in a phylogeny editor (as described in https://github.com/veg/phylotree.js/issues/438#issue-1852706062), since the Newick produced by a Phylotree instance isn't identical to the Newick passed to it.

Would it be possible to have an option for turning this off?

stevenweaver commented 10 months ago

Dear @gaurav,

Yes, I think having an option to turn that off is a good idea.

Best, Steven