[Bioperl-l] root node branch length in newick trees written incorrectly
Dave Messina
David.Messina at sbc.su.se
Thu Apr 1 12:41:23 UTC 2010
Hi everyone,
It seems that TreeIO::newick might not be properly writing root nodes which have a branch length — it omits the colon.
e.g.
If you read in
(a:1,b:2):0.0;
It will be written out as
(a:1,b:2)0.0;
And in the latter case, 0.0 now looks like a node id, causing strict interpreters of newick (like PAML) to complain.
Crazy for the root to have a branch length, you say? Apparently it's a matter of taste — RAxML and TreeAlign do it, and according to the newick spec it's legit.*
I just filed a bug report (http://bugzilla.open-bio.org/show_bug.cgi?id=3039) with a patch and a test.
But I'm not sure I understand the code that well,though; could another dev or two take a look before I commit?
Thanks,
Dave
* See the example at the bottom of http://evolution.genetics.washington.edu/phylip/newick_doc.html
More information about the Bioperl-l
mailing list