dplace-data icon indicating copy to clipboard operation
dplace-data copied to clipboard

Standardise the time scales for phylogenies

Open xrotwang opened this issue 5 years ago • 5 comments

It seems, posterior.trees for Grollemund et al. 2015 mixes branch length and change rate in a composite data type à la [email protected]. If read this way, the scale factor for the branch lengths seems to be years, giving ~6,800 years root age for Atlantic-Congo.

xrotwang avatar Jan 14 '19 15:01 xrotwang

Ok, we need to remove @... from these trees. What's the best way to do it? I can write some code/regex to do this, or should we use phyltr as discussed in https://github.com/lmaurits/phyltr/issues/16#issuecomment-453955556 ?

(I have a minor personal preference for something like sed, rather than adding another tool to the pipeline)

SimonGreenhill avatar Apr 16 '19 14:04 SimonGreenhill

phyltr would be the right tool for the job, though. And it uses ete3 for the low-level nexus reading and writing, like pydplace - so it only adds the functionality we want without any overhead.

xrotwang avatar Apr 16 '19 15:04 xrotwang

Ok, but phyltr's currently non-functional on py3 ("ModuleNotFoundError: No module named 'main'") and ete3 won't load trees in this format anyway so it's unclear what phyltr gives us?

SimonGreenhill avatar Apr 17 '19 09:04 SimonGreenhill

I just realised that the summary trees and the posterior trees have different scales for this dataset. This is annoying.

Should we standardise the scales?

SimonGreenhill avatar Apr 17 '19 09:04 SimonGreenhill

phyltr cat < my.trees | phyltr scale -s 100 > out.trees

SimonGreenhill avatar Aug 06 '19 12:08 SimonGreenhill