public class NewickUtils
@NotNull public static Tree read(@NotNull java.lang.String filename)
Creates a Tree from the given newick formatted file
public static void write(@NotNull
java.lang.String filename,
@NotNull
Tree tree,
boolean includeBranchLengths)
Writes give tree to Newick formatted file. http://evolution.genetics.washington.edu/phylip/newicktree.html
@NotNull public static Tree mergeTrees(@NotNull java.util.List<? extends net.maizegenetics.taxa.tree.Tree> trees)
This merges two or more trees into one tree. Nodes are merged when the names are the same.
Example: (AA:2,BB:2,CC:2); merged with (XX:2,YY:2,ZZ:2)AA; produces (('XX':2.0000000,'YY':2.0000000,'ZZ':2.0000000)'AA':2.0000000,'BB':2.0000000,'CC':2.0000000);
@NotNull
public static java.util.List<net.maizegenetics.taxa.tree.Node> nodes(@NotNull
Tree $receiver)
Extension function that returns all nodes of the tree
@NotNull public static Tree subsetTree(@NotNull Tree tree, @NotNull TaxaList taxaList)
Returns a tree that is a subset of the original containing only the taxa specified.
@NotNull public static Tree subsetTree(@NotNull Tree tree, @NotNull java.util.List<java.lang.String> namesToKeep)
Returns a tree that is a subset of the original containing only the names specified.
@NotNull public static Tree removeBranchLengths(@NotNull Tree tree)
This removes the branch lengths from the given tree