Search in sources :

Example 1 with SimulatedAlignment

use of beast.app.seqgen.SimulatedAlignment in project beast2 by CompEvol.

the class UnorderedAlignmentsTest method getAlignment.

public static Alignment getAlignment(TaxonSet taxa, Tree tree, SiteModel siteModel) throws Exception {
    Alignment dummy = new Alignment();
    Object[] args = new String[2 * taxa.getTaxonCount() + 2];
    args[args.length - 2] = "dataType";
    args[args.length - 1] = "nucleotide";
    for (int i = 0; i < taxa.getTaxonCount(); ++i) {
        args[2 * i] = taxa.getTaxonId(i);
        args[2 * i + 1] = "N";
    }
    dummy.initByName(args);
    SimulatedAlignment data = new SimulatedAlignment();
    data.initByName("data", dummy, "tree", tree, "siteModel", siteModel);
    return data;
}
Also used : Alignment(beast.evolution.alignment.Alignment) SimulatedAlignment(beast.app.seqgen.SimulatedAlignment) SimulatedAlignment(beast.app.seqgen.SimulatedAlignment)

Aggregations

SimulatedAlignment (beast.app.seqgen.SimulatedAlignment)1 Alignment (beast.evolution.alignment.Alignment)1