beast2
                                
                                
                                
                                    beast2 copied to clipboard
                            
                            
                            
                        LogNormal distribution not being set as dirty when changed
I have a BranchRateModel which takes a LogNormal distribution as input. The mean of the distribution is constant and the standard deviation (the "S" parameter) is estimated. There is a single operator (a scaler) which changes the standard deviation RealParameter. However checking whether to recalculate a discretized distribution using "isDirty()" might not be reliable, as the debug likelihood check (of robust likelihood after setting all nodes dirty) will often fail when using "isDirty()". In contrast, checking directly whether the value of the "S" parameter has changed always works.
Relevant code is lines 38 to 51 here - https://github.com/genomescale/starbeast2/blob/27d97c1fb0c53568023012cab93a15582686f4c6/src/starbeast2/DiscreteRates.java#L38
Possibly related is the comment in line 353 here - https://github.com/CompEvol/beast2/blob/master/src/beast/evolution/branchratemodel/UCRelaxedClockModel.java#L353
The relaxed clock model relies on LogNormal being marked dirty properly when its parameters are changed. I verified this by running a UCLN analysis through a debugger. Perhaps something else is going on? Is this still an issue?