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

Don't crash when newick file has node labels #72

Open
AdmiralenOla opened this issue Jan 24, 2019 · 2 comments
Open

Don't crash when newick file has node labels #72

AdmiralenOla opened this issue Jan 24, 2019 · 2 comments
Assignees
Labels
Milestone

Comments

@AdmiralenOla
Copy link
Owner

Should be fairly simple to allow internal node labels in the newick file. Although this does not impact results, there is no reason for the program to crash.

@AdmiralenOla AdmiralenOla added this to the 1.6.17 milestone Jan 24, 2019
@AdmiralenOla AdmiralenOla self-assigned this Jan 24, 2019
@smb20200615
Copy link

has this issue been resolved? is there a way to fix it?

@AdmiralenOla
Copy link
Owner Author

Unfortunately the issue has not been resolved.

The easiest workaround I can think of is opening your tree in Figtree and then just export your tree without labels.

Another workaround is using the ape package in R:

library(ape)
mytree <- read.tree("MyTree.nwk")
mytree$node.label <- NULL
write.tree(mytree, file="MyTreeNoLabel.nwk")

You should also be able to do it with something like sed. (The following should at least work if your labels are strictly letters, numbers and underscore, but if they have other characters it will likely mess up).

sed -r 's/\)([.0-9A-Za-z_]+):/\):/g' MyTree.nwk > MyTreeNoLabel.nwk

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

No branches or pull requests

2 participants