beast2 icon indicating copy to clipboard operation
beast2 copied to clipboard

Port compatibilityStatistic from BEAST 1

Open walterxie opened this issue 5 years ago • 2 comments

It will be useful to port < compatibilityStatistic > from BEAST 1. The XML is below:

Copied from https://groups.google.com/forum/#!topic/beast-users/oQcO9oEW1pc

Hi Yan,

This may be easier to achieve in BEAST v1.10.4 with a bit of XML editing.

Construct an XML in BEAUti as normal and then add this in below the tree model:

<compatibilityStatistic id="constraints">
<treeModel idref="treeModel"/>
<compatibleWith>
<newick>(... my subtree ...);</newick>
</compatibleWith>
</compatibilityStatistic>

Then in the section of MCMC...

<prior>
<booleanLikelihood>
<compatibilityStatistic idref="constraints"/>
</booleanLikelihood>
.
.
.
</prior>

This will only accept tree moves that maintain a tree that is compatible (i.e. is a superset) of the subtree given in the Newick format.

If you just want to ask whether the tree with the new data is compatible with the previous tree, don’t put the <booleanLikelihood> in but add <compatibilityStatistic idref="constraints”/>. The average of this statistic will then be the posterior probability of it being compatible.

The one thing to note is that the starting tree needs to be compatible with the given subtree so you will need to provide a starting tree.

Andrew

walterxie avatar Jun 11 '19 22:06 walterxie

Having a MultiMonophyleticConstraint on a PrunedTree (both classes are in BEASTLabs) solves the problem posted on the userlist as well.

rbouckaert avatar Jun 11 '19 22:06 rbouckaert

We are not talking about it being technically solved. We are talking about it being easy and intuitive. BEAST 1 solution looks easier and more intuitive to me. Obviously something in BEAUti would be easier still.

On 12/06/2019, at 10:50 AM, Remco Bouckaert [email protected] wrote:

Having a MultiMonophyleticConstraint on a PrunedTree (both classes are in BEASTLabs) solves the problem posted on the userlist as well.

— 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/860?email_source=notifications&email_token=AAG5MSLE7OSRT5GMA6Z7ND3P2AT2RA5CNFSM4HXDZQPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXOXIMI#issuecomment-501052465, or mute the thread https://github.com/notifications/unsubscribe-auth/AAG5MSMPRS5BY7YBCX726GLP2AT2RANCNFSM4HXDZQPA.

alexeid avatar Jun 11 '19 22:06 alexeid