Skip to content

Added root argument to Tree.newick(). - #510

Merged
jeromekelleher merged 2 commits into
tskit-dev:masterfrom
mcveanlab:newick-labels
Jun 13, 2018
Merged

jeromekelleher merged 2 commits into
tskit-dev:masterfrom
mcveanlab:newick-labels

Conversation

@jeromekelleher

Copy link
Copy Markdown
Member

Closes #487. Removes redundant time_scale argument.

Would you mind having a quick look over this please @hyanwong?

In particular, do you think it's correct that a newick tree with a single node should be rendered as "1;"?

@hyanwong

hyanwong commented Jun 8, 2018

Copy link
Copy Markdown
Member

I think there is no other way to represent a tree with one tip and no internal nodes. The only other possibility might be (1);, but if these are all rooted trees, I think that is a tree with a tip and one internal node between the tip and the root.

Also removed the time_scale argument (updating the mspms code to use
Ne = 1/4 instead.).

Closes tskit-dev#487.
@jeromekelleher

Copy link
Copy Markdown
Member Author

Also adds support for labels in newick output. @hyanwong, would you mind taking a quick look at the changes in msprime/trees.py in the diff and seeing if you agree with the interface and implementation? The idea is for it to be more-or-less the same as for tree.draw. I wimped out and implemented it in Python, as I figured that performance really doesn't matter here. This can be improved if needed.

Adding newick escapes should be an easy enough thing to do if needed (please feel free to open an issue / PR to do this).

Also updated verification.py to work with py3.
@jeromekelleher
jeromekelleher merged commit ffa2544 into tskit-dev:master Jun 13, 2018
@jeromekelleher
jeromekelleher deleted the newick-labels branch June 13, 2018 10:22
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

Successfully merging this pull request may close these issues.

2 participants