Orders nodes according to various criteria, preserving topology Synopsis -------- nw_order [-c:hn] Input ----- Argument is the name of a file that contains Newick trees, or '-' (in which case trees are read from standard input). Output ------ Orders the tree and prints it out on standard output. By default, the ordering field is the node's label for leaves, or the first child's order field for inner nodes. The tree's topology is not altered: the biological information contained in the tree is left intact. This is useful for comparing trees, because isomorphic trees will yield different Newick representations if the nodes are ordered differently. Options ------- -c : specify order criterion. Possible criteria are 'a' (alphanumeric oder of labels), 'n' (number of descendants: nodes with fewer descendans appear first), 'd' (de-ladderize: alternately put nodes with fewer descendants before or after those with more) The default (i.e., if option -c is not given) is 'a'. -h: print this message and exit Examples -------- # De-ladderize tree $ nw_order -c d ladder.nw # These two trees look different... $ diff -q data/falconiformes data/falconiformes_2 Files data/falconiformes and data/falconiformes_2 differ # but are they really? $ nw_order data/falconiformes > f1 $ nw_order data/falconiformes_2 > f2 # No, they're in fact the same $ diff -s f1 f2 Files f1 and f2 are identical