tskit-dev / tsconvert

Utilities for converting tree sequences to and from other formats
MIT License
7 stars 6 forks source link

Require semicolon for newick? #50

Open hyanwong opened 1 year ago

hyanwong commented 1 year ago

I just did this:

tsconvert.from_newick("../results/extstrain_ncov_gisaid_global_all-time_timetree-2021-05-09.nwk"

And it took me a while to realise that this was imported as a tree with one node called ../results/extstrain_ncov_gisaid_global_all-time_timetree-2021-05-09.nwk! Perhaps this is a good reason to require the semicolon at the end of the newick string?

jeromekelleher commented 1 year ago

Pros and cons either direction I guess.

benjeffery commented 1 year ago

We're using python-newick for parsing (currently...) so prob best to stick to their requirements? No point in failing lots of newicks in the wild for this as it is not a subtle failure.