Dear all,
I would like to find a way to calculate the total branch lengths between all specified leaves from a newick file, and the first node common to them all.
I am grateful for ideas on how to do this. I hope this is clear enough.
Many thanks for your help.
KS.
Many thanks for your fast reply. Does it also work for a given, specific list of leaves and not the whole tree? Thanks.
Likely, there is no way to provide a list of nodes as a parameter. I would approach this via pruning the tree instance by splicing not-needed nodes out at first and computing the sum second. But I am not sure how well this will preserve the branches lengths (however that manual says it does with "-preserve_lengths => 1"). Hope this helps. You are welcome!