-
Notifications
You must be signed in to change notification settings - Fork 6
Codon frequency estimation
Kenji Fukushima edited this page Feb 21, 2026
·
4 revisions
CSUBST requires codon equilibrium frequencies for codon-model analyses. It uses codon frequencies reported by IQ-TREE when available, and falls back to alignment-based empirical estimation when they are missing in some IQ-TREE 3 codon outputs.
- Parse codon
pi(...)values from the IQ-TREE.iqtreereport. - If codon
pi(...)values are unavailable in IQ-TREE 3 output, estimate frequencies from the input codon alignment.
When fallback estimation is used, CSUBST:
- reads all codons from the input in-frame alignment,
- converts
UtoT, - skips missing or undefined codons,
- expands IUPAC ambiguous symbols into compatible codons,
- splits ambiguous counts equally across compatible codons, and
- normalizes counts so the total frequency is 1.
- This fallback keeps codon-model workflows robust when IQ-TREE 3 output does
not include codon
pi(...)entries. - If codon frequency parsing fails in IQ-TREE 2 output, CSUBST raises an error instead of using this fallback.
- Minh BQ et al. (2020) IQ-TREE 2: New models and efficient methods for phylogenetic inference in the genomic era. Molecular Biology and Evolution 37:1530-1534. DOI:10.1093/molbev/msaa015
- Cornish-Bowden A (1985) Nomenclature for incompletely specified bases in nucleic acid sequences: recommendations 1984. Nucleic Acids Research 13:3021-3030. DOI:10.1093/nar/13.9.3021