Skip to content
Steve Bond edited this page Oct 2, 2015 · 2 revisions

--root, -rt

Description

When a predefined outgroup is included in a tree, that tree can be 'rooted' to reflect the most basal common ancestor shared among the included taxa. If the basal state cannot be inferred, than trees should be retained in an unrooted state. The root function will root/re-root a tree at its midpoint or at specified nodes.

Arguments

Taxa label(s) ( str )

Optional. One or more taxa labels can be used to place the root.

  • 0 labels: The tree is rooted at the node which represents the most recent common ancestor between the two most divergent taxa in the tree.
  • 1 label: The tree is rooted on the taxa provided
  • 2+ labels: The tree is rooted on the node which represents the most recent common ancestor shared by all included taxa

Note: Labels must match exactly (case sensitive), otherwise the root method will default to midpoint.

Examples

Input file: unrooted_panxA.nwk

('BOL-PanxαA':0.23575,'Edu-PanxαA':0.38304,(('Cfu-PanxαA':0.51865,'Lla-PanxαA':0.25913)0.994:0.2571,('Vpa-PanxαA':0.87256,('Lcr-PanxαA':0.77097,'Tin-PanxαA':0.81535)0.972:0.27115)0.851:0.14015)0.190:0.10821);

Input tree

#### tree_1 ####
/-------------------------------------------------------------------- BOL-PanxαA
|
|-------------------------------------------------------------------- Edu-PanxαA
+
|                                                  /----------------- Cfu-PanxαA
|                /---------------------------------+
|                |                                 \----------------- Lla-PanxαA
\----------------+
                 |                /---------------------------------- Vpa-PanxαA
                 \----------------+
                                  |                /----------------- Lcr-PanxαA
                                  \----------------+
                                                   \----------------- Tin-PanxαA

Usage example 1

$: pb unrooted_panxA.nwk -rt

Output

[&R] (('Lcr-PanxαA':0.77097,'Tin-PanxαA':0.81535)0.972:0.27115,'Vpa-PanxαA':0.87256,(('Cfu-PanxαA':0.51865,'Lla-PanxαA':0.25913)0.994:0.2571,('BOL-PanxαA':0.23575,'Edu-PanxαA':0.38304):0.10821)0.190:0.14015);

Output tree

#### tree_1 ####
                                              /---------------------- Lcr-PanxαA
/---------------------------------------------+
|                                             \---------------------- Tin-PanxαA
|
|-------------------------------------------------------------------- Vpa-PanxαA
+
|                                             /---------------------- Cfu-PanxαA
|                      /----------------------+
|                      |                      \---------------------- Lla-PanxαA
\----------------------+
                       |                      /---------------------- BOL-PanxαA
                       \----------------------+
                                              \---------------------- Edu-PanxαA

Usage example 2

$: pb unrooted_panxA.nwk -rt Vpa-PanxαA

Output

[&R] ('Vpa-PanxαA':0.87256,('Lcr-PanxαA':0.77097,'Tin-PanxαA':0.81535)0.972:0.27115,(('Cfu-PanxαA':0.51865,'Lla-PanxαA':0.25913)0.994:0.2571,('BOL-PanxαA':0.23575,'Edu-PanxαA':0.38304):0.10821)0.190:0.14015)0.851;

Output tree

#### tree_1 ####
/-------------------------------------------------------------------- Vpa-PanxαA
|
|                                             /---------------------- Lcr-PanxαA
|---------------------------------------------+
+                                             \---------------------- Tin-PanxαA
|
|                                             /---------------------- Cfu-PanxαA
|                      /----------------------+
|                      |                      \---------------------- Lla-PanxαA
\----------------------+
                       |                      /---------------------- BOL-PanxαA
                       \----------------------+
                                              \---------------------- Edu-PanxαA

Usage example 3

$: pb unrooted_panxA.nwk -rt Vpa-PanxαA Cfu-PanxαA

Output

[&R] (('Cfu-PanxαA':0.51865,'Lla-PanxαA':0.25913)0.994:0.2571,('Vpa-PanxαA':0.87256,('Lcr-PanxαA':0.77097,'Tin-PanxαA':0.81535)0.972:0.27115)0.851:0.14015,('BOL-PanxαA':0.23575,'Edu-PanxαA':0.38304):0.10821)0.190;

Output tree

#### tree_1 ####
                                              /---------------------- Cfu-PanxαA
/---------------------------------------------+
|                                             \---------------------- Lla-PanxαA
|
|                      /--------------------------------------------- Vpa-PanxαA
|----------------------+
+                      |                      /---------------------- Lcr-PanxαA
|                      \----------------------+
|                                             \---------------------- Tin-PanxαA
|
|                                             /---------------------- BOL-PanxαA
\---------------------------------------------+
                                              \---------------------- Edu-PanxαA

Main Toolkit Pages





Further Reading

Clone this wiki locally