Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resume problem for monophyletic #1147

Open
walterxie opened this issue Apr 5, 2024 · 5 comments
Open

Resume problem for monophyletic #1147

walterxie opened this issue Apr 5, 2024 · 5 comments
Labels

Comments

@walterxie
Copy link
Member

walterxie commented Apr 5, 2024

It seems there is a bug to resume the XML containing monophyletic clade. The XML to replicate the problem is attached.

Run the XML first and then run beast -resume testP.xml. Check the log that the monophyletic(human-chimp) column was changed to 0 after resuming XML.

Screenshot 2024-04-05 at 3 30 35 PM

testP.log
testP.xml.zip

@walterxie
Copy link
Member Author

walterxie commented Apr 5, 2024

For a more complex XML using cancer data, we discovered the mrca.age(taxonset.tumour) had -1 after resuming. Not sure this is an additional issue or still the same issue caused by the "monophyletic" boolean value.

Screenshot 2024-04-05 at 4 08 50 PM

@alexeid
Copy link
Member

alexeid commented Apr 5, 2024

I think the mrca = -1 is the side-effect. That is presumably the value returned when the monophyly can't be found. So I think it is something to do with the taxonset having the wrong node numbers and so both the monophyletic constraint and the MRCA are probably looking for the wrong set of taxa. Curious to find out what is going on here precisely.

@walterxie
Copy link
Member Author

walterxie commented Apr 5, 2024

I forget to mention I manually changed the logger of MRCAPrior from the 1st line below into the 2nd one in order to diagnose the issue, because the 2nd line can log the monophyletic boolean value, and it was also used in the XML for cancer data analysis.

<log idref="human-chimp.prior"/>

<log spec='beast.base.evolution.tree.MRCAPrior' tree='@Tree.t:noncoding' taxonset='@human-chimp'/>

@rbouckaert
Copy link
Member

rbouckaert commented Apr 7, 2024

When logging like that, the MRCAPrior in the log may not be updated, since it is not on a path between StateNodes and posterior. This appears to be a logging issue.

Currently, if you want to log a clade of interest, it should be defined as an MRCAPrior inside the prior without monophyly constraint and without node distribution, then add a logger referring to the MRCAPrior. This is what BEAUti would do automatically.

It is a bit curious that for the first run in the example XML, the logged MRCAPrior values are correct, but for the resumed part, it is not, so that is something that might be fixable.

@rbouckaert
Copy link
Member

Adding

    	calculateLogP();

At line 390 of MRCAPrior fixes this particular issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants