use of dr.app.beauti.components.ancestralstates.AncestralStatesComponentOptions in project beast-mcmc by beast-dev.
the class BeautiOptions method updateTraitParameters.
private void updateTraitParameters(AbstractPartitionData partition) {
if (partition.isCreatedFromTrait()) {
ContinuousComponentOptions comp = (ContinuousComponentOptions) getComponentOptions(ContinuousComponentOptions.class);
comp.createParameters(this);
DiscreteTraitsComponentOptions comp2 = (DiscreteTraitsComponentOptions) getComponentOptions(DiscreteTraitsComponentOptions.class);
comp2.createParameters(this);
AncestralStatesComponentOptions comp3 = (AncestralStatesComponentOptions) getComponentOptions(AncestralStatesComponentOptions.class);
comp3.setReconstructAtNodes(partition, true);
comp3.setReconstructAtMRCA(partition, false);
}
}
use of dr.app.beauti.components.ancestralstates.AncestralStatesComponentOptions in project beast-mcmc by beast-dev.
the class DiscreteTraitsComponentGenerator method writeTreeLikelihoodReferences.
private void writeTreeLikelihoodReferences(XMLWriter writer) {
for (AbstractPartitionData partition : options.dataPartitions) {
if (partition.getTraits() != null) {
AncestralStatesComponentOptions ancestralStatesOptions = (AncestralStatesComponentOptions) options.getComponentOptions(AncestralStatesComponentOptions.class);
String treeLikelihoodTag = TreeLikelihoodParser.ANCESTRAL_TREE_LIKELIHOOD;
if (ancestralStatesOptions.isCountingStates(partition)) {
treeLikelihoodTag = MarkovJumpsTreeLikelihoodParser.MARKOV_JUMP_TREE_LIKELIHOOD;
}
TraitData trait = partition.getTraits().get(0);
String prefix = partition.getName() + ".";
if (trait.getTraitType() == TraitData.TraitType.DISCRETE) {
writer.writeIDref(treeLikelihoodTag, prefix + TreeLikelihoodParser.TREE_LIKELIHOOD);
}
}
}
}
Aggregations