IQTREE2(1)
๐ IQTREE2 ๐ โ User Commands (bestie edition, part 1)
okay so this is the manual page for iqtree2, and I'm gonna walk you through every single flag like we're texting at 2am. it's long. it's got โจrangeโจ. grab a snack. ๐
๐ NAME ๐
iqtree2 โ efficient phylogenetic software by maximum likelihood.
that's it. that's the whole name section. she's efficient, she's phylogenetic, she's software, and she does it by maximum likelihood. periodt. ๐
๐ SYNOPSIS ๐
iqtree [-s ALIGNMENT] [-p PARTITION] [-m MODEL] [-t TREE] ...
the ... is doing a LOT of heavy lifting there but we love her for it. ๐
๐ฆ DESCRIPTION ๐ฆ
IQ-TREE multicore version 2.4.0 for Linux x86 64-bit built Jul 28 2026
Developed by Bui Quang Minh, Nguyen Lam Tung, Olga Chernomor, Heiko Schmidt, Dominik Schrempf, Michael Woodhams, Ly Trong Nhan, Thomas Wong
hand on heart for the dev team, no cap, they ate ๐ซถ
๐ GENERAL OPTIONS ๐
-h,--helpโ Print (more) help usages-s FILE[,...,FILE]โ PHYLIP/FASTA/NEXUS/CLUSTAL/MSF alignment file(s)-s DIRโ Directory of alignment files--seqtype STRINGโBIN,DNA,AA,NT2AA,CODON,MORPH(default: auto-detect)-t FILE|PARS|RANDโ Starting tree (default: 99 parsimony and BIONJ)-o TAX[,...,TAX]โ Outgroup taxon (list) for writing.treefile--prefix STRINGโ Prefix for all output files (default: aln/partition)--seed NUMโ Random seed number, normally used for debugging purpose--safeโ Safe likelihood kernel to avoid numerical underflow--mem NUM[G|M|%]โ Maximal RAM usage in GB | MB | %--runs NUMโ Number of indepedent runs (default: 1)-v,--verboseโ Verbose mode, printing more messages to screen-V,--versionโ Display version number--quietโ Quiet mode, suppress printing to screen (stdout)-fconst f1,...,fNโ Add constant patterns into alignment (N=no. states)--epsilon NUMโ Likelihood epsilon for parameter estimate (default 0.01)-T NUM|AUTOโ No. cores/threads or AUTO-detect (default: 1)--threads-max NUMโ Max number of threads for-T AUTO(default: all cores)
lowkey this whole block is your starter pack. -s is how you hand her an alignment, -T is how you get her to actually use your cores, and --quiet is for when you want zero screen noise. ๐
โฑ๏ธ CHECKPOINT โฑ๏ธ
--redoโ Redo both ModelFinder and tree search--redo-treeโ Restore ModelFinder and only redo tree search--undoโ Revoke finished run, used when changing some options--cptime NUMโ Minimum checkpoint interval (default: 60 sec and adapt)
so if you changed your mind mid-run, this is your rewind button. iconic behaviour honestly. ๐
๐งฉ PARTITION MODEL ๐งฉ
-p FILE|DIRโ NEXUS/RAxML partition file or directory with alignments. Edge-linked proportional partition model-q FILE|DIRโ Like-pbut edge-linked equal partition model-Q FILE|DIRโ Like-pbut edge-unlinked partition model-S FILE|DIRโ Like-pbut separate tree inference--subsample NUMโ Randomly sub-sample partitions (negative for complement)--subsample-seed NUMโ Random number seed for--subsample
the way that -p, -q, -Q and -S are all siblings but with completely different vibes... choose wisely bestie. ๐ธ
๐ LIKELIHOOD/QUARTET MAPPING ๐
--lmap NUMโ Number of quartets for likelihood mapping analysis--lmclust FILEโ NEXUS file containing clusters for likelihood mapping--quartetlhโ Print quartet log-likelihoods to.quartetlhfile
๐ณ TREE SEARCH ALGORITHM ๐ณ
--ninit NUMโ Number of initial parsimony trees (default: 100)--ntop NUMโ Number of top initial trees (default: 20)--nbest NUMโ Number of best trees retained during search (defaut: 5)-n NUMโ Fix number of iterations to stop (default: OFF)--nstop NUMโ Number of unsuccessful iterations to stop (default: 100)--perturb NUMโ Perturbation strength for randomized NNI (default: 0.5)--radius NUMโ Radius for parsimony SPR search (default: 6)--allnniโ Perform more thorough NNI search (default: OFF)-g FILEโ (Multifurcating) topological constraint tree file--fastโ Fast search to resemble FastTree--polytomyโ Collapse near-zero branches into polytomy--tree-fixโ Fix-ttree (no tree search performed)--treelsโ Write locally optimal trees into.treelsfile--show-lhโ Compute tree likelihood without optimisation--terraceโ Check if the tree lies on a phylogenetic terrace
this is the main character section and I need you to respect it. --allnni? that's the "go harder" button. --fast? that's the "I have 4 minutes before my meeting" button. --tree-fix? that's the "bestie do NOT move a single branch" button. ๐ฅ
๐ ULTRAFAST BOOTSTRAP/JACKKNIFE ๐
-B,--ufboot NUMโ Replicates for ultrafast bootstrap (>=1000)-J,--ufjack NUMโ Replicates for ultrafast jackknife (>=1000)--jack-prop NUMโ Subsampling proportion for jackknife (default: 0.5)--sampling STRINGโGENE|GENESITEresampling for partitions (default:SITE)--boot-treesโ Write bootstrap trees to.ufbootfile (default: none)--wbtlโ Like--boot-treesbut also writing branch lengths--nmax NUMโ Maximum number of iterations (default: 1000)--nstep NUMโ Iterations for UFBoot stopping rule (default: 100)--bcor NUMโ Minimum correlation coefficient (default: 0.99)--beps NUMโ RELL epsilon to break tie (default: 0.5)--bnniโ Optimize UFBoot trees by NNI on bootstrap alignment
-B is the signature move of IQ-TREE, iykyk. and remember, -B and -J want at least 1000 replicates, that's not a suggestion, that's the law. ๐
๐ฒ NON-PARAMETRIC BOOTSTRAP/JACKKNIFE ๐ฒ
-b,--boot NUMโ Replicates for bootstrap + ML tree + consensus tree-j,--jack NUMโ Replicates for jackknife + ML tree + consensus tree--jack-prop NUMโ Subsampling proportion for jackknife (default: 0.5)--bcon NUMโ Replicates for bootstrap + consensus tree--bonly NUMโ Replicates for bootstrap only--tbeโ Transfer bootstrap expectation
yes, --jack-prop shows up in two different sections and yes, that's just how she is. we don't question it. same (default: 0.5) both times, so you're safe either way. โจ
๐งช SINGLE BRANCH TEST ๐งช
--alrt NUMโ Replicates for SH approximate likelihood ratio test--alrt 0โ Parametric aLRT test (Anisimova and Gascuel 2006)--abayesโ approximate Bayes test (Anisimova et al. 2011)--lbp NUMโ Replicates for fast local bootstrap probabilities
heads up: --alrt 0 is literally the number zero, and that's what unlocks the parametric aLRT test. zero is not nothing here. ๐
๐ต๏ธ MODEL-FINDER ๐ต๏ธ
-m TESTONLYโ Standard model selection (like jModelTest, ProtTest)-m TESTโ Standard model selection followed by tree inference-m MFโ Extended model selection with FreeRate heterogeneity-m MFPโ Extended model selection followed by tree inference-m ...+LMโ Additionally test Lie Markov models-m ...+LMRYโ Additionally test Lie Markov models with RY symmetry-m ...+LMWSโ Additionally test Lie Markov models with WS symmetry-m ...+LMMKโ Additionally test Lie Markov models with MK symmetry-m ...+LMSSโ Additionally test strand-symmetric models--mset STRINGโ Restrict search to models supported by other programs (raxml, phyml, mrbayes, beast1 or beast2)--mset STR,...โ Comma-separated model list (e.g.-mset WAG,LG,JTT)--msub STRINGโ Amino-acid model source (nuclear, mitochondrial, chloroplast or viral)--mfreq STR,...โ List of state frequencies--mrate STR,...โ List of rate heterogeneity among sites (e.g.-mrate E,I,G,I+G,Ris used for-m MF)--cmin NUMโ Min categories for FreeRate model[+R](default: 2)--cmax NUMโ Max categories for FreeRate model[+R](default: 10)--merit AIC|AICc|BICโ Akaike|Bayesian information criterion (default: BIC)--mtreeโ Perform full tree search for every model--madd STR,...โ List of mixture models to consider--mdef FILEโ Model definition NEXUS file (see Manual)--modelomaticโ Find best codon/protein/DNA models (Whelan et al. 2015)
-m MFP is THE girl. model selection and tree inference in one breath? obsessed. ๐ง
๐งต PARTITION-FINDER ๐งต
--mergeโ Merge partitions to increase model fit--merge greedy|rcluster|rclusterfโ Set merging algorithm (default: rclusterf)--merge-model 1|allโ Use only 1 or all models for merging (default: 1)--merge-model STR,...โ Comma-separated model list for merging--merge-rate 1|allโ Use only 1 or all rate heterogeneity (default: 1)--merge-rate STR,...โ Comma-separated rate list for merging--rcluster NUMโ Percentage of partition pairs for rcluster algorithm--rclusterf NUMโ Percentage of partition pairs for rclusterf algorithm--rcluster-max NUMโ Max number of partition pairs (default: 10*partitions)
note that --merge-model and --merge-rate each pull double duty โ one form takes 1|all, the other takes a comma-separated list. don't mix them up bestie. ๐
๐งฌ SUBSTITUTION MODEL ๐งฌ
-m STRINGโ Model name string (e.g.GTR+F+I+G)
and now, the menu. every flavour she's got:
- DNA:
HKY(default),JC,F81,K2P,K3P,K81uf,TN/TrN,TNef,TIM,TIMef,TVM,TVMef,SYM,GTR, or 6-digit model specification (e.g.,010010=HKY) - Protein:
LG(default),Poisson,cpREV,mtREV,Dayhoff,mtMAM,JTT,WAG,mtART,mtZOA,VT,rtREV,DCMut,PMB,HIVb,HIVw,JTTDCMut,FLU,Blosum62,GTR20,mtMet,mtVer,mtInv,FLAVI,Q.LG,Q.pfam,Q.pfam_gb,Q.bird,Q.mammal,Q.insect,Q.plant,Q.yeast - Protein mixture:
C10,...,C60,EX2,EX3,EHO,UL2,UL3,EX_EHO,LG4M,LG4X - Binary:
JC2(default),GTR2 - Empirical codon:
KOSI07,SCHN05 - Mechanistic codon:
GY(default),MG,MGK,GY0K,GY1KTS,GY1KTV,GY2K,MG1KTS,MG1KTV,MG2K - Semi-empirical codon:
XX_YYwhereXXis empirical andYYis mechanistic model - Morphology/SNP:
MK(default),ORDERED,GTR - Lie Markov DNA:
1.1,2.2b,3.3a,3.3b,3.3c,3.4,4.4a,4.4b,4.5a,4.5b,5.6a,5.6b,5.7a,5.7b,5.7c,5.11a,5.11b,5.11c,5.16,6.6,6.7a,6.7b,6.8a,6.8b,6.17a,6.17b,8.8,8.10a,8.10b,8.16,8.17,8.18,9.20a,9.20b,10.12,10.34,12.12(optionally prefixed byRY,WSorMK) - Non-reversible:
STRSYM(strand symmetric model, equiv.WS6.6),NONREV,UNREST(unrestricted model, equiv.12.12)NQ.pfam,NQ.bird,NQ.mammal,NQ.insect,NQ.plant,NQ.yeast - Otherwise: Name of file containing user-model parameters
the Lie Markov list alone is a whole mood board. and if none of these serve, you can literally hand her a file with your own model parameters. she said "bring your own, I'll rate it". ๐ญ
๐ STATE FREQUENCY ๐
-m ...+Fโ Empirically counted frequencies from alignment-m ...+FOโ Optimized frequencies by maximum-likelihood-m ...+FQโ Equal frequencies-m ...+FRYโ For DNA, freq(A+G)=1/2=freq(C+T)-m ...+FWSโ For DNA, freq(A+T)=1/2=freq(C+G)-m ...+FMKโ For DNA, freq(A+C)=1/2=freq(G+T)-m ...+Fabcdโ 4-digit constraint on ACGT frequency (e.g.+F1221means f_A=f_T, f_C=f_G)-m ...+FUโ Amino-acid frequencies given protein matrix-m ...+F1x4โ Equal NT frequencies over three codon positions-m ...+F3x4โ Unequal NT frequencies over three codon positions
just tack these onto your -m string and she'll adjust her whole frequency situation for you. the abcd one is giving very specific. ๐
๐ RATE HETEROGENEITY AMONG SITES ๐
-m ...+Iโ A proportion of invariable sites-m ...+G[n]โ Discrete Gamma model with n categories (default n=4)-m ...*G[n]โ Discrete Gamma model with unlinked model parameters-m ...+I+G[n]โ Invariable sites plus Gamma model with n categories-m ...+R[n]โ FreeRate model with n categories (default n=4)-m ...*R[n]โ FreeRate model with unlinked model parameters-m ...+I+R[n]โ Invariable sites plus FreeRate model with n categories-m ...+Hnโ Heterotachy model with n classes
mini pop quiz bestie: +G uses a plus, *G uses a star, and that one character is the difference between linked and unlinked model parameters. same deal for +R vs *R. don't fumble it. ๐
-m ...*Hnโ the heterotachy model ๐ with n classes and unlinked parameters (each class is doing its own thing, main character energy, no shared vibes).--alpha-min NUMโ the minimum Gamma shape parameter for site rates (default:0.02).--gamma-medianโ use the median approximation for+Gsite rates instead of the default mean โจ.--rateโ write the empirical Bayesian site rates out to the.ratefile.--mlrateโ write the maximum likelihood site rates out to the.mlratefile.
๐งฌ POLYMORPHISM AWARE MODELS (PoMo) ๐งฌ
-s FILEโ the input counts file (check the manual for this one, bestie ๐).-m ...+Pโ the DNA substitution model (the ones from up above โ๏ธ) used together with PoMo.-m ...+N<POPSIZE>โ the virtual population size (default:9).-m ...+WB|WH|S]โ weighted binomial sampling.-m ...+WHโ weighted hypergeometric sampling.-m ...+Sโ sampled sampling.-m ...+G[n]โ discrete Gamma rate with n categories (defaultn=4).
๐๏ธ COMPLEX MODELS ๐๏ธ
-m "MIX{m1,...,mK}"โ a mixture model with K components.-m "FMIX{f1,...fK}"โ a frequency mixture model with K components.--mix-optโ optimize the mixture weights (default: detect).-m ...+ASCโ ascertainment bias correction.--tree-freq FILEโ the input tree used to infer the site frequency model.--site-freq FILEโ the input site frequency model file.--freq-maxโ posterior maximum instead of the mean approximation.
๐ TREE TOPOLOGY TEST ๐
--trees FILEโ the set of trees whose log-likelihoods you want evaluated.--test NUMโ how many replicates to run for the topology test.--test-weightโ go ahead and do the weighted KH and SH tests.--test-auโ the approximately unbiased (AU) test (Shimodaira 2002).--sitelhโ write the site log-likelihoods to the.sitelhfile.
๐ต ANCESTRAL STATE RECONSTRUCTION ๐ต
--ancestralโ ancestral state reconstruction via empirical Bayes.--asr-min NUMโ the minimum probability of an ancestral state (default: equil freq).
โ๏ธ TEST OF SYMMETRY โ๏ธ
--symtestโ perform three tests of symmetry.--symtest-onlyโ do--symtestand then exist. (Yes, the page literally says exist. We are not touching it ๐)--symtest-remove-badโ do--symtestand remove the bad partitions.--symtest-remove-goodโ do--symtestand remove the good partitions.--symtest-type MAR|INTโ use the MARginal/INTernal test when removing partitions.--symtest-pval NUMERโ the P-value cutoff (default:0.05).--symtest-keep-zeroโ keep the NAs in the tests.
๐งฎ CONCORDANCE FACTOR ANALYSIS ๐งฎ
-t FILEโ the reference tree used to assign the concordance factor.--gcf FILEโ the set of source trees for the gene concordance factor (gCF).--df-treeโ write the discordant trees associated with gDF1.--scf NUMโ the number of quartets for the site concordance factor (sCF).--scfl NUMโ like--scfbut using likelihood (recommended ๐ฏ).-s FILEโ the sequence alignment for--scf.-p FILE|DIRโ the partition file or directory for--scf.--cf-verboseโ write CF per tree/locus tocf.stat_tree/_loci.--cf-quartetโ write sCF for all resampled quartets to.cf.quartet.
๐งช ALISIM: ALIGNMENT SIMULATOR ๐งช
Usage, gorgeous:
iqtree --alisim <OUTPUT_PREFIX> [-m MODEL] [-t TREE] ...
--alisim OUTPUT_ALIGNMENTโ activate AliSim and tell it the output alignment filename.-t TREE_FILEโ set the input tree file name.--length LENGTHโ set the length of the root sequence.--num-alignments NUMBERโ set how many output datasets you want.--seqtype STRINGโBIN,DNA,AA,CODON,MORPH{NUM_STATES}(default: auto-detect). For morphological data,0<NUM_STATES<=32.--m MODEL_STRINGโ pick the evolutionary model. See the Manual for more detail.--mdef FILEโ the name of a NEXUS model file that defines new models (see Manual).--fundi TAXA_LIST,RHOโ specify a list of taxa, and Rho (Fundi weight) for the FunDi model.--indel <INS>,<DEL>โ set the insertion and deletion rate of the indel model, relative to the substitution rate.--indel-size <INS_DIS>,<DEL_DIS>โ set the insertion and deletion size distributions.--sub-level-mixtureโ turn on the feature that simulates a substitution-level mixture model.--no-unalignedโ stop outputting a file of unaligned sequences when you're using indel models.--root-seq FILE,SEQ_NAMEโ specify the root sequence from an alignment.-s FILEโ specify the input sequence alignment.--no-copy-gapsโ disable copying gaps from the input alignment (default:false).--site-freq <OPTION>โ pick the option (MEAN(default), orSAMPLING, orMODEL) to mimic the site-frequencies for mixture models from the input alignment (see Manual).--site-rate <OPTION>โ pick the option (MEAN(default), orSAMPLING, orMODEL) to mimic the discrete rate heterogeneity from the input alignment (see Manual).-t RANDOM{MODEL,NUM_TAXA}โ specify the model and the number of taxa so it can generate a random tree.-rlen MIN MEAN MAXโ specify three numbers: minimum, mean and maximum branch lengths when generating a random tree.-p FILEโ NEXUS/RAxML partition file, edge-linked proportional partition model.-q FILEโ like-pbut edge-linked equal partition model.-Q FILEโ like-pbut edge-unlinked partition model.--distribution FILEโ hand over a definition file of distributions, which can be used to generate random model parameters.--branch-distribution DISโ specify a distribution, from which branch lengths of the input trees are randomly generated and overridden.--branch-scale SCALEโ specify a value that scales all branch lengths.--single-outputโ output all the alignments into one single file.--write-allโ enable outputting internal sequences.--seed NUMโ the random seed number (default: CPU clock). โ ๏ธ Be careful to make AliSim reproducible, you should specify the seed number.-gzโ enable output compression, but it takes longer to run.-af phy|fastaโ set the output format (default:phylip).
The User Manual is available at http://www.iqtree.org/doc/alisim ๐
๐ฟ ANALYSIS WITH GENTRIUS ALGORITHM ๐ฟ
--gentrius FILEโ the file must contain either a single species-tree or a set of subtrees.-pr_ab_matrix FILEโ the presence-absence matrix of loci coverage.-s FILEโ PHYLIP/FASTA/NEXUS/CLUSTAL/MSF alignment file(s).-p FILEโ NEXUS/RAxML partition file.-g_stop_t NUMโ stop afterNUMspecies-trees were generated, or use0to turn this stopping rule off. Default:1MLNtrees.-g_stop_i NUMโ stop afterNUMintermediate trees were visited, or use0to turn this stopping rule off. Default:10MLNtrees.-g_stop_h NUMโ stop afterNUMhours (CPU time), or use0to turn this stopping rule off. Default:7days.-g_non_stopโ turn off all the stopping rules, live your truth.-g_query FILEโ species-trees to test for an identical set of subtrees.-g_printโ write all generated species-trees.
๐จ WARNING: there might be millions of trees! Millions. Of trees, bestie. Millions!! ๐ญ
-g_print_lim NUMโ a limit on the number of species-trees to be written.-g_print_inducedโ write induced partition subtrees.-g_print_mโ write the presence-absence matrix.-g_rm_leaves NUMโ invoke reverse analysis for complex datasets.
๐ฆ GENOMIC EPIDEMIOLOGICAL ANALYSIS ๐ฆ
--pathogenโ apply the CMAPLE tree search algorithm if sequence divergence is low, otherwise apply the IQ-TREE algorithm.--pathogen-forceโ apply the CMAPLE tree search algorithm regardless of sequence divergence.
โณ TIME TREE RECONSTRUCTION โณ
--date FILEโ the file containing dates of tips or ancestral nodes.--date TAXNAMEโ extract dates from taxon names after the last|.--date-tip STRINGโ tip dates as a real number orYYYY-MM-DD.--date-root STRINGโ root date as a real number orYYYY-MM-DD.--date-ci NUMโ number of replicates to compute the confidence interval.--clock-sd NUMโ std-dev for the lognormal relaxed clock (default:0.2).--date-no-outgroupโ exclude the outgroup from the time tree.--date-outlier NUMโ Z-score cutoff to remove outlier tips/nodes (e.g.3).--date-options ".."โ extra options passing directly to LSD2.--dating STRINGโ dating method:LSDfor least square dating (default).
And that's the whole page, angel ๐ซถ go sequence something iconic. This beauty is iqtree2 2.4.0+dfsg, dated July 2026, and it lives in section IQTREE2(1) of the manual. Slay ๐ โจ
๐ฆ where this page comes from
- ubuntu stonking: iqtree 2.4.0+dfsg-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