phylotree.js
phylotree.js copied to clipboard
Create option to export selected subtree
If an entire subtree is selected, we should provide the option to export the subtree's newick string. It would be helpful when trying to report on specific parts of the phylogeny.
Hello @stevenweaver , we are working in models in evolution and your colleague spond has already helped us with some very interesting functionalities. In addition, we would like to know if there exists already a ways to export a selected subtree in newick format.
Dear @johaGL,
Do you want to do it programmatically or via a user-action (menu)?
Best, Sergei
Dear @spond, thank you very much (sorry for always asking additional things), in our simple app we dynamically add textareas as information is available (with appendChild ... insertBefore.) https://github.com/johaGL/front_o_bpp/blob/master/static/resphyloapp.js , we would like just to retreive the subtree selected by means of your button "select all descendant", in the form of a newick string format (if possible with branches lengths recalculated, but if not we can recalculate programmatically as well)
Dear @johaGL,
Take a look at https://github.com/veg/phylotree.js/tree/master/examples/copy-newick
Best, Sergei
Great! Thank you very much @spond