BEAST2-Dev / bdsky

Birth Death Serial Skyline Model for BEAST2
GNU General Public License v3.0
2 stars 11 forks source link

Documentation for setting rateChangeTimes #35

Open m-d-grunnill opened 1 month ago

m-d-grunnill commented 1 month ago

As rateChangeTimes cannot be set in BEAUti, documentation on how to set these in an xml would be good. For instance, how do the Boolean values in the reverseTimeArrays map to BDSky parameters.

gavryushkina commented 1 month ago

Is this what you mean https://github.com/BEAST2-Dev/bdsky/blob/master/doc/how_to.pdf?

m-d-grunnill commented 1 month ago

Thanks! This does go some of the way to explain but no quite all.

How does the order for the boolean values in rateChangeTimes corresponding for the BDSKY serial parameters. https://github.com/BEAST2-Dev/bdsky/blob/master/doc/how_to.pdf mentions the BDSKY serial parameters in the order R, δ, and s in the 3rd paragraph. Is this the order used for boolean values in rateChangeTimes. It is not explicitly stated.

Likewise, the 4th paragraph mention the parameters used in other BDSKY models as λ, µ, ψ, ρ, and r in that order. Is that the order used in the rateChangeTimes boolean values for BDSKY models using that parameterization.

m-d-grunnill commented 1 month ago

Another point of confusion!

I was looking at xmls from article supporting materials. At line 161 the xml linked below lists 5 boolean values. Yet the BDSKY model is using the 3 parameter parameterization R, δ, and s.

https://github.com/HIVMolEpi/TRIP_Ukraine/blob/master/Kyiv.xml

jugne commented 1 month ago

This could be better documented. But to answer your immediate question from the code:

public Input<BooleanParameter> reverseTimeArraysInput = new Input<BooleanParameter>("reverseTimeArrays", "True if the time arrays are given in backwards time (from the present back to root). Order: 1) birth 2) death 3) sampling 4) rho 5) r. Default false." + "Careful, rate array must still be given in FORWARD time (root to tips). If rhosamplingTimes given, they should be backwards and this should be true.");

This is for birth-death parameterisation. For R, δ, and s parameterisation the order will be: 1) R 2) δ 3) s 4) rho 5) r.

In the analysis you pointed to, rho and r are not specified and thus assume default values of 0 and 1.