phylotree.js icon indicating copy to clipboard operation
phylotree.js copied to clipboard

Create option to export selected subtree

Open stevenweaver opened this issue 7 years ago • 5 comments

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.

stevenweaver avatar Nov 25 '17 17:11 stevenweaver

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.

johaGL avatar Nov 20 '20 14:11 johaGL

Dear @johaGL,

Do you want to do it programmatically or via a user-action (menu)?

Best, Sergei

spond avatar Nov 20 '20 15:11 spond

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)

johaGL avatar Nov 23 '20 15:11 johaGL

Dear @johaGL,

Take a look at https://github.com/veg/phylotree.js/tree/master/examples/copy-newick

Best, Sergei

Nov-23-2020 13-27-03

spond avatar Nov 23 '20 18:11 spond

Great! Thank you very much @spond

johaGL avatar Nov 24 '20 15:11 johaGL