fasttree(1)
π¦ fasttree π¦
okay bestie, this is the fasttree(1) page π It lives in the User Commands section, so it's a command you run straight from your terminal π
πΈ NAME πΈ
fasttree is all about creating phylogenetic trees from alignments of nucleotide or protein sequences π³β¨
π DESCRIPTION π
okay so fasttree infers approximately-maximum-likelihood phylogenetic trees from alignments of nucleotide or protein sequences πΈ It can handle alignments with up to a million sequences in a reasonable amount of time and memory, which is literally iconic π
it's more accurate than PhyML 3 with default settings β¨ and much more accurate than the distance-matrix methods people traditionally reach for with big alignments π
for models, fasttree uses the Jukes-Cantor or generalized time-reversible (GTR) models of nucleotide evolution 𧬠and the JTT (Jones-Taylor-Thornton 1992) model of amino acid evolution π«Ά rates of evolution vary from site to site, so to handle that it uses a single rate for each site (the "CAT" approximation) π¦ and to quickly estimate how reliable each split in the tree is, it computes local support values with the Shimodaira-Hasegawa test (these are the same as PhyML 3's "SH-like local supports") π₯
π³ SYNOPSIS π³
here's how you actually call it π«Ά
fasttree protein_alignment > tree
fasttree -nt nucleotide_alignment > tree
fasttree -nt -gtr < nucleotide_alignment > tree
fasttree accepts alignments in fasta or phylip interleaved formats π
π Common options (must be before the alignment file): π
these ones have to come before the alignment file, bestie π
-quietβ shh, stop reporting information π€«-noprβ no progress indicator for you π ββοΈ-log logfileβ save intermediate trees, settings, and model details π-fastestβ speeds up the neighbor joining phase and reduces memory usage π (recommended for >50,000 sequences)-n <number>β analyze multiple alignments (phylip format only) π¦ (use this for global bootstrap, with seqboot and CompareToBootstrap.pl)-nosupportβ don't compute support values-intree newick_fileβ set the starting tree(s) π±-intree1 newick_fileβ use this starting tree for all the alignments π (for faster global bootstrap on huge alignments)-pseudoβ use pseudocounts π§ (recommended for highly gapped sequences)-gtrβ generalized time-reversible model 𧬠(nucleotide alignments only)-wagβ Whelan-And-Goldman 2001 model π (amino acid alignments only)-quoteβ allow spaces and other restricted characters (but not ' characters) in sequence names, and quote names in the output tree π (fasta input only; fasttree will not be able to read these trees back in)-nomlβ turn off maximum-likelihood π ββοΈ-nomeβ turn off minimum-evolution NNIs and SPRs π ββοΈ (recommended if running additional ML NNIs with-intree)-nome -mllenβ with-intree, optimize branch lengths for a fixed topology π§-cat #β specify the number of rate categories of sites (default 20) π or use-nocatto use constant rates-gammaβ after optimizing the tree under the CAT approximation, rescale the lengths to optimize the Gamma20 likelihood β¨-constraints constraintAlignmentβ constrain the topology search π constraintAlignment should have 1s or 0s to indicate splits-expertβ see more options π
π§ Detailed usage for fasttree 2.1.4 SSE3: π§
this is the full, unfiltered usage line for version 2.1.4 SSE3 π
fasttree [-nt] [-n 100] [-quote] [-pseudo | -pseudo 1.0]
[-boot 1000 | -nosupport] [-intree starting_trees_file | -intree1
starting_tree_file] [-quiet | -nopr] [-nni 10] [-spr 2] [-noml |
-mllen | -mlnni 10] [-mlacc 2] [-cat 20 | -nocat] [-gamma] [-slow
| -fastest] [-2nd | -no2nd] [-slownni] [-seed 1253] [-top |
-notop] [-topm 1.0 [-close 0.75] [-refresh 0.8]] [-matrix Matrix
| -nomatrix] [-nj | -bionj] [-wag] [-nt] [-gtr] [-gtrrates ac ag
at cg ct gt] [-gtrfreq A C G T] [ -constraints
constraintAlignment [ -constraintWeight 100.0 ] ] [-log logfile]
[ alignment_file ]
> newick_tree
or
fasttree [-nt] [-matrix Matrix | -nomatrix] [-rawdist] -makematrix
[alignment]
[-n 100] > phylip_distance_matrix
fasttree supports fasta or phylip interleaved alignments. By default fasttree expects protein alignments, so use -nt for nucleotides. If no alignment file is given, fasttree reads standard input π«§
π₯ Input/output options: π₯
-nβ read in multiple alignments. This only works with phylip interleaved format π§© For example, you can use it with the output from phylip's seqboot. If you use-n, fasttree will write 1 tree per line to standard output.-intree newickfileβ read the starting tree in from newickfile. Any branch lengths in the starting trees are ignored.-intree(with-n) β reads a separate starting tree for each alignment πΏ-intree1 newickfileβ read the same starting tree for each alignment πΏ-quietβ do not write to standard error during normal operation (no progress indicator, no options summary, no likelihood values, etc.) π€«-noprβ do not write the progress indicator to stderr π ββοΈ-log logfileβ save intermediate trees so you can extract the trees and restart long-running jobs if they crash π-logalso reports the per-site rates (1 means slowest category).-quoteβ quote sequence names in the output and allow spaces, commas, parentheses, and colons in them, but not ' characters (fasta files only) π
π§ͺ Distances: π§ͺ
Default: for protein sequences, you get log-corrected distances and an amino acid dissimilarity matrix derived from BLOSUM45. For nucleotide sequences, you get Jukes-Cantor distances. To specify a different matrix, use -matrix FilePrefix or -nomatrix. Use -rawdist to turn the log-correction off, or to use %different instead of Jukes-Cantor π
-pseudo [weight]β use pseudocounts to estimate distances between sequences with little or no overlap π§ (Off by default.) This is recommended if your alignment has sequences with little or no overlap. If the weight is not specified, it is 1.0.
π² Topology refinement: π²
by default, fasttree tries to improve the tree with up to 4*log2(N) rounds of minimum-evolution nearest-neighbor interchanges (NNI), where N is the number of unique sequences β¨ plus 2 rounds of subtree-prune-regraft (SPR) moves (also min. evo.), and up to 2*log(N) rounds of maximum-likelihood NNIs π₯
-nniβ sets the number of rounds of min. evo. NNIs π-sprβ sets the number of rounds of SPRs π-nomlβ turns off both min-evo NNIs and SPRs (useful if refining an approximately maximum-likelihood tree with further NNIs) π ββοΈ-sprlengthβ sets the maximum length of a SPR move (default 10) πͺ-mlnniβ sets the number of rounds of maximum-likelihood NNIs π-mlacc 2or-mlacc 3β always optimize all 5 branches at each NNI, and optimize all 5 branches in 2 or 3 rounds π-mllenβ optimize branch lengths without ML NNIs π-mllen -nome(with-intree) β optimize branch lengths on a fixed topology π§-slownniβ turns off heuristics to avoid constant subtrees (affects both ML and ME NNIs) π
βοΈ part 2 picks up with the maximum likelihood model options, so stay tuned ππ«Ά
Okay bestie, here's the deets on where to find more π Check out http://www.microbesonline.org/fasttree/ or just read the comments in the source code π«Ά
Here's how you actually run it, it's so easy π§
fasttree protein_alignment > tree
fasttree -nt nucleotide_alignment > tree
fasttree -nt -gtr < nucleotide_alignment > tree
FastTree takes alignments in fasta or phylip interleaved format, no cap πΈ
Common options (must be before the alignment file)
Okay these options have to go BEFORE the alignment file, so don't mess up the order bestie π
-quietβ shush the reporting info π€« (suppresses the reporting information)-noprβ turns off the progress indicator so it stops nagging you π-log logfileβ saves intermediate trees, settings, and model details to your logfile π-fastestβ speeds up the neighbor joining phase and cuts down on memory usage β‘ (recommended for>50,000sequences, that's a LOT of sequences π)-n <number>β analyzes multiple alignments, but ONLY in phylip format π§© (use this for global bootstrap, withseqbootandCompareToBootstrap.pl)-nosupportβ skips computing support values π-intree newick_fileβ sets the starting tree(s) π³-intree1 newick_fileβ uses this one starting tree for ALL the alignments π (great for a faster global bootstrap on huge alignments)-pseudoβ turns on pseudocounts π³οΈ (recommended for highly gapped sequences)-gtrβ generalized time-reversible model 𧬠(nucleotide alignments only)-wagβ Whelan-And-Goldman 2001 model π§ͺ (amino acid alignments only)-quoteβ lets sequence names have spaces and other restricted characters (but not'characters) and quotes the names in the output tree π (fasta input only; fasttree will not be able to read these trees back in β οΈ)-nomlβ turns off maximum-likelihood π-nomeβ turns off minimum-evolution NNIs and SPRs π (recommended if you're running additional ML NNIs with-intree)-nome -mllenβ used with-intree, optimizes branch lengths for a fixed topology πΏ-cat #β sets the number of rate categories of sites π¦ (default20)-nocatβ uses constant rates instead π-gammaβ after optimizing the tree under the CAT approximation, rescales the lengths to optimize the Gamma20 likelihood β¨-constraints constraintAlignmentβ constrains the topology search π§± (constraintAlignmentshould have1s or0s to indicate splits)-expertβ unlocks even more options π§
Heads up, bestie: trees made with -quote can't be read back in by fasttree, so plan accordingly π
For more information, see http://www.microbesonline.org/fasttree/ π
Page brought to you by the Lawrence Berkeley National Lab, June 2012 ππ Stay iconic, bestie π¦β¨
π¦ where this page comes from
- debian bookworm: fasttree 2.1.11-2 Β· GPL-2.0-or-later
- debian trixie: fasttree 2.1.11-2 Β· GPL-2.0-or-later
- ubuntu jammy: fasttree 2.1.11-2 Β· GPL-2.0-or-later
- ubuntu noble: fasttree 2.1.11-2 Β· GPL-2.0-or-later
- ubuntu resolute: fasttree 2.1.11-2build1 Β· GPL-2.0-or-later
- ubuntu stonking: fasttree 2.1.11-2build1 Β· GPL-2.0-or-later
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms