Skip to content

Commit

Permalink
Adding a substitution model is optional in the new DiscretizedSiteRat…
Browse files Browse the repository at this point in the history
…eModel
  • Loading branch information
rambaut committed Jul 17, 2023
1 parent e436a42 commit c422163
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,11 @@ public Object parseXMLObject(XMLObject xo) throws XMLParseException {
GammaSiteRateDelegate delegate = new GammaSiteRateDelegate("GammaSiteRateDelegate", shapeParam, catCount, type, invarParam);

DiscretizedSiteRateModel siteRateModel = new DiscretizedSiteRateModel(SiteModel.SITE_MODEL, muParam, muWeight, delegate);

siteRateModel.setSubstitutionModel(substitutionModel);
siteRateModel.addModel(substitutionModel);

if (substitutionModel != null) {
siteRateModel.setSubstitutionModel(substitutionModel);
siteRateModel.addModel(substitutionModel);
}

return siteRateModel;
}
Expand Down

0 comments on commit c422163

Please sign in to comment.