Root a tree using an outgroup.


usage: gtdbtk root --input_tree INPUT_TREE --outgroup_taxon OUTGROUP_TAXON
                   --output_tree OUTPUT_TREE
                   [--gtdbtk_classification_file GTDBTK_CLASSIFICATION_FILE]
                   [--custom_taxonomy_file CUSTOM_TAXONOMY_FILE]
                   [--tmpdir TMPDIR] [--debug] [-h]

required named arguments


path to the unrooted tree in Newick format


taxon to use as outgroup (e.g., p__Patescibacteria or p__Altiarchaeota)


path to output the tree

Named Arguments


file with GTDB-Tk classifications produced by the classify command


file indicating custom taxonomy strings for user genomes, that should contain any genomes belonging to the outgroup. Format: GENOME_ID<TAB>d__;p__;c__;o__;f__;g__;s__


specify alternative directory for temporary files

Default: “/tmp”


create intermediate files for debugging purposes



gtdbtk root --input_tree input.tree --outgroup_taxon p__Nanoarchaeota --output_tree output.tree


[2020-04-14 08:26:53] INFO: GTDB-Tk v1.1.0
[2020-04-14 08:26:53] INFO: gtdbtk root --input_tree input.tree --outgroup_taxon p__Nanoarchaeota --output_tree output.tree
[2020-04-14 08:26:53] INFO: Using GTDB-Tk reference data version r89: /release89
[2020-04-14 08:26:53] INFO: Identifying genomes from the specified outgroup.
[2020-04-14 08:26:53] INFO: Identified 101 outgroup taxa in the tree.
[2020-04-14 08:26:53] INFO: Identified 1151 ingroup taxa in the tree.
[2020-04-14 08:26:53] INFO: Outgroup is monophyletic.
[2020-04-14 08:26:53] INFO: Rerooting tree.
[2020-04-14 08:26:53] INFO: Rerooted tree written to: output.tree
[2020-04-14 08:26:53] INFO: Done.