neherlab / treetime

Maximum likelihood inference of time stamped phylogenies and ancestral reconstruction
MIT License
225 stars 55 forks source link

match the taxon names in the tree error #101

Closed r0sies closed 4 years ago

r0sies commented 4 years ago

Hi,

I'm wondering if you could please help with this error:

Attempting to parse dates...
    Using column 'name' as name. This needs match the taxon names in the tree!!
    Using column 'date' as date.

0.00    -TreeAnc: set-up

Traceback (most recent call last):
  File "/usr/local/python/3.6.5/bin/treetime", line 12, in <module>
    return_code = params.func(params)
  File "/usr/local/python/3.6.5/lib/python3.6/site-packages/treetime/argument_parser.py", line 213, in toplevel
    timetree(params)
  File "/usr/local/python/3.6.5/lib/python3.6/site-packages/treetime/wrappers.py", line 517, in timetree
    verbose=params.verbose, fill_overhangs=not params.keep_overhangs)
  File "/usr/local/python/3.6.5/lib/python3.6/site-packages/treetime/treetime.py", line 34, in __init__
    super(TreeTime, self).__init__(*args, **kwargs)
  File "/usr/local/python/3.6.5/lib/python3.6/site-packages/treetime/clock_tree.py", line 83, in __init__
    self._assign_dates()
  File "/usr/local/python/3.6.5/lib/python3.6/site-packages/treetime/clock_tree.py", line 130, in _assign_dates
    raise MissingDataError("ERROR: ALMOST NO VALID DATE CONSTRAINTS")
treetime.MissingDataError: ERROR: ALMOST NO VALID DATE CONSTRAINTS

My input looks something like: metadata.tsv name date 1 2012.43 2 2012.43 .. 111 2013.84 112 2014.01

nwk tree looks something like: (((70:13.297602,((64:22.415506,8:27.633684):0.409884, ... (19:0.000772,72:2.015511):1.003667):1.003583,68:4.033345):0.000772):23.999073):0.000772):0.971035):0.998182):0.0):0.0;

The names appear to match 1, 2 .. 112

Thanks, Rosie

rneher commented 4 years ago

thanks. this is a bug. When alll taxon names are numbers, they were interpreted as numbers and then don't match their equivalent in the tree. I just changed this so that everything is interpreted as strings. I'll make new release.

thanks again, richard

rneher commented 4 years ago

fixed in https://github.com/neherlab/treetime/commit/19895d2787f997a11c54d0ee7b79f9db97015e00