From 45d86360bcd1e78a0b37bdcda33f55814ea52530 Mon Sep 17 00:00:00 2001 From: Andrew Wheeler <105318561+phylowheeler@users.noreply.github.com> Date: Tue, 7 Jul 2026 14:27:38 -0700 Subject: [PATCH 01/30] Create How-to-clean-an-alignment-before-making-a-gene-tree.md --- ...-an-alignment-before-making-a-gene-tree.md | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 doc/recipes/How-to-clean-an-alignment-before-making-a-gene-tree.md diff --git a/doc/recipes/How-to-clean-an-alignment-before-making-a-gene-tree.md b/doc/recipes/How-to-clean-an-alignment-before-making-a-gene-tree.md new file mode 100644 index 0000000..0e82055 --- /dev/null +++ b/doc/recipes/How-to-clean-an-alignment-before-making-a-gene-tree.md @@ -0,0 +1,38 @@ +--- +layout: workshop +title: "How to clean an alignment before making a gene tree" +author: Andrew Wheeler +date: 2026-06-07 +docid: 100 +--- + +# Introduction + +This recipe explains how to filter out errors from a single gene multiple sequence alignment, prior to gene tree inference, using the "CLOAK" function in Muscle5. + +# What you need + +Muscle5: https://www.drive5.com/muscle/ + +IQ-TREE: http://www.iqtree.org/ + +# Example Usage + +The first step is to generate an ensemble of alignments using the "stratified" option in Muscle5. By default, this creates a set of 16 variant alignments, all output in a single ensemble fasta file. + +``` +muscle -align sequences.fasta -stratified -output ensemble.efa +``` + +CLOAK can then generate a single filtered alignment, based on consensus among the ensemble, using the following command: + +``` +muscle -cloak input_ensemble_file -mincol -output +``` + +Arguments: +- -input_ensemble_file : Path to the input alingment ensemble (EFA) file +- -mincol : Minimum number of non-gap characters required per column + for that column to be retained in the output. + Default value of 2 if not specified +- -output : Name of the file where the filtered MSA will be written. By default this will be {input_file_name}.cloak.fa From 25fa4b5eb4eda12ed77a772a069e1a5f2ee3469c Mon Sep 17 00:00:00 2001 From: Andrew Wheeler <105318561+phylowheeler@users.noreply.github.com> Date: Tue, 7 Jul 2026 15:38:42 -0700 Subject: [PATCH 02/30] Update Quickstart.md Recommending +R instead of +G on the quickstart page --- doc/Quickstart.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/Quickstart.md b/doc/Quickstart.md index 433f0c0..12f7dd4 100644 --- a/doc/Quickstart.md +++ b/doc/Quickstart.md @@ -122,9 +122,9 @@ A few typically analyses are listed in the following. Note that it is assumed th iqtree -s example.phy -* Infer maximum-likelihood tree using `GTR+I+G` model: +* Infer maximum-likelihood tree using `GTR+I+R` model: - iqtree -s example.phy -m GTR+I+G + iqtree -s example.phy -m GTR+I+R * Perform ModelFinder without subsequent tree inference: From 5d5b54371cb1b4f17a3edc9f6c30886e4c006946 Mon Sep 17 00:00:00 2001 From: Andrew Wheeler <105318561+phylowheeler@users.noreply.github.com> Date: Tue, 7 Jul 2026 16:45:08 -0700 Subject: [PATCH 03/30] Update Substitution-Models.md --- doc/Substitution-Models.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/Substitution-Models.md b/doc/Substitution-Models.md index 68dc1fb..d0c3789 100644 --- a/doc/Substitution-Models.md +++ b/doc/Substitution-Models.md @@ -197,10 +197,17 @@ IQ-TREE supports all common empirical amino-acid exchange rate matrices (alphabe | Q.pfam | nuclear | General Q matrix ([Minh et al., 2021]) estimated from Pfam version 31 database ([El-Gebali et al., 2018]). | | Q.plant | nuclear | Q matrix ([Minh et al., 2021]) estimated for plants ([Ran et al., 2018]). | | Q.yeast | nuclear | Q matrix ([Minh et al., 2021]) estimated for yeasts ([Shen et al., 2018]). | +| QC.mammal | nuclear | Q matrix ([Minh et al., 2021]) estimated on cleaned alignments ([Wheeler, et al. 2026]) for mammals from OrthoMaM database version 12 ([Allio, et al. 2024]) . | +| QC.pfam | nuclear | Q matrix ([Minh et al., 2021]) estimated on cleaned alignments ([Wheeler, et al. 2026]) from Pfam version 31 database ([El-Gebali et al., 2018]). | +| QC.pfam | nuclear | Q matrix ([Minh et al., 2021]) estimated on cleaned alignments ([Wheeler, et al. 2026]) for archaeal from the HAMAP database ([Lima, et al. 2009]). | +| QC.pfam | nuclear | Q matrix ([Minh et al., 2021]) estimated on cleaned alignments ([Wheeler, et al. 2026]) for bacteria from the HAMAP database ([Lima, et al. 2009]). | | rtREV | viral | Retrovirus ([Dimmic et al., 2002]). | | VT | nuclear | General 'Variable Time' matrix ([Mueller and Vingron, 2000]). | | WAG | nuclear | General matrix ([Whelan and Goldman, 2001]). | +>**TIP**: QC models should always be used in conjunction with the +F option to use emperical amino acid frequencies +{: .tip} + ### Protein mixture models IQ-TREE also supports a series of protein mixture models: From a6e24d7be115b62fd5ca046152acc95bca4797b8 Mon Sep 17 00:00:00 2001 From: Andrew Wheeler <105318561+phylowheeler@users.noreply.github.com> Date: Wed, 8 Jul 2026 10:37:23 -0700 Subject: [PATCH 04/30] Update Substitution-Models.md Added tip about use of QC models. Added citations for QC models --- doc/Substitution-Models.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/Substitution-Models.md b/doc/Substitution-Models.md index d0c3789..7d85cb5 100644 --- a/doc/Substitution-Models.md +++ b/doc/Substitution-Models.md @@ -199,13 +199,13 @@ IQ-TREE supports all common empirical amino-acid exchange rate matrices (alphabe | Q.yeast | nuclear | Q matrix ([Minh et al., 2021]) estimated for yeasts ([Shen et al., 2018]). | | QC.mammal | nuclear | Q matrix ([Minh et al., 2021]) estimated on cleaned alignments ([Wheeler, et al. 2026]) for mammals from OrthoMaM database version 12 ([Allio, et al. 2024]) . | | QC.pfam | nuclear | Q matrix ([Minh et al., 2021]) estimated on cleaned alignments ([Wheeler, et al. 2026]) from Pfam version 31 database ([El-Gebali et al., 2018]). | -| QC.pfam | nuclear | Q matrix ([Minh et al., 2021]) estimated on cleaned alignments ([Wheeler, et al. 2026]) for archaeal from the HAMAP database ([Lima, et al. 2009]). | -| QC.pfam | nuclear | Q matrix ([Minh et al., 2021]) estimated on cleaned alignments ([Wheeler, et al. 2026]) for bacteria from the HAMAP database ([Lima, et al. 2009]). | +| QC.archaea | nuclear | Q matrix ([Minh et al., 2021]) estimated on cleaned alignments ([Wheeler, et al. 2026]) for archaeal from the HAMAP database ([Lima, et al. 2009]). | +| QC.bacteria | nuclear | Q matrix ([Minh et al., 2021]) estimated on cleaned alignments ([Wheeler, et al. 2026]) for bacteria from the HAMAP database ([Lima, et al. 2009]). | | rtREV | viral | Retrovirus ([Dimmic et al., 2002]). | | VT | nuclear | General 'Variable Time' matrix ([Mueller and Vingron, 2000]). | | WAG | nuclear | General matrix ([Whelan and Goldman, 2001]). | ->**TIP**: QC models should always be used in conjunction with the +F option to use emperical amino acid frequencies +>**TIP**: Cleaned "QC" substitution models have been shown to improve inference of mammalian gene trees relative to substitution models trained on unfiltered data ([Wheeler, et al. 2026]). Nevertheless, ModelFinder is more likely to choose unfiltered Q substitution models, which tend to be better fit for gene alignments that also have no cleaning or gentle cleaning. Therefore, an alternative to using ModelFinder would be to select a QC model a priori. QC models should always be used in conjunction with the +F option to use emperical amino acid frequencies. {: .tip} ### Protein mixture models @@ -508,3 +508,6 @@ Users can fix the parameters of the model. For example, `+I{0.2}` will fix the p [davidcerny/GEOS26100-Fall2022]: https://github.com/davidcerny/GEOS26100-Fall2022 [Černý & Simonoff (2023)]: https://doi.org/10.1038/s41598-023-35784-3 [Harada et al., 2026]: https://doi.org/10.64898/2026.06.18.729217 +[Wheeler, et al. 2026]: https://doi.org/10.64898/2025.12.01.691663 +[Allio, et al. 2024]: https://doi.org/10.1093/nar/gkad834 +[Lima, et al. 2009]: https://doi.org/10.1093/nar/gkn661 From ab69710cac2f03a52839217586a118609201ccf4 Mon Sep 17 00:00:00 2001 From: Andrew Wheeler <105318561+phylowheeler@users.noreply.github.com> Date: Wed, 8 Jul 2026 10:50:29 -0700 Subject: [PATCH 05/30] Update Substitution-Models.md Recommended more strongly using +R instead of +G, citing (Ferretti et al., 2026). Removed the tip regarding the outdated +TEST option vs the more up to date +MFP option, which includes the free rate model --- doc/Substitution-Models.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/doc/Substitution-Models.md b/doc/Substitution-Models.md index 7d85cb5..fe8ec30 100644 --- a/doc/Substitution-Models.md +++ b/doc/Substitution-Models.md @@ -432,12 +432,9 @@ IQ-TREE supports all common rate heterogeneity across sites models: | +G | discrete Gamma model ([Yang, 1994]) with default 4 rate categories. The number of categories can be changed with e.g. `+G8`. | | +GC | continuous Gamma model ([Yang, 1994]) (for AliSim only). | | +I+G | invariable site plus discrete Gamma model ([Gu et al., 1995]). | -| +R | FreeRate model ([Yang, 1995]; [Soubrier et al., 2012]) that generalizes the `+G` model by relaxing the assumption of Gamma-distributed rates. The number of categories can be specified with e.g. `+R6` (default 4 categories if not specified). The FreeRate model typically fits data better than the `+G` model and is recommended for analysis of large data sets. | +| +R | FreeRate model ([Yang, 1995]; [Soubrier et al., 2012]) that generalizes the `+G` model by relaxing the assumption of Gamma-distributed rates. The number of categories can be specified with e.g. `+R6` (default 4 categories if not specified). Gamma models produce artifacts, especially for large datasets ([Ferretti et al., 2026]). FreeRate models are therefore recommended. | | +I+R | invariable site plus FreeRate model. | ->**TIP**: The new ModelFinder (`-m MFP` option) tests the FreeRate model, whereas the standard procedure (`-m TEST`) does not. -{: .tip} - Users can fix the parameters of the model. For example, `+I{0.2}` will fix the proportion of invariable sites (pinvar) to 0.2; `+G{0.9}` will fix the Gamma shape parameter (alpha) to 0.9; `+I{0.2}+G{0.9}` will fix both pinvar and alpha. To fix the FreeRate model parameters, use the syntax `+Rk{w1,r1,...,wk,rk}` (replacing `k` with the number of categories). Here, `w1, ..., wk` are the weights and `r1, ..., rk` the rates for each category. >**NOTE**: For the `+G` model IQ-TREE implements the _mean_ approximation approach ([Yang, 1994]). The same is done in RAxML and PhyML. However, some programs like TREE-PUZZLE implement the _median_ approximation approach, which makes the resulting log-likelihood not comparable. IQ-TREE can change to this approach via the `-gmedian` option. @@ -511,3 +508,4 @@ Users can fix the parameters of the model. For example, `+I{0.2}` will fix the p [Wheeler, et al. 2026]: https://doi.org/10.64898/2025.12.01.691663 [Allio, et al. 2024]: https://doi.org/10.1093/nar/gkad834 [Lima, et al. 2009]: https://doi.org/10.1093/nar/gkn661 +[Ferretti et al., 2026]: https://doi.org/10.1093/sysbio/syag037 From 734f2ca8ad4daf09bf92158ec224b96ecde64fbb Mon Sep 17 00:00:00 2001 From: Andrew Wheeler <105318561+phylowheeler@users.noreply.github.com> Date: Wed, 8 Jul 2026 13:01:39 -0700 Subject: [PATCH 06/30] Update Quickstart.md added example run for protein sequence using a sample amino acid alignment and QC.pfam model --- doc/Quickstart.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/Quickstart.md b/doc/Quickstart.md index 12f7dd4..cbf7c2b 100644 --- a/doc/Quickstart.md +++ b/doc/Quickstart.md @@ -125,6 +125,10 @@ A few typically analyses are listed in the following. Note that it is assumed th * Infer maximum-likelihood tree using `GTR+I+R` model: iqtree -s example.phy -m GTR+I+R + +* Infer maximum-likelihood tree for protein sequence using `QC.pfam+F+I+R` model: + + iqtree -s aa_example.phy -m QC.pfam+F+I+R * Perform ModelFinder without subsequent tree inference: From 727a5c90eb571609efef66a9d86d0b170a7626fa Mon Sep 17 00:00:00 2001 From: Andrew Wheeler <105318561+phylowheeler@users.noreply.github.com> Date: Wed, 8 Jul 2026 14:22:58 -0700 Subject: [PATCH 07/30] Update Advanced-Tutorial.md Added a paragraph to the section on alignment filtering to suggest Prequal (prior to alignment), Divvier, Taper, and CLOAK as good options for filtering protein alignments --- doc/Advanced-Tutorial.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/doc/Advanced-Tutorial.md b/doc/Advanced-Tutorial.md index d64b32c..0463648 100644 --- a/doc/Advanced-Tutorial.md +++ b/doc/Advanced-Tutorial.md @@ -530,7 +530,10 @@ Trimming alignment sites by likelihood Phylogenetic inference can be highly sensitive to fast-evolving, saturated or erroneous sites in a sequence alignment. Many studies used Gblocks ([Castresana, 2000]) or trimAl ([Capella-Gutiérrez et al., 2009]) -to trim alignment sites prior to phylogenetic reconstruction. +to trim alignment sites prior to phylogenetic reconstruction. + +Many newer methods focus on removing alignment erros without removing whole alignment columns to avoid excessive information loss. Prequal removes non-homologous sequences prior to sequence alignment ([Whelan et al., 2018]). Divvier ([Ali et al., 2019]), Taper ([Zhang et al., 2021]), and CLOAK ([Wheeler et al., 2026]) all attempt to remove poorly aligned characters from protein alignments, with Divvier being the strictest, and CLOAK being the gentlest filter among those three options ([Wheeler et al., 2026]). + Here, we present an alternative approach called **trimmed log-likelihood**, a robust phylogenetics method, that automatically detects and trims such sites during tree search directly. @@ -595,4 +598,7 @@ See [Command Reference](Command-Reference) for a complete list of all options av [Strimmer and Rambaut, 2002]: https://doi.org/10.1098/rspb.2001.1862 [Mayrose et al., 2004]: https://doi.org/10.1093/molbev/msh194 [Yang, 1995]: http://www.genetics.org/content/139/2/993.abstract - +[Whelan et al., 2018]: https://doi.org/10.1093/bioinformatics/bty448 +[Ali et al., 2019]: https://doi.org/10.1093/molbev/msz142 +[Zhang et al., 2021]: https://doi.org/10.1111/2041-210X.13696 +[Wheeler et al., 2026]: https://doi.org/10.64898/2025.12.01.691663 From 4c878ff7947d6d1ad2a7370f6b1ac1a105d1968e Mon Sep 17 00:00:00 2001 From: Andrew Wheeler <105318561+phylowheeler@users.noreply.github.com> Date: Wed, 8 Jul 2026 15:16:24 -0700 Subject: [PATCH 08/30] Update Advanced-Tutorial.md clarified edits to alignment cleaning and removed references to trimal and gblocks --- doc/Advanced-Tutorial.md | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/doc/Advanced-Tutorial.md b/doc/Advanced-Tutorial.md index 0463648..3205118 100644 --- a/doc/Advanced-Tutorial.md +++ b/doc/Advanced-Tutorial.md @@ -528,11 +528,7 @@ Trimming alignment sites by likelihood
Phylogenetic inference can be highly sensitive to fast-evolving, saturated or -erroneous sites in a sequence alignment. Many studies used Gblocks -([Castresana, 2000]) or trimAl ([Capella-Gutiérrez et al., 2009]) -to trim alignment sites prior to phylogenetic reconstruction. - -Many newer methods focus on removing alignment erros without removing whole alignment columns to avoid excessive information loss. Prequal removes non-homologous sequences prior to sequence alignment ([Whelan et al., 2018]). Divvier ([Ali et al., 2019]), Taper ([Zhang et al., 2021]), and CLOAK ([Wheeler et al., 2026]) all attempt to remove poorly aligned characters from protein alignments, with Divvier being the strictest, and CLOAK being the gentlest filter among those three options ([Wheeler et al., 2026]). +erroneous sites in a sequence alignment. Many newer methods focus on removing alignment erros without removing whole alignment columns to avoid losing information about closely related species. Prequal removes non-homologous sequences prior to sequence alignment ([Whelan et al., 2018]). Divvier ([Ali et al., 2019]), Taper ([Zhang et al., 2021]), and CLOAK ([Wheeler et al., 2026]) all attempt to remove poorly aligned characters from protein alignments, with Divvier being the strictest, and CLOAK being the gentlest filter among those three options ([Wheeler et al., 2026]). Here, we present an alternative approach called **trimmed log-likelihood**, a robust phylogenetics method, that automatically detects and trims such sites @@ -583,8 +579,6 @@ Where to go from here? See [Command Reference](Command-Reference) for a complete list of all options available in IQ-TREE. -[Capella-Gutiérrez et al., 2009]: https://doi.org/10.1093/bioinformatics/btp348 -[Castresana, 2000]: https://doi.org/10.1093/oxfordjournals.molbev.a026334 [Gadagkar et al., 2005]: https://doi.org/10.1002/jez.b.21026 [Kishino et al., 1990]: https://doi.org/10.1007/BF02109483 [Kishino and Hasegawa, 1989]: https://doi.org/10.1007/BF02100115 From 51d9bb55ae5a24f26052911ab853541ad4c080f5 Mon Sep 17 00:00:00 2001 From: Andrew Wheeler <105318561+phylowheeler@users.noreply.github.com> Date: Wed, 8 Jul 2026 15:29:42 -0700 Subject: [PATCH 09/30] Update Advanced-Tutorial.md --- doc/Advanced-Tutorial.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/Advanced-Tutorial.md b/doc/Advanced-Tutorial.md index 3205118..1eb644d 100644 --- a/doc/Advanced-Tutorial.md +++ b/doc/Advanced-Tutorial.md @@ -523,15 +523,15 @@ This will print an output file `example.phy.mlrate` that looks like: 10 0.00001 -Trimming alignment sites by likelihood +Trimming alignments --------------------------------------
+Phylogenetic analysis relies on well aligned sequences. One initial filter can be to remove removes non-homologous sequences prior to alignment using Prequal ([Whelan et al., 2018]). -Phylogenetic inference can be highly sensitive to fast-evolving, saturated or -erroneous sites in a sequence alignment. Many newer methods focus on removing alignment erros without removing whole alignment columns to avoid losing information about closely related species. Prequal removes non-homologous sequences prior to sequence alignment ([Whelan et al., 2018]). Divvier ([Ali et al., 2019]), Taper ([Zhang et al., 2021]), and CLOAK ([Wheeler et al., 2026]) all attempt to remove poorly aligned characters from protein alignments, with Divvier being the strictest, and CLOAK being the gentlest filter among those three options ([Wheeler et al., 2026]). +When filtering errors from alignments, many newer methods focus on removing alignment errors without removing whole alignment columns to avoid losing information about closely related species. Divvier ([Ali et al., 2019]), Taper ([Zhang et al., 2021]), and CLOAK ([Wheeler et al., 2026]) all attempt to remove poorly aligned characters from protein alignments, with Divvier being the strictest, and CLOAK being the gentlest filter among those three options ([Wheeler et al., 2026]). Here, we present an alternative approach called **trimmed log-likelihood**, a -robust phylogenetics method, that automatically detects and trims such sites +robust phylogenetics method, that automatically detects and trims sites that are fast-evolving, saturated, or erroneous during tree search directly. The trimed log-likelihood method works by dynamically excluding a user-defined proportion of sites From 8f97c5ff3a096eae299b710ab48c08beece9cf9e Mon Sep 17 00:00:00 2001 From: Andrew Wheeler <105318561+phylowheeler@users.noreply.github.com> Date: Wed, 8 Jul 2026 15:34:50 -0700 Subject: [PATCH 10/30] Update Advanced-Tutorial.md --- doc/Advanced-Tutorial.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/Advanced-Tutorial.md b/doc/Advanced-Tutorial.md index 1eb644d..59511dd 100644 --- a/doc/Advanced-Tutorial.md +++ b/doc/Advanced-Tutorial.md @@ -526,9 +526,10 @@ This will print an output file `example.phy.mlrate` that looks like: Trimming alignments --------------------------------------
-Phylogenetic analysis relies on well aligned sequences. One initial filter can be to remove removes non-homologous sequences prior to alignment using Prequal ([Whelan et al., 2018]). -When filtering errors from alignments, many newer methods focus on removing alignment errors without removing whole alignment columns to avoid losing information about closely related species. Divvier ([Ali et al., 2019]), Taper ([Zhang et al., 2021]), and CLOAK ([Wheeler et al., 2026]) all attempt to remove poorly aligned characters from protein alignments, with Divvier being the strictest, and CLOAK being the gentlest filter among those three options ([Wheeler et al., 2026]). +Phylogenetic analysis relies on well aligned sequences. One initial filter can be to remove non-homologous sequences prior to alignment using Prequal ([Whelan et al., 2018]). + +When filtering errors from alignments, removing whole alignment columns can risk losing information about closely related species. Three programs that avoid this are Divvier ([Ali et al., 2019]), Taper ([Zhang et al., 2021]), and CLOAK ([Wheeler et al., 2026]). All attempt to remove poorly aligned characters from protein alignments, with Divvier being the strictest, and CLOAK being the gentlest filter among those three options ([Wheeler et al., 2026]). Here, we present an alternative approach called **trimmed log-likelihood**, a robust phylogenetics method, that automatically detects and trims sites that are fast-evolving, saturated, or erroneous From 8bfe1a338e05dd9a0b17831ac7d2d399b54250fc Mon Sep 17 00:00:00 2001 From: Andrew Wheeler <105318561+phylowheeler@users.noreply.github.com> Date: Wed, 8 Jul 2026 15:39:21 -0700 Subject: [PATCH 11/30] Update Advanced-Tutorial.md --- doc/Advanced-Tutorial.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/Advanced-Tutorial.md b/doc/Advanced-Tutorial.md index 59511dd..0bc57fd 100644 --- a/doc/Advanced-Tutorial.md +++ b/doc/Advanced-Tutorial.md @@ -527,7 +527,7 @@ Trimming alignments --------------------------------------
-Phylogenetic analysis relies on well aligned sequences. One initial filter can be to remove non-homologous sequences prior to alignment using Prequal ([Whelan et al., 2018]). +Aligned sites that do not share a common ancestry do not provide useful information for phylogenetic inference. One initial filter is to remove non-homologous sequences prior to alignment using Prequal ([Whelan et al., 2018]). When filtering errors from alignments, removing whole alignment columns can risk losing information about closely related species. Three programs that avoid this are Divvier ([Ali et al., 2019]), Taper ([Zhang et al., 2021]), and CLOAK ([Wheeler et al., 2026]). All attempt to remove poorly aligned characters from protein alignments, with Divvier being the strictest, and CLOAK being the gentlest filter among those three options ([Wheeler et al., 2026]). From be3270eb38b10a30fba1effe2051f13e6ddff857 Mon Sep 17 00:00:00 2001 From: Andrew Wheeler <105318561+phylowheeler@users.noreply.github.com> Date: Wed, 8 Jul 2026 15:46:09 -0700 Subject: [PATCH 12/30] Update Advanced-Tutorial.md --- doc/Advanced-Tutorial.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/Advanced-Tutorial.md b/doc/Advanced-Tutorial.md index 0bc57fd..918fbf0 100644 --- a/doc/Advanced-Tutorial.md +++ b/doc/Advanced-Tutorial.md @@ -527,9 +527,9 @@ Trimming alignments --------------------------------------
-Aligned sites that do not share a common ancestry do not provide useful information for phylogenetic inference. One initial filter is to remove non-homologous sequences prior to alignment using Prequal ([Whelan et al., 2018]). +Aligned sites that do not share a common ancestry do not provide useful information for phylogenetic inference. Prequal is designed to remove non-homologous sequences prior to alignment ([Whelan et al., 2018]). -When filtering errors from alignments, removing whole alignment columns can risk losing information about closely related species. Three programs that avoid this are Divvier ([Ali et al., 2019]), Taper ([Zhang et al., 2021]), and CLOAK ([Wheeler et al., 2026]). All attempt to remove poorly aligned characters from protein alignments, with Divvier being the strictest, and CLOAK being the gentlest filter among those three options ([Wheeler et al., 2026]). +Even when sequences as a whole are homologous, there can still be sites that are not homologous for all species in the alignment. Care is required when filtering these sites, since removing whole alignment columns can risk losing information about closely related species. Three programs that avoid this are Divvier ([Ali et al., 2019]), Taper ([Zhang et al., 2021]), and CLOAK ([Wheeler et al., 2026]). All attempt to remove poorly aligned characters from protein alignments, with Divvier being the strictest, and CLOAK being the gentlest filter among those three options ([Wheeler et al., 2026]). Here, we present an alternative approach called **trimmed log-likelihood**, a robust phylogenetics method, that automatically detects and trims sites that are fast-evolving, saturated, or erroneous From f765622654d46c49729463a7c46d01441e525bdd Mon Sep 17 00:00:00 2001 From: Andrew Wheeler <105318561+phylowheeler@users.noreply.github.com> Date: Wed, 8 Jul 2026 15:51:18 -0700 Subject: [PATCH 13/30] Update Advanced-Tutorial.md --- doc/Advanced-Tutorial.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/Advanced-Tutorial.md b/doc/Advanced-Tutorial.md index 918fbf0..05a1ed0 100644 --- a/doc/Advanced-Tutorial.md +++ b/doc/Advanced-Tutorial.md @@ -529,7 +529,7 @@ Trimming alignments Aligned sites that do not share a common ancestry do not provide useful information for phylogenetic inference. Prequal is designed to remove non-homologous sequences prior to alignment ([Whelan et al., 2018]). -Even when sequences as a whole are homologous, there can still be sites that are not homologous for all species in the alignment. Care is required when filtering these sites, since removing whole alignment columns can risk losing information about closely related species. Three programs that avoid this are Divvier ([Ali et al., 2019]), Taper ([Zhang et al., 2021]), and CLOAK ([Wheeler et al., 2026]). All attempt to remove poorly aligned characters from protein alignments, with Divvier being the strictest, and CLOAK being the gentlest filter among those three options ([Wheeler et al., 2026]). +Even when sequences as a whole are homologous, there can still be sites that are not homologous for all sequences in the alignment. Removing whole alignment columns can risk losing information about closely related species. Three programs that convert predicted misaligned characters to dashes without removing whole columns are Divvier ([Ali et al., 2019]), Taper ([Zhang et al., 2021]), and CLOAK ([Wheeler et al., 2026]). All attempt to remove poorly aligned characters from protein alignments, with Divvier being the strictest, and CLOAK being the gentlest filter among those three options ([Wheeler et al., 2026]). Here, we present an alternative approach called **trimmed log-likelihood**, a robust phylogenetics method, that automatically detects and trims sites that are fast-evolving, saturated, or erroneous From 1d600bd1ebb7d4993939061ae4b4026145621b06 Mon Sep 17 00:00:00 2001 From: Andrew Wheeler <105318561+phylowheeler@users.noreply.github.com> Date: Wed, 8 Jul 2026 15:57:22 -0700 Subject: [PATCH 14/30] Update Advanced-Tutorial.md --- doc/Advanced-Tutorial.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/Advanced-Tutorial.md b/doc/Advanced-Tutorial.md index 05a1ed0..73e028c 100644 --- a/doc/Advanced-Tutorial.md +++ b/doc/Advanced-Tutorial.md @@ -529,7 +529,7 @@ Trimming alignments Aligned sites that do not share a common ancestry do not provide useful information for phylogenetic inference. Prequal is designed to remove non-homologous sequences prior to alignment ([Whelan et al., 2018]). -Even when sequences as a whole are homologous, there can still be sites that are not homologous for all sequences in the alignment. Removing whole alignment columns can risk losing information about closely related species. Three programs that convert predicted misaligned characters to dashes without removing whole columns are Divvier ([Ali et al., 2019]), Taper ([Zhang et al., 2021]), and CLOAK ([Wheeler et al., 2026]). All attempt to remove poorly aligned characters from protein alignments, with Divvier being the strictest, and CLOAK being the gentlest filter among those three options ([Wheeler et al., 2026]). +Even when sequences as a whole are homologous, there can still be sites that are not homologous for all sequences in the alignment. Removing whole alignment columns can risk losing information about closely related species. Three programs that convert predicted misaligned characters to dashes without removing whole columns are Divvier ([Ali et al., 2019]), Taper ([Zhang et al., 2021]), and CLOAK ([Wheeler et al., 2026]). There is a tradeoff between precision and recall in alignmet filtering, with stricter filters removing more errors, but also removing more correctly aligned characters. These programs performed best out of the tested alignment filtering methods on a precision recall curve, with Divvier being the strictest filter and CLOAK being the gentlest filter ([Wheeler et al., 2026]). Here, we present an alternative approach called **trimmed log-likelihood**, a robust phylogenetics method, that automatically detects and trims sites that are fast-evolving, saturated, or erroneous From 263b8366e7af38434063488d0f8aae28edbfd712 Mon Sep 17 00:00:00 2001 From: Andrew Wheeler <105318561+phylowheeler@users.noreply.github.com> Date: Wed, 8 Jul 2026 15:58:23 -0700 Subject: [PATCH 15/30] Update Advanced-Tutorial.md --- doc/Advanced-Tutorial.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/Advanced-Tutorial.md b/doc/Advanced-Tutorial.md index 73e028c..a17873a 100644 --- a/doc/Advanced-Tutorial.md +++ b/doc/Advanced-Tutorial.md @@ -529,7 +529,7 @@ Trimming alignments Aligned sites that do not share a common ancestry do not provide useful information for phylogenetic inference. Prequal is designed to remove non-homologous sequences prior to alignment ([Whelan et al., 2018]). -Even when sequences as a whole are homologous, there can still be sites that are not homologous for all sequences in the alignment. Removing whole alignment columns can risk losing information about closely related species. Three programs that convert predicted misaligned characters to dashes without removing whole columns are Divvier ([Ali et al., 2019]), Taper ([Zhang et al., 2021]), and CLOAK ([Wheeler et al., 2026]). There is a tradeoff between precision and recall in alignmet filtering, with stricter filters removing more errors, but also removing more correctly aligned characters. These programs performed best out of the tested alignment filtering methods on a precision recall curve, with Divvier being the strictest filter and CLOAK being the gentlest filter ([Wheeler et al., 2026]). +Even when sequences as a whole are homologous, there can still be sites that are not homologous for all sequences in the alignment. Removing whole alignment columns can risk losing information about closely related species. Three programs that convert predicted misaligned characters to dashes without removing whole columns are Divvier ([Ali et al., 2019]), Taper ([Zhang et al., 2021]), and CLOAK ([Wheeler et al., 2026]). There is a tradeoff between precision and recall in alignmet filtering, with stricter filters removing more errors, but also removing more correctly aligned characters. These three programs performed best out of the tested alignment filtering methods on a precision recall curve, with Divvier being the strictest filter and CLOAK being the gentlest filter ([Wheeler et al., 2026]). Here, we present an alternative approach called **trimmed log-likelihood**, a robust phylogenetics method, that automatically detects and trims sites that are fast-evolving, saturated, or erroneous From 720432aa8a781df3422f5cf98ead387e6ea986b1 Mon Sep 17 00:00:00 2001 From: Andrew Wheeler <105318561+phylowheeler@users.noreply.github.com> Date: Wed, 8 Jul 2026 16:04:23 -0700 Subject: [PATCH 16/30] Update Advanced-Tutorial.md --- doc/Advanced-Tutorial.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/doc/Advanced-Tutorial.md b/doc/Advanced-Tutorial.md index a17873a..063ffa4 100644 --- a/doc/Advanced-Tutorial.md +++ b/doc/Advanced-Tutorial.md @@ -531,9 +531,7 @@ Aligned sites that do not share a common ancestry do not provide useful informat Even when sequences as a whole are homologous, there can still be sites that are not homologous for all sequences in the alignment. Removing whole alignment columns can risk losing information about closely related species. Three programs that convert predicted misaligned characters to dashes without removing whole columns are Divvier ([Ali et al., 2019]), Taper ([Zhang et al., 2021]), and CLOAK ([Wheeler et al., 2026]). There is a tradeoff between precision and recall in alignmet filtering, with stricter filters removing more errors, but also removing more correctly aligned characters. These three programs performed best out of the tested alignment filtering methods on a precision recall curve, with Divvier being the strictest filter and CLOAK being the gentlest filter ([Wheeler et al., 2026]). -Here, we present an alternative approach called **trimmed log-likelihood**, a -robust phylogenetics method, that automatically detects and trims sites that are fast-evolving, saturated, or erroneous -during tree search directly. +IQ-Tree contains a method for triming sites directly during tree search called **trimmed log-likelihood**. The trimed log-likelihood method works by dynamically excluding a user-defined proportion of sites with the lowest log-likelihood values during the tree search. As the search From b3a0a255c9ead1c1bb6067670b02887e2905db36 Mon Sep 17 00:00:00 2001 From: Andrew Wheeler <105318561+phylowheeler@users.noreply.github.com> Date: Wed, 8 Jul 2026 16:05:46 -0700 Subject: [PATCH 17/30] Update Advanced-Tutorial.md --- doc/Advanced-Tutorial.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/doc/Advanced-Tutorial.md b/doc/Advanced-Tutorial.md index 063ffa4..ca90af3 100644 --- a/doc/Advanced-Tutorial.md +++ b/doc/Advanced-Tutorial.md @@ -531,9 +531,8 @@ Aligned sites that do not share a common ancestry do not provide useful informat Even when sequences as a whole are homologous, there can still be sites that are not homologous for all sequences in the alignment. Removing whole alignment columns can risk losing information about closely related species. Three programs that convert predicted misaligned characters to dashes without removing whole columns are Divvier ([Ali et al., 2019]), Taper ([Zhang et al., 2021]), and CLOAK ([Wheeler et al., 2026]). There is a tradeoff between precision and recall in alignmet filtering, with stricter filters removing more errors, but also removing more correctly aligned characters. These three programs performed best out of the tested alignment filtering methods on a precision recall curve, with Divvier being the strictest filter and CLOAK being the gentlest filter ([Wheeler et al., 2026]). -IQ-Tree contains a method for triming sites directly during tree search called **trimmed log-likelihood**. - -The trimed log-likelihood method works by dynamically excluding a user-defined proportion of sites +IQ-Tree contains a method for trimming sites directly during tree search called **trimmed log-likelihood**. +The trimmed log-likelihood method works by dynamically excluding a user-defined proportion of sites with the lowest log-likelihood values during the tree search. As the search progresses, the likelihood of each site is recalculated at each step using current tree and model parameters. This ensures that site removal is always From 1b8e31b04916078e08e0d9cc7f3fd85f8ecb3ec6 Mon Sep 17 00:00:00 2001 From: Andrew Wheeler <105318561+phylowheeler@users.noreply.github.com> Date: Wed, 8 Jul 2026 16:11:43 -0700 Subject: [PATCH 18/30] Update Substitution-Models.md --- doc/Substitution-Models.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/Substitution-Models.md b/doc/Substitution-Models.md index fe8ec30..d31aac7 100644 --- a/doc/Substitution-Models.md +++ b/doc/Substitution-Models.md @@ -205,7 +205,7 @@ IQ-TREE supports all common empirical amino-acid exchange rate matrices (alphabe | VT | nuclear | General 'Variable Time' matrix ([Mueller and Vingron, 2000]). | | WAG | nuclear | General matrix ([Whelan and Goldman, 2001]). | ->**TIP**: Cleaned "QC" substitution models have been shown to improve inference of mammalian gene trees relative to substitution models trained on unfiltered data ([Wheeler, et al. 2026]). Nevertheless, ModelFinder is more likely to choose unfiltered Q substitution models, which tend to be better fit for gene alignments that also have no cleaning or gentle cleaning. Therefore, an alternative to using ModelFinder would be to select a QC model a priori. QC models should always be used in conjunction with the +F option to use emperical amino acid frequencies. +>**TIP**: Cleaned "QC" substitution models make mammalian single copy ortholog trees on average more similar to the mammalian species tree, compared to trees infered using substitution models trained on unfiltered data ([Wheeler, et al. 2026]). Nevertheless, ModelFinder is more likely to choose unfiltered Q substitution models, which tend to be better fit for gene alignments that also have no cleaning or gentle cleaning. Therefore, an alternative to using ModelFinder would be to select a QC model a priori. QC models should always be used in conjunction with the +F option to use emperical amino acid frequencies. {: .tip} ### Protein mixture models From fe189e080577a088b4814c11d8c8a9e8cc12c4c6 Mon Sep 17 00:00:00 2001 From: Andrew Wheeler <105318561+phylowheeler@users.noreply.github.com> Date: Wed, 8 Jul 2026 16:18:05 -0700 Subject: [PATCH 19/30] Update Substitution-Models.md --- doc/Substitution-Models.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/Substitution-Models.md b/doc/Substitution-Models.md index d31aac7..82a6bf7 100644 --- a/doc/Substitution-Models.md +++ b/doc/Substitution-Models.md @@ -205,7 +205,7 @@ IQ-TREE supports all common empirical amino-acid exchange rate matrices (alphabe | VT | nuclear | General 'Variable Time' matrix ([Mueller and Vingron, 2000]). | | WAG | nuclear | General matrix ([Whelan and Goldman, 2001]). | ->**TIP**: Cleaned "QC" substitution models make mammalian single copy ortholog trees on average more similar to the mammalian species tree, compared to trees infered using substitution models trained on unfiltered data ([Wheeler, et al. 2026]). Nevertheless, ModelFinder is more likely to choose unfiltered Q substitution models, which tend to be better fit for gene alignments that also have no cleaning or gentle cleaning. Therefore, an alternative to using ModelFinder would be to select a QC model a priori. QC models should always be used in conjunction with the +F option to use emperical amino acid frequencies. +>**TIP**: Cleaned "QC" substitution models make mammalian single copy ortholog trees on average more similar to the mammalian species tree, compared to trees infered using substitution models trained on unfiltered data ([Wheeler, et al. 2026]). Nevertheless, alignment errors in the focal gene alignment will cause ModelFinder to prefer unfiltered Q to QC. Therefore, we recommend users either select a model using ModelFinder, or select a QC model a priori. QC models should always be used in conjunction with the +F option to use emperical amino acid frequencies. {: .tip} ### Protein mixture models From 2e28035a0fec0c1b95076c8a627f2e6ce3f55576 Mon Sep 17 00:00:00 2001 From: Andrew Wheeler <105318561+phylowheeler@users.noreply.github.com> Date: Wed, 8 Jul 2026 16:22:54 -0700 Subject: [PATCH 20/30] Update Substitution-Models.md --- doc/Substitution-Models.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/Substitution-Models.md b/doc/Substitution-Models.md index 82a6bf7..a903a3a 100644 --- a/doc/Substitution-Models.md +++ b/doc/Substitution-Models.md @@ -205,7 +205,7 @@ IQ-TREE supports all common empirical amino-acid exchange rate matrices (alphabe | VT | nuclear | General 'Variable Time' matrix ([Mueller and Vingron, 2000]). | | WAG | nuclear | General matrix ([Whelan and Goldman, 2001]). | ->**TIP**: Cleaned "QC" substitution models make mammalian single copy ortholog trees on average more similar to the mammalian species tree, compared to trees infered using substitution models trained on unfiltered data ([Wheeler, et al. 2026]). Nevertheless, alignment errors in the focal gene alignment will cause ModelFinder to prefer unfiltered Q to QC. Therefore, we recommend users either select a model using ModelFinder, or select a QC model a priori. QC models should always be used in conjunction with the +F option to use emperical amino acid frequencies. +>**TIP**: Cleaned "QC" substitution models make mammalian single copy ortholog trees on average more similar to the mammalian species tree ([Wheeler, et al. 2026]). Nevertheless, alignment errors in the focal gene alignment will cause ModelFinder to prefer unfiltered Q to QC. If QC is desired, ModelFinder should not be used. QC models should always be used in conjunction with the +F option to use emperical amino acid frequencies. {: .tip} ### Protein mixture models From 5fcd33f7ffb7c7be9c8f9f35e1d1cce82eb71264 Mon Sep 17 00:00:00 2001 From: Andrew Wheeler <105318561+phylowheeler@users.noreply.github.com> Date: Wed, 8 Jul 2026 16:30:45 -0700 Subject: [PATCH 21/30] Update How-to-clean-an-alignment-before-making-a-gene-tree.md --- .../How-to-clean-an-alignment-before-making-a-gene-tree.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/recipes/How-to-clean-an-alignment-before-making-a-gene-tree.md b/doc/recipes/How-to-clean-an-alignment-before-making-a-gene-tree.md index 0e82055..77aa1f7 100644 --- a/doc/recipes/How-to-clean-an-alignment-before-making-a-gene-tree.md +++ b/doc/recipes/How-to-clean-an-alignment-before-making-a-gene-tree.md @@ -18,7 +18,7 @@ IQ-TREE: http://www.iqtree.org/ # Example Usage -The first step is to generate an ensemble of alignments using the "stratified" option in Muscle5. By default, this creates a set of 16 variant alignments, all output in a single ensemble fasta file. +The first step is to generate an ensemble of alignments using the "stratified" option in Muscle5. This creates a set of 16 variant alignments, all output in a single ensemble fasta file, instead of a single alignment. ``` muscle -align sequences.fasta -stratified -output ensemble.efa From 6f4035c4dff8f1e3c5c6e587d4f673d068cee96b Mon Sep 17 00:00:00 2001 From: Andrew Wheeler <105318561+phylowheeler@users.noreply.github.com> Date: Wed, 8 Jul 2026 17:01:43 -0700 Subject: [PATCH 22/30] Update How-to-clean-an-alignment-before-making-a-gene-tree.md Expanded the description of how CLOAK works and when it should be used --- .../How-to-clean-an-alignment-before-making-a-gene-tree.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/recipes/How-to-clean-an-alignment-before-making-a-gene-tree.md b/doc/recipes/How-to-clean-an-alignment-before-making-a-gene-tree.md index 77aa1f7..1da97be 100644 --- a/doc/recipes/How-to-clean-an-alignment-before-making-a-gene-tree.md +++ b/doc/recipes/How-to-clean-an-alignment-before-making-a-gene-tree.md @@ -10,6 +10,8 @@ docid: 100 This recipe explains how to filter out errors from a single gene multiple sequence alignment, prior to gene tree inference, using the "CLOAK" function in Muscle5. +CLOAK filters based on consensus among an ensemble of alternative alignments. First, an alignment ensemble is inferred by varying the initial guide tree and HMM parameters used for multiple sequence alignment. If characters are found to be homologous across all alignemnts in the ensemble, they are retained in the filtered alignment. Otherwise they are replaced by dashes. If a whole alignment column does not have consistent homology, but subsets of the column do, the column is split into 2 or columns that are both retained in the filtered alignment. This makes the program act as a gentle filter, since it removes a singificant number of non-homologous characters without losing many informative homologies. CLOAK is recommended for filtering single gene alignments, which are often sensitive to any loss of data from their limited number of informative sites ([Wheeler, et al. 2026]). + # What you need Muscle5: https://www.drive5.com/muscle/ @@ -36,3 +38,5 @@ Arguments: for that column to be retained in the output. Default value of 2 if not specified - -output : Name of the file where the filtered MSA will be written. By default this will be {input_file_name}.cloak.fa + +[Wheeler, et al. 2026]: https://doi.org/10.64898/2025.12.01.691663 From 364dc861787df32dd24a1c7ac6ee6dbcd16ce842 Mon Sep 17 00:00:00 2001 From: Andrew Wheeler <105318561+phylowheeler@users.noreply.github.com> Date: Wed, 8 Jul 2026 17:23:25 -0700 Subject: [PATCH 23/30] Update Substitution-Models.md --- doc/Substitution-Models.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/Substitution-Models.md b/doc/Substitution-Models.md index a903a3a..e1a53c1 100644 --- a/doc/Substitution-Models.md +++ b/doc/Substitution-Models.md @@ -197,10 +197,10 @@ IQ-TREE supports all common empirical amino-acid exchange rate matrices (alphabe | Q.pfam | nuclear | General Q matrix ([Minh et al., 2021]) estimated from Pfam version 31 database ([El-Gebali et al., 2018]). | | Q.plant | nuclear | Q matrix ([Minh et al., 2021]) estimated for plants ([Ran et al., 2018]). | | Q.yeast | nuclear | Q matrix ([Minh et al., 2021]) estimated for yeasts ([Shen et al., 2018]). | -| QC.mammal | nuclear | Q matrix ([Minh et al., 2021]) estimated on cleaned alignments ([Wheeler, et al. 2026]) for mammals from OrthoMaM database version 12 ([Allio, et al. 2024]) . | -| QC.pfam | nuclear | Q matrix ([Minh et al., 2021]) estimated on cleaned alignments ([Wheeler, et al. 2026]) from Pfam version 31 database ([El-Gebali et al., 2018]). | -| QC.archaea | nuclear | Q matrix ([Minh et al., 2021]) estimated on cleaned alignments ([Wheeler, et al. 2026]) for archaeal from the HAMAP database ([Lima, et al. 2009]). | -| QC.bacteria | nuclear | Q matrix ([Minh et al., 2021]) estimated on cleaned alignments ([Wheeler, et al. 2026]) for bacteria from the HAMAP database ([Lima, et al. 2009]). | +| QC.mammal | nuclear | Q matrix ([Minh et al., 2021]) estimated on cleaned alignments ([Wheeler et al., 2026]) for mammals from OrthoMaM database version 12 ([Allio et al., 2024]) . | +| QC.pfam | nuclear | Q matrix ([Minh et al., 2021]) estimated on cleaned alignments ([Wheeler et al., 2026]) from Pfam version 31 database ([El-Gebali et al., 2018]). | +| QC.archaea | nuclear | Q matrix ([Minh et al., 2021]) estimated on cleaned alignments ([Wheeler et al., 2026]) for archaeal from the HAMAP database ([Lima et al., 2009]). | +| QC.bacteria | nuclear | Q matrix ([Minh et al., 2021]) estimated on cleaned alignments ([Wheeler et al., 2026]) for bacteria from the HAMAP database ([Lima et al., 2009]). | | rtREV | viral | Retrovirus ([Dimmic et al., 2002]). | | VT | nuclear | General 'Variable Time' matrix ([Mueller and Vingron, 2000]). | | WAG | nuclear | General matrix ([Whelan and Goldman, 2001]). | @@ -505,7 +505,7 @@ Users can fix the parameters of the model. For example, `+I{0.2}` will fix the p [davidcerny/GEOS26100-Fall2022]: https://github.com/davidcerny/GEOS26100-Fall2022 [Černý & Simonoff (2023)]: https://doi.org/10.1038/s41598-023-35784-3 [Harada et al., 2026]: https://doi.org/10.64898/2026.06.18.729217 -[Wheeler, et al. 2026]: https://doi.org/10.64898/2025.12.01.691663 -[Allio, et al. 2024]: https://doi.org/10.1093/nar/gkad834 -[Lima, et al. 2009]: https://doi.org/10.1093/nar/gkn661 +[Wheeler et al., 2026]: https://doi.org/10.64898/2025.12.01.691663 +[Allio et al., 2024]: https://doi.org/10.1093/nar/gkad834 +[Lima et al., 2009]: https://doi.org/10.1093/nar/gkn661 [Ferretti et al., 2026]: https://doi.org/10.1093/sysbio/syag037 From df30f84f69d7a0ab00a354d54a71e9495ea14ca5 Mon Sep 17 00:00:00 2001 From: Andrew Wheeler <105318561+phylowheeler@users.noreply.github.com> Date: Thu, 9 Jul 2026 16:48:18 -0700 Subject: [PATCH 24/30] Update Estimating-amino-acid-substitution-models.md Added a section on how to filter alignments prior to substitution model training to generate QC matrices --- doc/Estimating-amino-acid-substitution-models.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc/Estimating-amino-acid-substitution-models.md b/doc/Estimating-amino-acid-substitution-models.md index fbb64b1..d84a15b 100644 --- a/doc/Estimating-amino-acid-substitution-models.md +++ b/doc/Estimating-amino-acid-substitution-models.md @@ -171,6 +171,14 @@ To estimate a non-reversible model from a folder of alignments: grep -A 22 "can be used as input for IQ-TREE" train_plant.NONREV.iqtree | tail -n21 > NQ.plant +Filtering substitution model training alignments +----------------------------------- + +Multiple sequence alignments often contain errors that can inflate the rates of less mutationally accessible amino acid substitutions that require 2-3 nucleotide substitutions ([Wheeler et al., 2026]). To train cleaned QC substitution models, we recommend using the program Divvier to filter each alignment in the training set, using the partial filtering option ([Ali et al., 2019]). Divvier can be found at (https://github.com/simonwhelan/Divvier). + +The filtered alignments can then be used to infer Q matrices as described above. Because the amino acid frequency parameters inferred for a QC matrix will reflect the frequencies of the filtered alignments rather than the originals, QC substitution models should always use emperical amino acid frequencies with the +F setting. Note that the +F option is not valid for nonreversible NQ matrices, which cannot be separated into symmetric exchangeability scores and amino acid frequencies. Therefore filtered alignments should not be used to train NQ models. + + Estimating linked exchangeabilities ----------------------------------- @@ -240,3 +248,5 @@ If you use the GTRspmix model, please cite the following paper: [Ran et al., 2018]: https://doi.org/10.1098/rspb.2018.1012 [Banos et al., 2024]: https://doi.org/10.1093/molbev/msae174 [Harada et al., 2026]: https://doi.org/10.64898/2026.06.18.729217 +[Wheeler et al., 2026]: https://doi.org/10.64898/2025.12.01.691663 +[Ali et al., 2019]: https://doi.org/10.1093/molbev/msz142 From 69f92db78d3b01252203addec407bbf366e6a941 Mon Sep 17 00:00:00 2001 From: Andrew Wheeler <105318561+phylowheeler@users.noreply.github.com> Date: Thu, 9 Jul 2026 17:14:48 -0700 Subject: [PATCH 25/30] Update Substitution-Models.md --- doc/Substitution-Models.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/Substitution-Models.md b/doc/Substitution-Models.md index e1a53c1..3d196b9 100644 --- a/doc/Substitution-Models.md +++ b/doc/Substitution-Models.md @@ -435,6 +435,9 @@ IQ-TREE supports all common rate heterogeneity across sites models: | +R | FreeRate model ([Yang, 1995]; [Soubrier et al., 2012]) that generalizes the `+G` model by relaxing the assumption of Gamma-distributed rates. The number of categories can be specified with e.g. `+R6` (default 4 categories if not specified). Gamma models produce artifacts, especially for large datasets ([Ferretti et al., 2026]). FreeRate models are therefore recommended. | | +I+R | invariable site plus FreeRate model. | +>**TIP**: TIP: ModelFinder (-m MFP option) tests the FreeRate model, whereas the outdated (-m TEST) does not. To test only the FreeRate model, use (-mrate I,R,I+R). +{: .tip} + Users can fix the parameters of the model. For example, `+I{0.2}` will fix the proportion of invariable sites (pinvar) to 0.2; `+G{0.9}` will fix the Gamma shape parameter (alpha) to 0.9; `+I{0.2}+G{0.9}` will fix both pinvar and alpha. To fix the FreeRate model parameters, use the syntax `+Rk{w1,r1,...,wk,rk}` (replacing `k` with the number of categories). Here, `w1, ..., wk` are the weights and `r1, ..., rk` the rates for each category. >**NOTE**: For the `+G` model IQ-TREE implements the _mean_ approximation approach ([Yang, 1994]). The same is done in RAxML and PhyML. However, some programs like TREE-PUZZLE implement the _median_ approximation approach, which makes the resulting log-likelihood not comparable. IQ-TREE can change to this approach via the `-gmedian` option. From 8f447610a3d901f19880ad2c75ca1718dfaac6f6 Mon Sep 17 00:00:00 2001 From: Andrew Wheeler <105318561+phylowheeler@users.noreply.github.com> Date: Mon, 13 Jul 2026 12:01:11 -0700 Subject: [PATCH 26/30] Update How-to-clean-an-alignment-before-making-a-gene-tree.md fixed typos --- .../How-to-clean-an-alignment-before-making-a-gene-tree.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/recipes/How-to-clean-an-alignment-before-making-a-gene-tree.md b/doc/recipes/How-to-clean-an-alignment-before-making-a-gene-tree.md index 1da97be..cb55a3c 100644 --- a/doc/recipes/How-to-clean-an-alignment-before-making-a-gene-tree.md +++ b/doc/recipes/How-to-clean-an-alignment-before-making-a-gene-tree.md @@ -10,7 +10,7 @@ docid: 100 This recipe explains how to filter out errors from a single gene multiple sequence alignment, prior to gene tree inference, using the "CLOAK" function in Muscle5. -CLOAK filters based on consensus among an ensemble of alternative alignments. First, an alignment ensemble is inferred by varying the initial guide tree and HMM parameters used for multiple sequence alignment. If characters are found to be homologous across all alignemnts in the ensemble, they are retained in the filtered alignment. Otherwise they are replaced by dashes. If a whole alignment column does not have consistent homology, but subsets of the column do, the column is split into 2 or columns that are both retained in the filtered alignment. This makes the program act as a gentle filter, since it removes a singificant number of non-homologous characters without losing many informative homologies. CLOAK is recommended for filtering single gene alignments, which are often sensitive to any loss of data from their limited number of informative sites ([Wheeler, et al. 2026]). +CLOAK filters based on consensus among an ensemble of alternative alignments. First, an alignment ensemble is inferred by varying the initial guide tree and HMM parameters used for multiple sequence alignment. If characters are found to be homologous across all alignments in the ensemble, they are retained in the filtered alignment. Otherwise they are replaced by dashes. If a whole alignment column does not have consistent homology, but subsets of the column do, the column is split into 2 or columns that are both retained in the filtered alignment. This makes the program act as a gentle filter, since it removes a significant number of non-homologous characters without losing many informative homologies. CLOAK is recommended for filtering single gene alignments, which are often sensitive to any loss of data from their limited number of informative sites ([Wheeler, et al. 2026]). # What you need From c7b97e822565cbbef4fa04778e1d033aee638b61 Mon Sep 17 00:00:00 2001 From: Andrew Wheeler <105318561+phylowheeler@users.noreply.github.com> Date: Mon, 13 Jul 2026 12:04:52 -0700 Subject: [PATCH 27/30] Update Tutorial.md --- doc/Tutorial.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/Tutorial.md b/doc/Tutorial.md index 72233f3..3343dc4 100644 --- a/doc/Tutorial.md +++ b/doc/Tutorial.md @@ -178,7 +178,7 @@ change the prefix with: This prevents output files being overwritten when you perform multiple analyses on the same alignment within the same folder. -Choosing the right substitution model +Choosing the best-fitting substitution model -------------------------------------
From 7a49b5b005b1491dae807cb2ed64796b8756df08 Mon Sep 17 00:00:00 2001 From: Andrew Wheeler <105318561+phylowheeler@users.noreply.github.com> Date: Mon, 13 Jul 2026 12:08:15 -0700 Subject: [PATCH 28/30] Update Substitution-Models.md --- doc/Substitution-Models.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/Substitution-Models.md b/doc/Substitution-Models.md index 3d196b9..fd055dc 100644 --- a/doc/Substitution-Models.md +++ b/doc/Substitution-Models.md @@ -205,7 +205,7 @@ IQ-TREE supports all common empirical amino-acid exchange rate matrices (alphabe | VT | nuclear | General 'Variable Time' matrix ([Mueller and Vingron, 2000]). | | WAG | nuclear | General matrix ([Whelan and Goldman, 2001]). | ->**TIP**: Cleaned "QC" substitution models make mammalian single copy ortholog trees on average more similar to the mammalian species tree ([Wheeler, et al. 2026]). Nevertheless, alignment errors in the focal gene alignment will cause ModelFinder to prefer unfiltered Q to QC. If QC is desired, ModelFinder should not be used. QC models should always be used in conjunction with the +F option to use emperical amino acid frequencies. +>**TIP**: Cleaned "QC" substitution models make mammalian single copy ortholog trees on average more similar to the mammalian species tree ([Wheeler, et al. 2026]). Nevertheless, alignment errors in the focal gene alignment will cause ModelFinder to prefer unfiltered Q to QC. If QC is desired, ModelFinder should not be used. QC models should always be used in conjunction with the +F option to use empirical amino acid frequencies. {: .tip} ### Protein mixture models From 51b3cc1851da9ef3a371167513335da974b03f09 Mon Sep 17 00:00:00 2001 From: Andrew Wheeler <105318561+phylowheeler@users.noreply.github.com> Date: Mon, 13 Jul 2026 12:16:09 -0700 Subject: [PATCH 29/30] Update Estimating-amino-acid-substitution-models.md --- doc/Estimating-amino-acid-substitution-models.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/Estimating-amino-acid-substitution-models.md b/doc/Estimating-amino-acid-substitution-models.md index d84a15b..2620754 100644 --- a/doc/Estimating-amino-acid-substitution-models.md +++ b/doc/Estimating-amino-acid-substitution-models.md @@ -178,6 +178,9 @@ Multiple sequence alignments often contain errors that can inflate the rates of The filtered alignments can then be used to infer Q matrices as described above. Because the amino acid frequency parameters inferred for a QC matrix will reflect the frequencies of the filtered alignments rather than the originals, QC substitution models should always use emperical amino acid frequencies with the +F setting. Note that the +F option is not valid for nonreversible NQ matrices, which cannot be separated into symmetric exchangeability scores and amino acid frequencies. Therefore filtered alignments should not be used to train NQ models. +If you use the new models trained on cleaned multiple sequence alignments (QC.pfam…), please cite: + +> Andrew L. Wheeler, Chiragdeep Chatur, Peter W Goodman, Robert C Edgar, Gavin A Huttley, Joanna Masel (2026), Improved gene tree inference from removing alignment errors both from focal genes and when training substitution models. in press at Molecular Biology & Evolution. Estimating linked exchangeabilities ----------------------------------- From 43a442dd465726e8fba9eea9f2634625aaa7b613 Mon Sep 17 00:00:00 2001 From: Andrew Wheeler <105318561+phylowheeler@users.noreply.github.com> Date: Mon, 13 Jul 2026 12:50:59 -0700 Subject: [PATCH 30/30] Update Substitution-Models.md --- doc/Substitution-Models.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/Substitution-Models.md b/doc/Substitution-Models.md index fd055dc..899468f 100644 --- a/doc/Substitution-Models.md +++ b/doc/Substitution-Models.md @@ -197,10 +197,14 @@ IQ-TREE supports all common empirical amino-acid exchange rate matrices (alphabe | Q.pfam | nuclear | General Q matrix ([Minh et al., 2021]) estimated from Pfam version 31 database ([El-Gebali et al., 2018]). | | Q.plant | nuclear | Q matrix ([Minh et al., 2021]) estimated for plants ([Ran et al., 2018]). | | Q.yeast | nuclear | Q matrix ([Minh et al., 2021]) estimated for yeasts ([Shen et al., 2018]). | -| QC.mammal | nuclear | Q matrix ([Minh et al., 2021]) estimated on cleaned alignments ([Wheeler et al., 2026]) for mammals from OrthoMaM database version 12 ([Allio et al., 2024]) . | -| QC.pfam | nuclear | Q matrix ([Minh et al., 2021]) estimated on cleaned alignments ([Wheeler et al., 2026]) from Pfam version 31 database ([El-Gebali et al., 2018]). | | QC.archaea | nuclear | Q matrix ([Minh et al., 2021]) estimated on cleaned alignments ([Wheeler et al., 2026]) for archaeal from the HAMAP database ([Lima et al., 2009]). | | QC.bacteria | nuclear | Q matrix ([Minh et al., 2021]) estimated on cleaned alignments ([Wheeler et al., 2026]) for bacteria from the HAMAP database ([Lima et al., 2009]). | +| QC.bird | nuclear | Q matrix ([Minh et al., 2021]) estimated on cleaned alignments ([Wheeler et al., 2026]) for birds ([Jarvis et al., 2015]) . | +| QC.insect | nuclear | Q matrix ([Minh et al., 2021]) estimated on cleaned alignments ([Wheeler et al., 2026]) for insects ([Misof et al., 2014]) . | +| QC.mammal | nuclear | Q matrix ([Minh et al., 2021]) estimated on cleaned alignments ([Wheeler et al., 2026]) for mammals from OrthoMaM database version 12 ([Allio et al., 2024]) . | +| QC.pfam | nuclear | Q matrix ([Minh et al., 2021]) estimated on cleaned alignments ([Wheeler et al., 2026]) from Pfam version 31 database ([El-Gebali et al., 2018]). | +| QC.plant | nuclear | Q matrix ([Minh et al., 2021]) estimated on cleaned alignments ([Wheeler et al., 2026]) for plants ([Ran et al., 2018]) . | +| QC.yeast | nuclear | Q matrix ([Minh et al., 2021]) estimated on cleaned alignments ([Wheeler et al., 2026]) for for yeasts ([Shen et al., 2018]) . | | rtREV | viral | Retrovirus ([Dimmic et al., 2002]). | | VT | nuclear | General 'Variable Time' matrix ([Mueller and Vingron, 2000]). | | WAG | nuclear | General matrix ([Whelan and Goldman, 2001]). |