Skip to content

Latest commit

 

History

History
123 lines (114 loc) · 13.4 KB

index.md

File metadata and controls

123 lines (114 loc) · 13.4 KB

Gotree: toolkit and api for phylogenetic tree manipulation

Github repository

Gotree github repository.

Introduction

Gotree is a set of command line tools to manipulate phylogenetic trees. It is implemented in Go language.

Gotree handles phylogenetic trees in Newick, Nexus, PhyloXML and Nextstrain/Augur v2 format, through several basic commands. Each command may print result (a tree for example) in the standard output, and thus can be piped to the standard input of the next gotree command.

Installation

Binaries

You can download already compiled binaries for the latest release in the release section. Binaries are available for MacOS, Linux, and Windows (32 and 64 bits).

Once downloaded, you can just run the executable without any other downloads.

From sources

In order to compile gotree, you must first download and install Go on your system.

Then you just have to type :

go get github.com/evolbioinfo/gotree/

This will download GoTree sources from github, and all its dependencies.

You can then build it with:

cd $GOPATH/src/github.com/evolbioinfo/gotree/
make

The gotree executable should be located in the $GOPATH/bin folder.

Commands

Here is the list of all commands, with the link to the full description, and a link to a snippet that does it in GO.

Command Subcommand Description
annotate (api) Annotates internal nodes of a tree with given data
brlen (api) Modifies branch lengths
-- clear Clear lengths from input trees
-- cut Cut branches whose length is greater than or equal to the given length
-- round Rounds branch lengths from input trees with a given precision
-- scale Scales branch lengths from input trees by a given factor
-- setmin Sets a min branch length to all branches with length < cutoff
-- setrand Assigns a random length to edges of input trees
-- set Assigns a given length to edges of input trees
collapse (api) Collapses/Removes branches of input trees
-- clade Collapses a clade and replace it ith a tip
-- depth Collapses/Removes branches of input trees having a given depth
-- length Collapses/Removes short branches of input trees
-- single Collapses/Removes branches that connect single internal nodes (linear paths)
-- support Collapses/Removes lowly supported branches of input trees
comment (api) Modifies branch/node comments
-- clear Clears branch/node comments from input trees
-- transfer Transfers node names to comments
compare (api) Compares full trees, edges, or tips
-- edges Individually compares edges of the reference tree to a compared tree
-- tips Compares the set of tips of the reference tree to a compared tree
-- trees Compare 2 trees in terms of common and specific branches
completion Generates auto-completion commands for bash or zsh
compute (api) Computations such as consensus and supports
-- bipartitiontree Builds one tree with only one given bipartition
-- consensus Computes the consensus from a set of input trees
-- edgetrees Writes one output tree per branch of the input tree, with only one branch
-- support classical Computes classical bootstrap supports
-- support booster Computes booster bootstrap supports
divide Divides an input tree file into several tree files
download (api) Downloads trees from a server
-- itol Downloads a tree image from iTOL, with given image options
-- ncbitax Downloads the full ncbi taxonomy from NCBI ftp server and cinverts it in Newick
-- panther Downloads a tree from Panther database (http://pantherdb.org/)
draw (api) Draws tree(s) with different layouts
-- text Draws tree(s) in text/ascii format
-- png Draws tree(s) in png format
-- svg Draws tree(s) in svg format
-- cyjs Draws tree(s) in a html file, using cytoscape js
generate (api) Generates random trees, branch lengths are simply drawn from an expontential(0.1) law
-- balancedtree Randomly generates perfectly balanced trees
-- caterpillartree Randomly generates perfectly caterpillar trees
-- startree Generates a star tree (no internal branches)
-- topologies Generates all possible tree topologies
-- uniformtree Randomly generates uniform trees
-- yuletree Randomly generates Yule-Harding trees
graft (api) Graft a tree on an input tree
labels Lists labels of tree tips
ltt Draws a lineage through time plot
matrix (api) Prints distance matrix associated to the input tree
merge (api) Merges two rooted trees
nni (api) Generates all NNI neighbors from a given tree
prune (api) Removes tips of input trees
reformat (api) Reformats input file
-- newick Reformats input file (nexus, newick, phyloxml) into newick
-- nexus Reformats input file (nexus, newick, phyloxml) into nexus
-- phyloxml Reformats input file (nexus, newick, phyloxml) into phyloxml
rename (api) Renames tips/nodes of the input tree
repopulate (api) Re populate the tree with identical tips (having the exact same sequence)
reroot (api) Reroots trees using an outgroup or at midpoint
-- midpoint Reroots trees at midpoint position
-- outgroup Reroots trees using a given outgroup
rotate (api) Reorders neighbors of internal nodes. Does not change the topology, but just traversal order.
-- sort Sort neighbors of internal nodes by ascending number of tips
-- rand Randomly reorders neighbors of internal nodes
resolve (api) Resolves multifurcations by adding 0 length branches
-- named Resolves internal named nodes as new tips with 0 length branches
sample Samples trees from a set of input trees
shuffletips (api) Shuffles tip names of an input tree
subtree (api) Extracts a subtree starting at a given node
support (api) Modifies branch supports
-- clear Clears branch supports from input trees
-- round Rounds branch supports from input trees with a given precision
-- scale Scales branch supports from input trees by a given factor
-- setrand Assigns a random support to edges of input trees
stats (api) Prints statistics about the tree, its edges, its nodes, if it is rooted, and its tips
-- edges Prints informations about all the edges
-- monophyletic Tells wether input tips form a monophyletic group in input trees
-- nodes Prints informations about all the nodes
-- rooted Tells if the tree is rooted or not
-- tips Prints informations about all the tips
-- splits Prints all the splits/bipartitions of the tree (bit vectors)
unroot (api) Unroots input tree(s)
upload (api) Uploads trees to a given server
-- itol Uploads trees to itol, with given annotations
version Prints gotree version