xavierdidelot / BactDating

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

Invariant sites for snp tree? #43

Closed Tonny-zhou closed 3 years ago

Tonny-zhou commented 3 years ago

Hi! Thank you for BactDating.

I' am a newcomer to the phylogenetic filed. I find that the output of the substitution rate from BactDating for the tree based on only the snp sites is large than those previously reported (for the strain staphylococcus aureus). I want to know whether it is due to lacking the invariant sites?

Thank you

xavierdidelot commented 3 years ago

Hi Tonny,

Yes indeed if your tree was built using SNPs only then you should rescale the branches of this tree before running BactDating. To rescale you can use something like: tree$edge.length=tree$edge.length*L where L is the genome length and tree is the tree based on SNPs with branch lengths measured per site.

Tonny-zhou commented 3 years ago

Hi Tonny,

Yes indeed if your tree was built using SNPs only then you should rescale the branches of this tree before running BactDating. To rescale you can use something like: tree$edge.length=tree$edge.length*L where L is the genome length and tree is the tree based on SNPs with branch lengths measured per site.

Does the genome length include the invariant sites?

xavierdidelot commented 3 years ago

Yes by "genome length" I mean the length of the whole genome including invariant sites.