xavierdidelot / BactDating

Bayesian inference of ancestral dates on bacterial phylogenetic trees
https://xavierdidelot.github.io/BactDating
MIT License
80 stars 15 forks source link

estimated substitution rate - no temporal data #20

Closed clydeandforth closed 4 years ago

clydeandforth commented 4 years ago

Hi Xavier,

Can BactDating be used to infer divergence time at the species level if no temporal sampling data is available? I have a maximum likelihood species tree based on 6 housekeeping genes from a bacterial spatial sampling survey. Can I input the estimated substitution rate at the 6 loci to estimate when the species diverged?

Thanks,

James

xavierdidelot commented 4 years ago

Hi James,

Yes you can do this with BactDating. When you run the bactdate command you will need to fix the substitution rate using the arguments "initMu=mu,updateMu=F". The value mu you set it to should be expressed for the whole 6 genes alignment, not per site. If you know the clock rate per site, you should multiply this by the sum of the lengths of the 6 genes to get the correct value of mu. You will also need to use the argument "date=rep(N,2019)" where N is your number of genomes, to specify that all genomes have the same date.

Best wishes, Xavier

Tonny-zhou commented 2 years ago

Hi James,

Yes you can do this with BactDating. When you run the bactdate command you will need to fix the substitution rate using the arguments "initMu=mu,updateMu=F". The value mu you set it to should be expressed for the whole 6 genes alignment, not per site. If you know the clock rate per site, you should multiply this by the sum of the lengths of the 6 genes to get the correct value of mu. You will also need to use the argument "date=rep(N,2019)" where N is your number of genomes, to specify that all genomes have the same date.

Best wishes, Xavier

Is date=rep(2019,N)?

xavierdidelot commented 2 years ago

Yes well spotted it should indeed have been rep(2019,N)