ape has a function(read.tree) that can read Newick and New Hampshire tree formats, and, according to the help, that function tries to correctly represent trees with a badly represented root edge (i.e. with an extra pair of parentheses).
On Sat, Apr 12, 2025 at 3:35 PM '[email protected]' via Morphmet <[email protected]> wrote: > The Newick format is an elegant format to describe phylogenetic trees but > there are simpler formats (e.g., Rohlf, 1975, The Computer Journal and used > in NTSYSpc) that are easier for humans to encode larger phylogenetic trees > correctly. The Newick format was not as much of a problem back in 1986 when > software usually dealt with much smaller trees. Perhaps someone should > write a little conversion procedure for R. > > *F. James Rohlf * > Distinguished Professor, Emeritus and Research Professor > Depts: Anthropology and Ecology & Evolution > Stony Brook University > > On 4/12/2025 3:38:47 AM, Anneke van Heteren <[email protected]> > wrote: > Dear all, > > It turned out to be a superfluous bracket pair that made MorphoJ think > there was a branch length missing. > Many thanks to Chris for his help! > > Kind regards, > > Anneke > > Op za 12 apr 2025 om 14:33 schreef Anneke van Heteren < > [email protected]>: > >> Dear all, >> >> special thanks to Donald and Miriam, who sent me suggestions off-list. >> Unfortunately, nothing they said convinced MorphoJ either. >> >> I tried to compare an old newick string that I successfully imported in >> MorphoJ in the past (A below) and the updated newick string I would like to >> use now as part of a Nexus-file (B below). >> https://itol.embl.de/upload.cgi accepts both and gives me trees that >> look correct. http://phylogeny.lirmm.fr/phylo_cgi/data_converter.cgi, >> however, is only able to convert A into a Nexus-file. It gives an error for >> B: "*Error:* Invalid Newick format!". I do not understand what is >> invalid about B, since https://itol.embl.de/upload.cgi can read it >> without problems. I tried asking a LLM to identify any syntax differences >> between the two strings and it told me that the syntax per se (i.e., >> conforming to the Newick format rules) is accurate for both. So, something >> is going on with B that does not bother https://itol.embl.de/upload.cgi, >> and cannot be identified, neither by me nor by LLM, but clearly is an issue >> for both MorphoJ and >> http://phylogeny.lirmm.fr/phylo_cgi/data_converter.cgi. >> >> If anybody has any ideas, I would be very grateful! >> >> All the best, >> >> Anneke >> >> >> A: >> (Ame:21.8,(Tor:14.5,((Uam:5.7,(Uth:3.3,(Usp:1.2,(Uma:1.0,Uar:1.0):0.2):2.1):2.4):0.0,(Hma:1.0,Mur:1.0):4.7):8.8):7.3); >> >> B: >> (Ame:21.8,((Tor:10.6,((Umi:0.0,((Uth:4.4,(Hma:3.6,Mur:3.6):0.8):0.6,(Uam:3.4,(Usp:1.2,((Uarf:0.0,Uar:0.4):0.5,Uma:0.9):0.3):2.2):1.6):0.0):5.6)):11.2); >> >> Op vr 11 apr 2025 om 19:34 schreef Anneke van Heteren < >> [email protected]>: >> >>> Dear friends and colleagues, >>> >>> I am stuck on how to convince MorphoJ that it should weigh my phylogeny >>> by branch lengths when applying "map onto phylogeny". I have pasted my >>> phylogeny below for your information. As far as I can tell, all branches >>> have a length and when I copy this phylogeny into >>> https://itol.embl.de/upload.cgi, it looks exactly how I want it to be. >>> Initially, I thought zero branch lengths might be the problem, but >>> giving those an artificial length does not change anything; weighting by >>> branch lengths remains greyed out/inactivated. >>> I would very much appreciate any suggestions on how to fix this. >>> Thanks in advance. >>> >>> Best wishes, >>> >>> Anneke >>> >>> >>> (Ame:21.8,((Tor:10.6,((Umi:5.0,((Uth:4.4,(Hma:3.6,Mur:3.6):0.8):0.6,(Uam:3.4,(Usp:1.2,((Uarf:0.4,Uar:0.4):0.5,Uma:0.9):0.3):2.2):1.6):0.0):5.6)):11.2); >>> >> -- > You received this message because you are subscribed to the Google Groups > "Morphmet" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion visit > https://groups.google.com/d/msgid/morphmet2/CAOZfLYoo0oUT0xQE-RLtbj6rchg7GQZVXYEtgejY9PcQr%2BD05Q%40mail.gmail.com > <https://groups.google.com/d/msgid/morphmet2/CAOZfLYoo0oUT0xQE-RLtbj6rchg7GQZVXYEtgejY9PcQr%2BD05Q%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > > -- > You received this message because you are subscribed to the Google Groups > "Morphmet" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion visit > https://groups.google.com/d/msgid/morphmet2/Mailbird-ec616cea-c678-44e2-a58c-9f93b08d3b46%40stonybrook.edu > <https://groups.google.com/d/msgid/morphmet2/Mailbird-ec616cea-c678-44e2-a58c-9f93b08d3b46%40stonybrook.edu?utm_medium=email&utm_source=footer> > . > -- Miriam Zelditch Associate Research Scientist Museum of Paleontology University of Michigan Ann Arbor, MI 48109-1079 cell: 734-353-1671 phone: 734-764-0489 fax: 734-936-1380 -- You received this message because you are subscribed to the Google Groups "Morphmet" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/morphmet2/CA%2BxQ-HSt%3DJJUNpAy7HX5ujvcozw9tcqYDEDdVc7SL7JW7nP51Q%40mail.gmail.com.
