treetime icon indicating copy to clipboard operation
treetime copied to clipboard

Can TimeTree convert a non-ultrametric tree to an ultrametric tree?

Open padpadpadpad opened this issue 3 years ago • 3 comments

Hi

I have created a tree using RaxML of a bacterial dataset which has ~4000 tips. For downstream analysis I need this to be ultrametric, but am struggling to find software that is well documented that can do this.

I am wondering whether treetime is capable of estimating a ultrametric tree by default or converting a non-ultrametric tree from RaxML.

Many thanks Dan

padpadpadpad avatar Jan 13 '22 12:01 padpadpadpad

I think this should work.

What are your inputs? If you have a nwk tree and an alignment either as fasta or vcf you should be good to go.

If I don't misunderstand your use case, all you need to do is create a metadata.tsv file that contains the same year for each tip, then fix a clock rate arbitrarily since having all dates equal there's no information on clock rates.

A command like this from the docs should do:

treetime --aln data/tb/lee_2015.vcf.gz --vcf-reference data/tb/tb_ref.fasta --tree data/tb/lee_2015.nwk --clock-rate 1e-7 --dates data/tb/lee_2015.metadata.tsv

https://treetime.readthedocs.io/en/latest/tutorials/timetree.html

corneliusroemer avatar Jan 13 '22 22:01 corneliusroemer

hi, I also want to create an ultrametric tree with a smaller bacterial dataset of 20 tips, but I have tried the abovementioned method but this does not seem to work. I have set all dates to the same year with a fixed clock rate and generated the tree using iqtree. Is there something else I could try?

Vers4L avatar Jan 26 '22 10:01 Vers4L

this should work. could you give some more details on what doesn't work? Estimating the clock rate is of course impossible in that case. But if you provide it explicitly treetime should run.

rneher avatar Feb 01 '22 16:02 rneher

Closing as stale

corneliusroemer avatar May 22 '23 11:05 corneliusroemer