Skip to content
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

read.newick freezes when reading newick text with one tip only #31

Closed
LunaSare opened this issue Oct 18, 2018 · 1 comment
Closed

read.newick freezes when reading newick text with one tip only #31

LunaSare opened this issue Oct 18, 2018 · 1 comment

Comments

@LunaSare
Copy link

I realize this is something that most users would have rarely encounter, since most of them would certainly know how their newick string looks like before trying to read it into R. And It wouldn't make any sense trying to read a phylogeny with one tip only.
However, I discovered this behaviour when I was trying to read a bunch of newick strings I have not looked before into R. They were generated with the rphylotastic package, which basically takes a vector of taxa and subsets trees from databases by matching those taxa. Sometime only one taxon is matched in the source tree, so the subset tree looks like the following:
"Ursus_americanus;"
Then, trying to read this into a phylo object with read.newick(text = "Ursus_americanus;" freezes R.
Not a big deal, just thought it might be useful to share that this is happening.

@LunaSare LunaSare changed the title read.newick freezes when reading newick text with one string only read.newick freezes when reading newick text with one tip only Oct 18, 2018
@liamrevell
Copy link
Owner

liamrevell commented Jul 11, 2023

Sorry! Perhaps ape::read.tree can handle this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants