## Feature Request: RNA Secondary Structure Doublet Models (RNA6/RNA7/RNA16) in IQ-TREE 2/3 and ModelFinder #530
apselvatti-crypto
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary: Requesting the implementation of RNA secondary structure doublet models (analogous to RAxML's
-A S16/S6/S7and IQ-TREE 1.x'sRNA6A/RNA16Aetc.) in IQ-TREE 2/3, including support for ModelFinder model selection over these models.Background and motivation
RNA doublet models treat paired bases in rRNA stem regions as a single character with 16 states (the 16 possible dinucleotides: AA, AC, ..., UU), correctly capturing the co-evolutionary dynamics of compensatory mutations that maintain Watson-Crick base pairing. This is well-established theory (Tillier & Collins 1995; Savill et al. 2001) and has direct practical relevance: standard 4-state nucleotide models applied to stem regions violate the independence assumption between paired sites, leading to biased branch length estimates and potentially incorrect topologies.
The workflow I am currently using (and which I believe is somewhat discussed to in the March 2025 RAxML mailing list thread as "RNA models and bootstrap values of trees inferred with RNA models") involves:
cmalign(Infernal) using Rfam covariance models (RF01960 for 12S, RF02013 for 16S), which produces a Stockholm alignment with a#=GC SS_consannotationSS_conswith a custom Python script to identify stem pairs and unpaired loop positions(i, j)is physically consecutive in the output FASTA — a prerequisite for doublet modelsThe external partitioning is already done. The missing piece is that IQ-TREE 2.3.6 does not recognise
RNA6A,RNA16A, or any RNA doublet model name — the error isERROR: File not found RNA16A, indicating these models were not available in current IQ-TREE versions (2 and 3 tested).What exists and what is missing
A quick survey found the RNA models are implemented in some programs but not in others:
--seqtypehas no RNA option-A+-SThe IQ-TREE 2/3 paper (Minh et al. 2020, MBE) does not mention RNA doublet models among the new features, and I can confirm empirically that they are absent from 2.3.6.
Proposed implementation
I would like to propose two levels of implementation, ordered by complexity:
Level 1 (minimal) — Re-expose RNA doublet model names:
Re-port the RNA6/RNA7/RNA16 model family from IQ-TREE 1.x as named substitution models. The partitioning into stems/loops is already handled externally. The user provides a pre-reordered FASTA where each stem pair occupies two consecutive columns, and specifies the model by name:
This requires the model names to be registered in the model factory and the alignment reader to treat consecutive column pairs as doublet states — analogous to how codon models read three consecutive columns as a single unit.
Level 2 (complete, but likely more complex) — Secondary structure file support + ModelFinder integration:
Support a secondary structure annotation file (similar to RAxML's
-Sflag, accepting dot-bracket or Rfam StockholmSS_consnotation), which automatically handles the internal partitioning:The structure file defines which columns are paired; IQ-TREE handles the rest internally, including bootstrapping stem pairs as units (as Stamatakis confirmed RAxML does in the March 2025 mailing list exchange).
Context and urgency
A recent discussion between leading developers in the field highlights how timely this is. The external partitioning step is already being handled by the community — what remains is IQ-TREE recognising the model family, which is the natural place for this given IQ-TREE's role as the dominant ML phylogenetics framework. For rRNA phylogenomics, implementing doublet models is the single most impactful modelling improvement available, as it corrects a formal violation of the site-independence assumption rather than simply adding parameters.
Thank you for considering this. I am happy to provide test alignments, the partition-preparation script, or any other material that would help with implementation.
Kind regards
Alexandre Pedro Selvatti (Alex)
All reactions