Hi everyone,
I have a star-tree (a non-tree - it is just once central node with x number of tips) in .newick with no branch lengths, and a simulated DNA alignment in .fasta format that I would like to use to add branch lengths to the tree.
I do not want to test the fit of the alignment to the tree, or look for better trees, I just want to obtain branch lengths.
Does anyone know a simple way to do this?
Basically I have simulated DNA evolution over the star-tree to explore branch-attraction events. In making a figure to show what I have done, I want to add proper branch lengths to the star tree to show that they are not all uniform in length (gamma distribution was involved, so there should be a distribution of lengths).
Thank you for your help.
Easiest way I can thing off the top of my head would be either to use a regex to insert a list of branch lengths, or ‘unfold’ the tree and paste the values in. Treating them as plan text files is probably the quickest.
Otherwise you can probably do this with ETE or dendropy (don’t have any practical code examples for you though right now).