use of dr.app.bss.test.AncestralSequenceTrait in project beast-mcmc by beast-dev.
the class Utils method annotatedTreeModelToString.
// END: partitionDataListToString
// TODO: doesn't work
public static String annotatedTreeModelToString(TreeModel treeModel, LinkedHashMap<NodeRef, int[]> sequencesMap, DataType dataType) {
StringBuffer buffer = new StringBuffer();
NumberFormat format = NumberFormat.getNumberInstance(Locale.ENGLISH);
boolean useTipLabels = true;
AncestralSequenceTrait ancestralSequence = new AncestralSequenceTrait(sequencesMap, dataType);
TreeTraitProvider[] treeTraitProviders = new TreeTraitProvider[] { ancestralSequence };
//
TreeUtils.newick(//
treeModel, //
treeModel.getRoot(), //
useTipLabels, //
TreeUtils.BranchLengthType.LENGTHS_AS_TIME, //
format, //
null, //
treeTraitProviders, null, buffer);
return buffer.toString();
}
Aggregations