Skip to content

Commit c92329c

Browse files
committed
'to_nexus()' emits basically compliant Nexus
1 parent 6b4d127 commit c92329c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

python/tskit/trees.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -5149,8 +5149,9 @@ def to_nexus(self, precision=14):
51495149

51505150
s = "#NEXUS\n"
51515151
s += "BEGIN TAXA;\n"
5152+
s += "DIMENSIONS NTAX={};".format(len(node_labels))
51525153
s += "TAXLABELS "
5153-
s += ",".join(node_labels[node.id] for node in self.nodes()) + ";\n"
5154+
s += " ".join(node_labels[node.id] for node in self.nodes()) + ";\n"
51545155
s += "END;\n"
51555156

51565157
s += "BEGIN TREES;\n"

0 commit comments

Comments
 (0)