Combine MCMCTree traces

16 views
Skip to first unread message

Ziv Lieberman

unread,
Jan 7, 2026, 6:58:03 PM (13 days ago) Jan 7
to PAML discussion group
Hello,
I have three independent MCMCTree runs, and I would like to combine the traces ('logs'). I saw in the documentation and in an earlier message in this group that I can reuse the control file, but with print = -1, and by listing my traces to combine, e.g.:

...
mcmcfile = run1.log run2.log run3.log
...
print  = -1

When I do this, the program seems to read everything correctly, and it outputs a new FigTree file as well as a new .out file.
However, I am interested in obtaining the combined .log file as well, for visual and statistical inspection of the total MCMC.
Is there a way to output this combined trace? I tried appending a new file to the mcmcfile parameter (run1.log run2.log run3.log run-combined.log) but this didn't change the behavior.
I can use LogCombiner but would rather do this all in PAML if I can.
Thanks!
-Ziv

Sandra AC

unread,
Jan 8, 2026, 5:25:39 AM (13 days ago) Jan 8
to PAML discussion group
Hi Ziv,

Thanks for your message! At the moment, this feature has not been implemented in PAML. Nevertheless, there is a bash script that I wrote some time ago that can do the trick: "Combine_MCMC.sh". You can navigate to the "paml-tutorial/mcmctree-approxlnL-aa" repository to learn how to integrate this script in a timetree inference analysis with MCMCtree. Please note that this is just one of the many ways that you could follow to combine the samples collected during various MCMC runs with MCMCtree  -- while not implemented within PAML programs, this script is somewhat useful! 

Hope this helps!
Sandy

Ziv Lieberman

unread,
Jan 8, 2026, 8:11:56 PM (12 days ago) Jan 8
to PAML discussion group
Hi Sandra,
Great, thank you so much! This will certainly be useful. It does seem that using LogCombiner to combine the traces, and then using MCMCTree with print = -1 to combine the trees also produces satisfactory results, in case that info is useful to anyone else.
Best,
Ziv
Reply all
Reply to author
Forward
0 new messages