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

Newick Tree file unable to open in Python or R (Malformed structure) #13

Open
parkjooyoung99 opened this issue Oct 14, 2024 · 3 comments

Comments

@parkjooyoung99
Copy link

parkjooyoung99 commented Oct 14, 2024

Expected Behavior

Using python code below, I tried to open nw file generated with ' foldmason easy-msa'
from ete3 import Tree
tree = Tree("/Users/xx/Documents/xx_project/Rotation1/Patho/xx/MSTA/result.nw")

Current Behavior

However, it is unable to open my file with the error below:
NewickError: Unexisting tree file or Malformed newick tree structure. You may want to check other newick loading flags like 'format' or 'quoted_node_names'.

Steps to Reproduce (for bugs)

Download my nw file
Run above python code
result.nw.zip

@gamcil
Copy link
Collaborator

gamcil commented Oct 15, 2024

Can you try adding a semicolon to the end of the tree and see if this fixes the issue?

@parkjooyoung99
Copy link
Author

parkjooyoung99 commented Oct 15, 2024

It worked, Thanks!!

Would it be possible to update the code to automatically add ; at the end of the result nw?? Also, it might be great if tree can be also saved as pdf as a result of the code :)

@gamcil gamcil closed this as completed Oct 16, 2024
@gamcil gamcil reopened this Oct 16, 2024
@gamcil
Copy link
Collaborator

gamcil commented Oct 16, 2024

I can definitely add the semicolon to the output guide tree. For PDF potentially this could be added as part of the webserver output but I think ETE is still probably the better option there.

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