Skip to content
Steve Bond edited this page Feb 2, 2018 · 37 revisions


A friend to tend to your trees

PhyloBuddy is intended to assist in the management and manipulation of phylogenetic trees and as a wrapper for common phylogenetic inference programs. Currently supported formats are Newick, NEXUS, and NeXML.

Generalized usage

$: pb file(s) <tool> <args> <modifier(s)>

pb: Alias for phylobuddy used throughout the wiki (see Creating Aliases)

file(s): One or more tree files in any combination of NEXUS, Newick, and NeXML formats. Note that the files argument must be left blank if piping data into PhyloBuddy.

tool: A single flag that specifies which PhyloBuddy tool is being run. All tools are listed in the table below.

args: If the tool being called accepts any additional arguments, they must be supplied here. All arguments are explained in detail in each tool's wiki page.

modifier(s): These are additional flags that may be passed into PhyloBuddy to modify general behavior, irrespective of the tool being called. All modifiers are listed in the table below.

Tools

Tool   Flag   Parameters Brief Description
add_branch -ab <branch/subtree> <sister, [sister, ...]> Add a new branch to an existing tree
collapse_polytomies -cpt [threshold (float)] [{'bootstrap' | 'length'}] Remove nodes if their support value or branch length are below a threshold
consensus_tree -ct [min frequency (float)] Generate a consensus tree (default 0.5)
display_trees -dt None Visualize trees graphically
distance -dis [{'wrf'|'uwrf'|'ed'}] Calculates tree distance using weighted/unweighted Robinson-Foulds, or euclidean distance (default wrf)
generate_tree -gt [{'raxml' | 'phyml' | 'fasttree'}, <tool specific parameters>] Accept alignment file as input, and perform phylogenetic inference with a third party program
hash_ids -hi [hash length (int)] Rename all identifiers to random hashes
ladderize -ld ['rev'] Sort all nodes by their number of children
list_ids -li [num columns (int)] Output all taxa/leaf identifiers in columns (default 1 column)
num_tips -nt None Display the number of tips in each tree
print_trees -ptr None Prints an ASCII representation of each tree.
prune_taxa -pt <regex, [regex, ...]> Remove taxa with matching labels/IDs
rename_ids -ri <regex> <substitution> Replace matched regular expressions in ids with new text
root -rt [taxa, [taxa, ...]] (Re)root a tree at its midpoint or on specified taxa
screw_formats -sf <out format> Change the format of a tree file
show_unique -su None Color leaf branches based on whether the taxa is present in both trees
split_polytomies -sp None Randomly resolves polytomies
unroot -ur None Make trees unrooted

Modifying flags

         Flag          Brief Description
-f --format Force read a specific tree format (very rarely necessary)
-i --in_place Rewrites the FIRST input file with the final output. Be careful!
-k --keep_temp Specify a directory to store any temporary files produced during execution.
-o --out_format Specify the supported format you want the output returned in.
-q --quiet Suppress stderr messages.
-s --random_seed Specify a random seed
-t --test Run the function and return any stderr/stdout other than the alignment.

Main Toolkit Pages





Further Reading

Clone this wiki locally