We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ac7b51f commit fb972c8Copy full SHA for fb972c8
1 file changed
src/nexus/handlers/tree.py
@@ -27,7 +27,9 @@ def rooted(self):
27
28
@property
29
def newick_string(self):
30
+ # Find the string up to the first "(" which is not inside a comment ...
31
prefix = split_text_with_context(self, separators='(', brackets={'[': ']'})[0]
32
+ # ... the remainder of the line should be the newick representation of the tree:
33
return self[len(prefix):].strip()
34
35
0 commit comments