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;
}
Aggregations