-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(Some) large trees fail in ape 5.5 #14
Comments
Yes, your tree is correct, but ape has difficulties handling it because some quoted labels include a semicolon which I'm working on a solution that will work for all trees. |
Thank you! I have personal experience with funny characters in names, so you have my full understanding! :-) I'll continue with 5.4 for the time being. /D |
I found a solution that should please everybody. I pushed it here, so you can install version 5.5-1. If you prefer to test it without re-installing the whole package, you can do these three commands from R: source("https://raw.githubusercontent.com/emmanuelparadis/ape/master/R/read.tree.R")
.treeBuild <- ape:::.treeBuild
.cladoBuild <- ape:::.cladoBuild The last two lines are because these two functions are not exported by ape. I'll check the code again later. |
OK. I tried to install 5.5-1 with After executing your code, with 5.4 loaded, In any case, 5.4 works fine for me, so I'll wait until there's an official 5.5-1 released. Thanks for looking at this so quick! /D |
I made another small modification which should fix the last problems. Here's an example to illustrate the behaviour of
This is read as: > tr <- read.tree("tr.tre")
> tr
Phylogenetic tree with 2 tips and 1 internal nodes.
Tip labels:
ab, '; : ()'
Node labels:
'[:;(")]'
Rooted; includes branch lengths.
> tr$tip.label
[1] "ab" "'; : ()'"
> tr$node.label
[1] "'[:;(\")]'" To summarize:
For the moment, double quotes (or other fancy quotes) are not considered as quoting labels. |
After updating from ape 5.4 to 5.5 the
read.tree
function fails on large trees (e.g. the attached) with the following message:I have checked the tree, and parentheses are balanced.
Some time ago, I reduced a tree that failed and at some point
read.tree
managed to read it, which is why I think it has to do with size.Downgrading ape to 5.4 solves the issue.
gtdbtk.ar122.classify.tree.gz
The text was updated successfully, but these errors were encountered: