[Bioperl-l] Converting newick to nexus

nylander Johan.Nylander at abc.se
Tue Sep 17 20:21:41 UTC 2013


Dear Jason,

Unfortunately, this issue is perhaps a bit more complicated than just
omitting the nexus header ('#NEXUS') after the first tree is printed. As
soungalo pointed out, both the header AND the translation table is repeated
for every tree. This makes the output file larger than (perhaps) necessary.

Optimally (and I think this is what soungalo wanted), the output should
contain only a single translation table, and all trees should be written to
the same tree block (cf. the output from phylogenetic MCMC software MrBayes,
PhyloBayes, etc). This is only possible if all trees contain the same tip
labels. Hence, all trees needs to be checked before the trees can be printed
in a single tree block. As implemented now, each translation table is
created by parsing the order of tip labels in each individual tree. This
makes sense if the trees might differ in size and/or labels. But again, if
we have many thousands of trees with the same set of tip labels, repeating
the translation table should be avoided.

I know that an efficient and "optimal" (see above) nexus tree writer is
wanted by many, but I'm unsure how much effort that is involved in order to
handle the multi tree issue.

Yours
Johan




--
View this message in context: http://bioperl.996286.n3.nabble.com/Converting-newick-to-nexus-tp17013p17153.html
Sent from the Bioperl-L mailing list archive at Nabble.com.



More information about the Bioperl-l mailing list