public void writeTreeLikelihood(PartitionPattern partition,XMLWriter writer){
  PartitionSubstitutionModel substModel=partition.getPartitionSubstitutionModel();
  PartitionClockModel clockModel=partition.getPartitionClockModel();
  writer.writeComment("Microsatellite Sampler Tree Likelihood");
  writer.writeOpenTag(MicrosatelliteSamplerTreeLikelihoodParser.TREE_LIKELIHOOD,new Attribute[]{new Attribute.Default<String>(XMLParser.ID,partition.getPrefix() + MicrosatelliteSamplerTreeLikelihoodParser.TREE_LIKELIHOOD)});
  writeMicrosatSubstModelRef(substModel,writer);
  writer.writeIDref(MicrosatelliteSamplerTreeModelParser.TREE_MICROSATELLITE_SAMPLER_MODEL,partition.getName() + "." + MicrosatelliteSamplerTreeModelParser.TREE_MICROSATELLITE_SAMPLER_MODEL);
switch (clockModel.getClockType()) {
case STRICT_CLOCK:
    writer.writeIDref(StrictClockBranchRatesParser.STRICT_CLOCK_BRANCH_RATES,clockModel.getPrefix() + BranchRateModel.BRANCH_RATES);
  break;
case UNCORRELATED:
case RANDOM_LOCAL_CLOCK:
case AUTOCORRELATED:
throw new UnsupportedOperationException("Microsatellite only supports strict clock model");
default :
throw new IllegalArgumentException("Unknown clock model");
}
writer.writeCloseTag(MicrosatelliteSamplerTreeLikelihoodParser.TREE_LIKELIHOOD);
}

public void writeTreeLikelihood ( PartitionPattern partition , XMLWriter writer ) { PartitionSubstitutionModel substModel = partition . getPartitionSubstitutionModel ( ) ; PartitionClockModel clockModel = partition . getPartitionClockModel ( ) ; writer . writeComment ( "Microsatellite Sampler Tree Likelihood" ) ; writer . writeOpenTag ( MicrosatelliteSamplerTreeLikelihoodParser . TREE_LIKELIHOOD , new Attribute [ ] { new Attribute . Default < String > ( XMLParser . ID , partition . getPrefix ( ) + MicrosatelliteSamplerTreeLikelihoodParser . TREE_LIKELIHOOD ) } ) ; writeMicrosatSubstModelRef ( substModel , writer ) ; writer . writeIDref ( MicrosatelliteSamplerTreeModelParser . TREE_MICROSATELLITE_SAMPLER_MODEL , partition . getName ( ) + "." + MicrosatelliteSamplerTreeModelParser . TREE_MICROSATELLITE_SAMPLER_MODEL ) ; switch ( clockModel . getClockType ( ) ) { case STRICT_CLOCK : writer . writeIDref ( StrictClockBranchRatesParser . STRICT_CLOCK_BRANCH_RATES , clockModel . getPrefix ( ) + BranchRateModel . BRANCH_RATES ) ; break ; case UNCORRELATED : case RANDOM_LOCAL_CLOCK : case AUTOCORRELATED : throw new UnsupportedOperationException ( "Microsatellite only supports strict clock model" ) ; default : throw new IllegalArgumentException ( "Unknown clock model" ) ; } writer . writeCloseTag ( MicrosatelliteSamplerTreeLikelihoodParser . TREE_LIKELIHOOD ) ; }
write microsatellite sampler tree likelihood xml block .
