xavierdidelot / BactDating

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

plotting 95CI for MCMC analysis #59

Closed drxilu closed 2 years ago

drxilu commented 2 years ago

Hi Xavier,

I am recently working on plotting MCMCs from Gubbins outputs and after running BactDating. Having some MCMCs traces plots like: Picture2

I wonder if there are methods to calculate or plot 95CIs for date of root, clock rate, relaxation parameters etc., in this MCMC traces plot.

Thank you in advance.

Best, Xi

drxilu commented 2 years ago

Hi Xavier,

I have managed to see all mcmc stats on the generated phylogeny, the integrated method print.resBactDating will print out these. Also used capture.output to save it to a file.

Phylogenetic tree dated using BactDating

Phylogenetic tree with 71 tips and 70 internal nodes.

Tip labels:
  16288_4_64, 6999_6_6, 717832, 21903_8_2, 717965, 21903_8_185, ...
Node labels:
  Root, n2, n3, n4, n5, n6, ...

Rooted; includes branch lengths.
Probability of root branch=1.00
likelihood=-4.10e+02 [-4.27e+02;-3.97e+02]
prior=-5.04e+02 [-5.64e+02;-4.74e+02]
mu=1.27e+00 [5.54e-01;1.78e+00]
sigma=2.89e-01 [1.33e-01;4.75e-01]
alpha=5.18e+02 [2.85e+02;1.08e+03]
Root date=1645.60 [1234.51;1796.97]
Root date for most likely root=1645.66 [1254.82;1796.97]

Thanks, Xi