-
Notifications
You must be signed in to change notification settings - Fork 23
PB Show unique
Steve Bond edited this page Oct 28, 2017
·
8 revisions
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.
((A,(B,C)),(D,E));
(((A,B),C),(D,E,F));
$: pb alpha_tree.nwk -su
((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;
$: pb alpha_tree.nwk -su | pb -dt