Search in sources :

Example 1 with SMMDistanceMatrix

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;
}
Also used : F84DistanceMatrix(dr.evolution.distance.F84DistanceMatrix) SMMDistanceMatrix(dr.evolution.distance.SMMDistanceMatrix) PatternList(dr.evolution.alignment.PatternList) F84DistanceMatrix(dr.evolution.distance.F84DistanceMatrix) JukesCantorDistanceMatrix(dr.evolution.distance.JukesCantorDistanceMatrix) DistanceMatrix(dr.evolution.distance.DistanceMatrix) SMMDistanceMatrix(dr.evolution.distance.SMMDistanceMatrix) JukesCantorDistanceMatrix(dr.evolution.distance.JukesCantorDistanceMatrix)

Aggregations

PatternList (dr.evolution.alignment.PatternList)1 DistanceMatrix (dr.evolution.distance.DistanceMatrix)1 F84DistanceMatrix (dr.evolution.distance.F84DistanceMatrix)1 JukesCantorDistanceMatrix (dr.evolution.distance.JukesCantorDistanceMatrix)1 SMMDistanceMatrix (dr.evolution.distance.SMMDistanceMatrix)1