fasttreeMP(1)
๐ณ fasttreeMP(1) โ User Commands ๐
okay bestie, sit DOWN, because fasttreeMP is about to become your whole personality ๐ฆ (it's the openMP version, iykyk)
โจ NAME โจ
fasttreeMP โ create phylogenetic trees from alignments of nucleotide or protein sequences (openMP version) ๐
๐ธ DESCRIPTION ๐ธ
So basically, fasttreeMP infers approximately-maximum-likelihood phylogenetic trees from alignments of nucleotide or protein sequences. And when I say it handles a lot?? It handles alignments with up to a million sequences in a reasonable amount of time and memory. A MILLION. no cap.
And the accuracy?? fasttreeMP is more accurate than PhyML 3 with default settings, and much more accurate than the distance-matrix methods that are traditionally used for large alignments. it's giving main character energy honestly ๐
Here's the tea on the models it uses:
- for nucleotide evolution: the Jukes-Cantor or generalized time-reversible (GTR) models
- for amino acid evolution: the JTT (Jones-Taylor-Thornton 1992) model
And to account for the varying rates of evolution across sites, fasttreeMP uses a single rate for each site (the "CAT" approximation) ๐ฑ
To quickly estimate the reliability of each split in the tree, fasttreeMP computes local support values with the Shimodaira-Hasegawa test โ and these are literally the same as PhyML 3's "SH-like local supports" ๐ periodt.
๐ SYNOPSIS ๐
fasttreeMP protein_alignment > tree
fasttreeMP -nt nucleotide_alignment > tree
fasttreeMP -nt -gtr < nucleotide_alignment > tree
fasttreeMP accepts alignments in fasta or phylip interleaved formats โจ
๐ Common options (must be before the alignment file)
bestie. BEFORE the alignment file. I'm not playing. ๐
-quietโ to suppress reporting information-noprโ to suppress the progress indicator-log logfileโ save intermediate trees, settings, and model details-fastestโ speed up the neighbor joining phase & reduce memory usage- (recommended for >50,000 sequences)
-n <number>โ to analyze multiple alignments (phylip format only)- (use for global bootstrap, with seqboot and CompareToBootstrap.pl)
-nosupportโ to not compute support values-intree newick_fileโ to set the starting tree(s)-intree1 newick_fileโ to use this starting tree for all the alignments- (for faster global bootstrap on huge alignments)
-pseudoโ to 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;fasttreeMPwill not be able to read these trees back in-nomlโ to turn off maximum-likelihood-nomeโ to turn off minimum-evolution NNIs and SPRs- (recommended if running additional ML NNIs with
-intree)
- (recommended if running additional ML NNIs with
-nome -mllenwith-intreeโ to optimize branch lengths for a fixed topology-cat #โ to specify the number of rate categories of sites (default 20)- or
-nocatto use constant rates
- or
-gammaโ after optimizing the tree under the CAT approximation, rescale the lengths to optimize the Gamma20 likelihood-constraints constraintAlignmentโ to constrain the topology search;constraintAlignmentshould have 1s or 0s to indicates splits-expertโ see more options ๐
๐ฅ Detailed usage for fasttreeMP 2.1.4 SSE3 ๐ฅ
fasttreeMP [-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
fasttreeMP [-nt] [-matrix Matrix | -nomatrix] [-rawdist] -makematrix [alignment]
[-n 100] > phylip_distance_matrix
fasttreeMP supports fasta or phylip interleaved alignments. By default fasttreeMP expects protein alignments, so use -nt for nucleotides. And fasttreeMP reads standard input if no alignment file is given ๐ซ
๐ฅ Input/output options ๐ค
-nโ read in multiple alignments in. This only works with phylip interleaved format. For example, you can use it with the output from phylip'sseqboot. If you use-n,fasttreeMPwill write 1 tree per line to standard output.-intree newickfileโ read the starting tree in fromnewickfile. Any branch lengths in the starting trees are ignored.-intreewith-nโ will read 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, log-corrected distances and an amino acid dissimilarity matrix derived from BLOSUM45 โ or for nucleotide sequences, 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.) Recommended if analyzing the alignment has sequences with little or no overlap. If the weight is not specified, it is 1.0
๐ฟ Topology refinement
By default, fasttreeMP 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, 2 rounds of subtree-prune-regraft (SPR) moves (also min. evo.), and up to 2*log(N) rounds of maximum-likelihood NNIs.
- Use
-nnito set the number of rounds of min. evo. NNIs, and-sprto set the rounds of SPRs. - Use
-nomlto turn off both min-evo NNIs and SPRs (useful if refining an approximately maximum-likelihood tree with further NNIs) - Use
-sprlengthset the maximum length of a SPR move (default 10) - Use
-mlnnito set the number of rounds of maximum-likelihood NNIs - Use
-mlacc 2or-mlacc 3to always optimize all 5 branches at each NNI, and to optimize all 5 branches in 2 or 3 rounds - Use
-mllento optimize branch lengths without ML NNIs - Use
-mllen -nomewith-intreeto optimize branch lengths on a fixed topology - Use
-slownnito turn off heuristics to avoid constant subtrees (affects both ML and ME NNIs)
๐งฌ Maximum likelihood model options ๐งฌ
-wagโ Whelan-And-Goldman 2001 model instead of (default) Jones-Taylor-Thorton 1992 model (a.a. only)-gtrโ generalized time-reversible instead of (default) Jukes-Cantor (nt only)-cat #โ specify the number of rate categories of sites (default 20)-nocatโ no CAT model (just 1 category)-gammaโ after the final round of optimizing branch lengths with the CAT model, report the likelihood under the discrete gamma model with the same number of categories.fasttreeMPuses the same branch lengths but optimizes the gamma shape parameter and the scale of the lengths. The final tree will have rescaled lengths. Used with-log, this also generates per-site likelihoods for use with CONSEL, seeGammaLogToPaup.pland documentation on thefasttreeMPweb site.
๐ซถ Support value options
By default, fasttreeMP computes local support values by resampling the site likelihoods 1,000 times and the Shimodaira Hasegawa test. If you specify -nome, it will compute minimum-evolution bootstrap supports instead. In either case, the support values are proportions ranging from 0 to 1 โจ
- Use
-nosupportto turn off support values or-boot 100to use just 100 resamples - Use
-seedto initialize the random number generator
๐ Searching for the best join
By default, fasttreeMP combines the 'visible set' of fast neighbor-joining with local hill-climbing as in relaxed neighbor-joining.
-slowโ exhaustive search (like NJ or BIONJ, but different gap handling)-slowtakes half an hour instead of 8 seconds for 1,250 proteins ๐-fastestโ search the visible set (the top hit for each node) only
Unlike the original fast neighbor-joining, -fastest updates visible(C) after joining A and B if join(AB,C) is better than join(C,visible(C)). -fastest also updates out-distances in a very lazy way, -fastest sets -2nd on as well, use -fastest -no2nd to avoid this.
๐ฏ Top-hit heuristics
By default, fasttreeMP uses a top-hit list to speed up search. Use -notop (or -slow) to turn this feature off and compare all leaves to each other, and all new joined nodes to each other.
-topm 1.0โ set the top-hit list size toparameter*sqrt(N)
fasttreeMP estimates the top m hits of a leaf from the top 2*m hits of a 'close' neighbor, where close is defined as d(seed,close) < 0.75 * d(seed, hit of rank 2*m), and updates the top-hits as joins proceed
-close 0.75โ modify the close heuristic, lower is more conservative-refresh 0.8โ compare a joined node to all other nodes if its top-hit list is less than 80% of the desired length, or if the age of the top-hit list islog2(m)or greater-2ndor-no2ndโ to turn 2nd-level top hits heuristic on or off
This reduces memory usage and running time but may lead to marginal reductions in tree quality. (By default, -fastest turns on -2nd.)
๐ Join options
-njโ regular (unweighted) neighbor-joining (default)-bionjโ weighted joins as in BIONJ
fasttreeMP will also weight joins during NNIs
๐ง Constrained topology search options
-constraints alignmentfileโ an alignment with values of 0, 1, and-
Not all sequences need be present. A column of 0s and 1s defines a constrained split. Some constraints may be violated (see 'violating constraints:' in standard error).
-constraintWeightโ how strongly to weight the constraints. A value of 1
โฆand to finish that thought, bestie: it means a penalty of 1 in tree length for violating a constraint. Default: 100.0 ๐
For more information, see http://www.microbesonline.org/fasttree/ or the comments in the source code.
fasttreeMP protein_alignment > tree
fasttreeMP -nt nucleotide_alignment > tree
fasttreeMP -nt -gtr < nucleotide_alignment > tree
fasttreeMP accepts alignments in fasta or phylip interleaved formats.
โจ Common options (must be before the alignment file) โจ
-quietโ suppresses reporting information. It's giving silent treatment ๐-noprโ suppresses the progress indicator. No little spinner, just vibes โจ-loglogfileโ saves intermediate trees, settings, and model details tologfile. Keep the receipts ๐งพ-fastestโ speeds up the neighbor joining phase & reduces memory usage. Recommended for >50,000 sequences. Big alignment? This is the move ๐ฅ-n<number>โ analyzes multiple alignments (phylip format only). Use for global bootstrap, withseqbootandCompareToBootstrap.pl.-nosupportโ does not compute support values. No support, no problem ๐โโ๏ธ-intreenewick_fileโ sets the starting tree(s). Starting point slay ๐ฑ-intree1newick_fileโ uses this starting tree for all the alignments (for faster global bootstrap on huge alignments). One tree to rule them all ๐-pseudoโ uses pseudocounts (recommended for highly gapped sequences). Gap girlies, this one's for you ๐ซถ-gtrโ generalized time-reversible model (nucleotide alignments only). Nucleotide besties only ๐งฌ-wagโ Whelan-And-Goldman 2001 model (amino acid alignments only). Protein besties only ๐งช-quoteโ allows spaces and other restricted characters (but not'characters) in sequence names and quote names in the output tree (fasta input only;fasttreeMPwill not be able to read these trees back in). So quoted names, but don't try to reread them, no cap ๐-nomlโ turns off maximum-likelihood. ML? Not today ๐-nomeโ turns off minimum-evolution NNIs and SPRs (recommended if running additional ML NNIs with-intree).-nome -mllenwith-intreeโ optimizes branch lengths for a fixed topology.-cat #โ specifies the number of rate categories of sites (default20). Or-nocatโ uses constant rates.-gammaโ after optimizing the tree under the CAT approximation, rescales the lengths to optimize the Gamma20 likelihood.-constraintsconstraintAlignmentโ constrains the topology search.constraintAlignmentshould have1s or0s to indicates splits.-expertโ see more options. Expert mode unlocked ๐
For more information, see http://www.microbesonline.org/fasttree/.
This page is from Lawrence Berkeley National Lab, dated June 2012, and it's for fasttreeMP(1). Bye bestie, go build some trees ๐ณ๐
๐ฆ 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 deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms