steineggerlab / foldmason

Multiple Protein Structure Alignment at Scale with FoldMason
https://search.foldseek.com/foldmason
GNU General Public License v3.0
122 stars 11 forks source link

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

Open parkjooyoung99 opened 5 days ago

parkjooyoung99 commented 5 days ago

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 commented 5 days ago

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

parkjooyoung99 commented 4 days ago

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 commented 4 days ago

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.