Skip to content

Conversation

@jtmccr1
Copy link
Contributor

@jtmccr1 jtmccr1 commented Dec 18, 2024

This is a smaller request than the previous one to add support for thorney beast to beauti.

This does not use BigFastIntervals in any way and so we don't wander into the breaking changes discussed elsewhere.

I will comment on other changes below but the two that stick out are:

  1. Warning the user that using hmc clock model with this likelihood is not supported
  2. Creating proxy parameters for the BigFastTree node heights and root height. This means that standard node height operators can be used, and the xml api for BigFastTreeModel and Default TreeModel are similar.

}
}

//+++++++++++++++++ ThorneyBEAST / clock model Verification ++++++++++++++
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warns the user about using a clock model for which gradients for tb are not implemented

for (AbstractPartitionData partition : getDataPartitions()) {
if (partition.getPartitionClockModel() == model) {
substitutionModels.add(partition.getPartitionSubstitutionModel());
PartitionSubstitutionModel substitutionModel = partition.getPartitionSubstitutionModel();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DataType.Tree partitions don't have substitution models. This ensures we don't add 'null' substitution models t


if (options.hasData()) {
if (getDataType().getType() != DataType.TREE) {
if (getDataType().getType() != DataType.TREE || getPartitionTreeModel().isUsingThorneyBEAST()) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TB analyses have clock models

private boolean hasNodeCalibrations = false;
public static List<ClockType> thorneyCompatibleClocks = Arrays.asList( ClockType.STRICT_CLOCK, ClockType.UNCORRELATED,
ClockType.FIXED_LOCAL_CLOCK, ClockType.RANDOM_LOCAL_CLOCK, ClockType.FIXED_LOCAL_CLOCK,
ClockType.MIXED_EFFECTS_CLOCK );
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

List of TB compatible clocks (all others use gradients)

abstract public boolean hasNodeTraits();
abstract public void swapAllTraits(NodeRef node1, NodeRef node2);
abstract public boolean hasRates();

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lifting these to the parent class to make it is easier to BigFastTrees and DefaultTrees interchangeably.

* @author Xiang Ji
*/
public class NodeHeightProxyParameter extends Parameter.Proxy {
public class NodeHeightProxyParameter extends Parameter.Proxy implements Bounds<Double> {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Calculating bounds on the fly so we can use these proxy parameters in node heigh operators

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants