phyloref / klados

A curation tool to edit test cases for the Phyloref curation workflow
http://www.phyloref.org/klados/
MIT License
2 stars 1 forks source link

Add "Simplify phylogeny" button to simplify trees (especially Open Tree of Life induced subtree) #241

Open gaurav opened 2 years ago

gaurav commented 2 years ago

Open Tree of Life induced subtrees (as added by #40) include a large number of internal nodes that only have a single child, which can make visualizing the phylogeny complicated. However, we can't just delete all such internal nodes when importing a phylogeny from the Open Tree of Life as they might be useful -- for example, one of these nodes might be a specifier. As far as I know, there's no setting on the Open Tree /tree_of_life/induced_subtree API call to control this.

We could add a "Remove internal nodes with only a single child" button to the phylogeny view, which would ignore internal nodes that are used as specifiers. We could also go further and add a "Simplify phylogeny" button that removes all phylogeny nodes except specifiers and their parents. Alternatively, we could decide that this is too much complexity for Klados and leave it up to the user to use an external tool to clean up their phylogenies in any way they choose.

hlapp commented 2 years ago

It seems reasonable and also useful to a Simplify phylogeny option that removes internal nodes that only have one child and whose label does not match any of the specifiers.

I think that's neither of the alternatives you present but an amalgamation of them. Does this make sense, though?