Repository navigation
Conversation
The prior was defined with id MeanRRatePrior.c:s$(n), but the connect rule that adds it to the posterior uses MeanRRatePrior.c:$(n). The rule never matched, so an analysis with an estimated random-local-clock rate had no prior on meanClockRate (an improper flat prior), and the prior did not appear in the Priors panel. BEAST 3's template already uses the id without the stray s.
RRatesPrior.c:s$(n) does not match the .c:$(n) pattern, so BEAUti fills in $(n) with the data partition's name instead of the clock's. After the data partition is renamed, the rule looks for RRatesPrior.c:s<newname>, so switching the clock away from the random local clock leaves the old prior in the analysis, on clock rates that are no longer in the model.
alexeid
added a commit
to CompEvol/beast3-test
that referenced
this pull request
Nov 9, 2026
BEAUti 2.7 never adds the random local clock's mean-rate prior (template bug, CompEvol/BeastFX#114), so the BEAST 2 side has an improper flat prior that can't be changed in BEAUti 2.7. Match it in BEAST 3 with a wide uniform and rerun both.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In
fxtemplates/ClockModels.xmlthe random local clock defines its mean-rate prior asMeanRRatePrior.c:s$(n), but the connect rule that adds it to the posterior (line 158) looks forMeanRRatePrior.c:$(n). The ids never match, so:meanClockRate, i.e. an improper flat prior;This PR drops the stray
sfrom the id rather than adding it to the rule: BEAUti reads the partition from the text after:(BeautiDoc.parsePartition), soc:s$(n)would file the prior under a partition calleds<name>. BEAST 3's template already usesMeanRRatePrior.c:$(n), and BEAUti 3 does add the prior.@rbouckaert, was the
sdeliberate? It came in with beast2fdf94e3d(27 Apr 2012), which changed the id fromc:$(n)toc:s$(n)but left the connect rule unchanged; the prior was a OneOnX then. If it was a way to switch that prior off, this PR changes the default on purpose: RLC analyses with an estimated rate get the template's Gamma(0.01, 100) (LogNormal(0, 8) with #111) instead of a flat prior.Found while comparing BEAST 2.7.9 and BEAST 3 analyses built by hand in BEAUti (combination C15 in CompEvol/beast3-test: RSV2, random local clock, tip dates). The BEAST 2 XML had no mean-rate prior while the BEAST 3 one had Gamma(0.01, 100), giving a 0.4% difference in the clock rate.
Note for #111: it changes this prior's distribution on the adjacent lines but keeps the
c:s$(n)id, so the prior stays disconnected there too. Whichever PR merges second needs a trivial rebase.Second fix, same template: the rates prior
RRatesPrior.c:s$(n). Its connect rule is generated from the same id, so it is added correctly at first. But.c:s$(n)doesn't match the.c:$(n)pattern intranslatePartitionNames, so$(n)becomes the data partition's name rather than the clock's. After renaming the data partition, the rule looks forRRatesPrior.c:s<newname>; switching the clock away from the random local clock then leaves the old prior in the analysis, onclockratesthat are no longer in the model. This PR drops thatstoo (BEAST 3 has the same bug: CompEvol/beast3#222), and updates the idSimpleClockModelTestexpects.Tested in BEAUti 2.7: with these changes the mean-rate prior is added to the analysis, and after renaming the data partition and switching to a strict clock no random local clock prior is left behind; without them, neither holds.