[meta]
name = "fasttree"
category = "phylogenetics"
description = "Approximately-maximum-likelihood phylogenetic tree inference optimized for large alignments"
tags = ["phylogenetics", "tree", "maximum-likelihood", "protein", "nucleotide", "large-dataset"]
author = "oxo-call built-in"
source_url = "http://www.microbesonline.org/fasttree/"

[context]
concepts = [
    "FastTree infers approximately-maximum-likelihood phylogenetic trees; much faster than IQ-TREE/RAxML for large datasets.",
    "FastTree uses GTR+CAT model for DNA and JTT+CAT for proteins; accepts aligned FASTA or PHYLIP input.",
    "Use FastTree (nucleotide, GTR) or FastTree (protein, JTT/WAG/LG) with appropriate flags.",
    "Use -nt for nucleotide alignment; default is protein.",
    "Use -gtr for GTR model (recommended for divergent sequences); default is JC for nucleotide.",
    "FastTree outputs Newick-format tree to stdout — redirect to a file.",
    "For reproducibility, use -seed N to set random seed.",
    "FastTreeMP (multi-threaded) is available as a separate binary for faster computation.",
]

pitfalls = [
    "FastTree outputs to stdout — always redirect: FastTree input.fasta > tree.nwk",
    "FastTree is faster than IQ-TREE but less accurate — for publications, prefer IQ-TREE with bootstrap.",
    "The -nt flag is required for nucleotide data — without it, FastTree treats DNA as protein.",
    "FastTree supports only FASTA and interleaved PHYLIP — not sequential PHYLIP.",
    "FastTree uses local nearest-neighbor interchange (NNI) — it may not find the globally optimal tree.",
    "Bootstrap is not a standard feature of FastTree; use -boot N for local support values.",
]

[[examples]]
task = "infer phylogenetic tree from nucleotide alignment"
args = "-nt -gtr aligned_sequences.fasta > nucleotide_tree.nwk"
explanation = "-nt specifies nucleotide data; -gtr GTR substitution model; output Newick tree to file"

[[examples]]
task = "infer phylogenetic tree from protein alignment"
args = "aligned_proteins.fasta > protein_tree.nwk"
explanation = "protein data is default (no -nt flag); JTT model default; output Newick to file"

[[examples]]
task = "infer tree with WAG protein substitution model"
args = "-wag aligned_proteins.fasta > wag_tree.nwk"
explanation = "-wag uses WAG substitution model for proteins; commonly used for bacterial proteins"

[[examples]]
task = "infer tree with local support values"
args = "-nt -gtr -boot 1000 -seed 42 aligned_sequences.fasta > tree_with_support.nwk"
explanation = "-boot 1000 local support values; -seed 42 for reproducibility"
