Skip to content
Steve Bond edited this page Oct 28, 2017 · 8 revisions

--show_unique, -su

Description

Add color to leaf branches based on whether the taxa is present in both trees. If the leaf is in both trees it is colored green, otherwise red. This function takes exactly two trees, either in the same file or split across two files, and returns the same two trees with new color attributes that can be displayed by a tree viewer (if using FigTree, be sure to output in NEXUS format).

Note that this tool does NOT take into account the shape of the tree, only the presence/absence of taxa labels.

Example

Input file: alpha_tree.nwk

((A,(B,C)),(D,E));
(((A,B),C),(D,E,F));

Usage example

$: pb alpha_tree.nwk -su

Output

((A:1.0[&!color=#00ff00],(B:1.0[&!color=#00ff00],C:1.0[&!color=#00ff00]):1.0):1.0,(D:1.0[&!color=#00ff00],E:1.0[&!color=#00ff00]):1.0):1.0;
(((A:1.0[&!color=#00ff00],B:1.0[&!color=#00ff00]):1.0,C:1.0[&!color=#00ff00]):1.0,(D:1.0[&!color=#00ff00],E:1.0[&!color=#00ff00],F:1.0[&!color=#ff0000]):1.0):1.0;

If piped into display_tree

$: pb alpha_tree.nwk -su | pb -dt

Output

Main Toolkit Pages





Further Reading

Clone this wiki locally