This analysis implements a relative evolutionary rate test inspired by RERConverge
, also see walkthrough.
A key use-case is a study of how evolutionary rates associate with phenotypes, e.g. the subterranean phenotype, is here.
This analysis requires an alignment of protein sequences, a reference tree with given branch lengths, and a list of branches designated at the test set
.
The reference tree is viewed as providing relative branch lengths, e.g. estimated from a genome-wide species tree alignment.
The RER
analysis fits the following four models and compares them in a variety of ways. A companion visualization module can be found at https://observablehq.com/@spond/rer-viewer
A single alignment-wide branch length scaling parameter Rshared is inferred. It simply scales all the branches relative to the input tree.
Two alignment-wide branch length scaling parameters Rtest, Rbackground are inferred: one for the test branches, and one for the background branches.
All background branches are scaled with the same factor Rbackground. Every branch in the test
set gets its own (independent) branch length.
All branch lengths are inferred independently.
T
the number of test branches
B
the number of background branches
Model | Test Branches | Background Branches | # Parameters |
---|---|---|---|
Proportional | Rshared x ref | Rshared x ref | 1 |
Proportional Partitioned | Rtest x ref | Rbackground x ref | 2 |
Unconstrained Test | Independent | Rbackground | T + 1 |
Unconstrained | Independent | Independent | T + B |
These models form a nested chain:
Proportional
⊂ Proportional Partitioned
⊂ Unconstrained Test
⊂ Unconstrained
An example invocation for a gene (LIM2
) that was found to be accelerated in subterranean lineages in Partha et al.
hyphy RER.bf
--alignment data/LIM2.fa
--tree data/mam120master.tre
--branches nanGal1
--branches hetGla2
--branches HLfukDam1
--branches conCri1
--branches chrAsi1
--labeling-strategy none
Test branches are shown as thicker branches below (colors -- ratio to reference tree branch lengths; blue < 1, grey = 1, red > 1)
Reference | Proportional (Rshared = 0.17) |
---|---|
![]() |
![]() |
Proportional Partitoned (Rtest = 1.5, Rbackground = 0.17) |
Unconstrained Test (Rbackground = 0.17) |
![]() |
![]() |
Unconstrained | |
![]() |
An example invocation for a gene (LIM2
) that was found to be decelerated in subterranean lineages in Partha et al.
hyphy RER.bf
--alignment data/CHST8.fa
--tree data/mam120master.tre
--branches nanGal1
--branches hetGla2
--branches HLfukDam1
--branches conCri1
--branches chrAsi1
--labeling-strategy none
Test branches are shown as thicker branches below (colors -- ratio to reference tree branch lengths; blue < 1, grey = 1, red > 1)
Reference | Proportional (Rshared = 0.47) |
---|---|
![]() |
![]() |
Proportional Partitoned (Rtest = 0.34, Rbackground = 0.47) |
Unconstrained Test (Rbackground = 0.48) |
![]() |
![]() |
Unconstrained | |
![]() |
The RER
analysis will conduct all six nested model pairs likelihood ratio tests (LRT) and report the results as Holm-Bonferroni corrected p-values.
p-values corrected using the Holm-Bonferroni procedure (raw values in parentheses)
Null | Proportional Partitioned | Unconstrained Test | Unconstrained |
---|---|---|---|
Proportional | 0.0000000 (0.00000) | 0.0000000 (0.00000) | 0.0000000 (0.00000) |
Proportional Partitioned | N/A | 0.0000285 (0.00003) | 0.0000000 (0.00000) |
Unconstrained Test | N/A | N/A | 0.0000000 (0.00000) |
p-values corrected using the Holm-Bonferroni procedure (raw values in parentheses)
Null | Proportional Partitioned | Unconstrained Test | Unconstrained |
---|---|---|---|
Proportional | 0.0060750 (0.00202) | 0.0138966 (0.00695) | 0.0000000 (0.00000) |
Proportional Partitioned | N/A | 0.1688029 (0.16880) | 0.0000000 (0.00000) |
Unconstrained Test | N/A | N/A | 0.0000000 (0.00000) |
Null | Alternative | Hypothesis |
---|---|---|
Proportional | Proportional Partitioned | Are average relative (to reference) evolutionary rates different between the two sets of branches? This is the test most directly comparable to the RERConverge test |
Proportional Partitioned | Unconstrained Test | Is there evidence of relative rate (branch length) variation in the test clade, assuming that the background is proportional to the reference tree? |
Unconstrained Test | Unconstrained | Is there evidence of relative rate (branch length) variation in the background branches? |
--model [one of LG, WAG, JTT, JC69, mtMet, mtVer, mtInv, gcpREV, HIVBm, HIVWm, GTR]
WAG
is the default model.
--rv [one None, Gamma, GDD]
None
is the default
--rate-classes [2-10]
4
is the default
This option determines how RER
approaches automatically internal nodes to the test set.
none
: do not label any internal branches automaticallyall-descendants
: [default] label an internal node if and only if ALL of its descendants are labeledsome-descendants
: label an internal node if and only if ANY of its descendants are labeledparsimony
: label internal nodes using parsimony