use of dr.evolution.distance.SMMDistanceMatrix in project beast-mcmc by beast-dev.
the class DistanceMatrixParser method parseXMLObject.
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
PatternList patterns = (PatternList) xo.getChild(PatternList.class);
DistanceMatrix matrix = null;
String type = xo.getStringAttribute(CORRECTION);
if (type.equals(Nucleotides.JC)) {
Logger.getLogger("dr.evoxml").info("Creating Jukes-Cantor distance matrix");
matrix = new JukesCantorDistanceMatrix(patterns);
} else if (type.equals(Nucleotides.F84)) {
Logger.getLogger("dr.evoxml").info("Creating F84 distance matrix");
matrix = new F84DistanceMatrix(patterns);
} else if (type.equals("SMM")) {
Logger.getLogger("dr.evoxml").info("Creating SMM distance matrix");
matrix = new SMMDistanceMatrix(patterns);
} else {
matrix = new DistanceMatrix(patterns);
}
return matrix;
}
Aggregations