beast2 icon indicating copy to clipboard operation
beast2 copied to clipboard

Tree logger should not sort tree in state

Open Rong419 opened this issue 5 years ago • 2 comments

For likelihoods that depend on tree orientation, loggers that sort the tree in state break likelihood comparisons in store/restore.

Solution: copy the tree as its being logged, sort the copy and log that. Keep the original tree in state unchanged.

Rong419 avatar Sep 18 '20 01:09 Rong419

Hi @Rong419, your commit doesn't seem to follow your proposed solution. Also, mightn't a better approach be to do the sorting during construction of the Newick string? Then you wouldn't have to copy anything.

tgvaughan avatar Sep 18 '20 07:09 tgvaughan

I like the idea of sorting while constructing the newick string.

On 18/09/2020, at 7:22 PM, Tim Vaughan [email protected] wrote:

Hi @Rong419 https://github.com/Rong419, your commit doesn't seem to follow your proposed solution. Also, mightn't a better approach be to do the sorting during construction of the Newick string? Then you wouldn't have to copy anything.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/CompEvol/beast2/issues/923#issuecomment-694703890, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAG5MSLTR6K5JHUI7IEHK53SGMDFFANCNFSM4RRHV2SA.

alexeid avatar Sep 18 '20 08:09 alexeid