-
Notifications
You must be signed in to change notification settings - Fork 73
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
Add thorney beast support in Beauti #1211
base: master
Are you sure you want to change the base?
Conversation
This reverts commit 3661e10.
@@ -239,6 +239,23 @@ public void checkOptions() throws GeneratorException { | |||
} | |||
} | |||
|
|||
//+++++++++++++++++ ThorneyBEAST / clock model Verification ++++++++++++++ |
There was a problem hiding this comment.
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
@@ -254,7 +254,11 @@ public List<Parameter> selectParameters(List<Parameter> parameters) { | |||
Set<PartitionSubstitutionModel> substitutionModels = new LinkedHashSet<>(); | |||
for (AbstractPartitionData partition : getDataPartitions()) { | |||
if (partition.getPartitionClockModel() == model) { | |||
substitutionModels.add(partition.getPartitionSubstitutionModel()); | |||
PartitionSubstitutionModel substitutionModel = partition.getPartitionSubstitutionModel(); |
There was a problem hiding this comment.
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
@@ -557,8 +557,9 @@ public List<Operator> selectOperators(List<Operator> operators) { | |||
List<Operator> ops = new ArrayList<Operator>(); | |||
|
|||
if (options.hasData()) { | |||
if (getDataType().getType() != DataType.TREE) { | |||
if (getDataType().getType() != DataType.TREE || getPartitionTreeModel().isUsingThorneyBEAST()) { |
There was a problem hiding this comment.
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 isNewick = true; | ||
|
||
private boolean hasTipCalibrations = false; | ||
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 ); |
There was a problem hiding this comment.
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(); | ||
|
There was a problem hiding this comment.
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.
@@ -38,7 +39,7 @@ | |||
* @author Marc A. Suchard | |||
* @author Xiang Ji | |||
*/ | |||
public class NodeHeightProxyParameter extends Parameter.Proxy { | |||
public class NodeHeightProxyParameter extends Parameter.Proxy implements Bounds<Double> { |
There was a problem hiding this comment.
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
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: