PalantiR simulates and visualizes complete substitution
histories — every substitution event, with its time, codon, and fitness
context — under time-heterogeneous mutation–selection codon substitution
models and other advanced models, including site-specific fitness
profiles, epistasis between sites, and changes in effective population
size or fitness along a phylogeny.
For installation notes, see this page.
Details on particular models and simulation types can be found on the following pages:
Version 1.3 makes scaling_type = "synonymous" a dS
gauge: branch lengths measure neutral synonymous substitutions per
synonymous opportunity, equivalent to neutral nucleotide substitutions
per site. The former synonymous-event-count convention remains available
as "synonymous-per-codon". Time-heterogeneous simulations
preserve the chosen currency through model shifts. See NEWS.md
for the complete list, including breaking changes.
The simulation engine is validated by a rerunnable notebook that separately tests event-count gauges, the dS gauge under homogeneous and time-heterogeneous GY94 and mutation–selection models, the stationary distribution, and transient rescaling. Each comparison has a pre-stated statistical criterion. Read the current validation report (all tests pass under version 1.3.0), or rerun it from a clone of the repository:
# in validation/, with PalantiR installed
rmarkdown::render("engine_validation.Rmd", params = list(seed = 1))For a larger event-level demonstration, the GY94 history-validation report
simulates 5,000 codons on a 50-taxon tree, reconstructs Goldman–Yang
dN/dS from all recorded substitutions, and visualizes the
branch-specific histories. That historical demonstration explicitly uses
the "synonymous-per-codon" event-count gauge; its
opportunity-corrected dN/dS calculation remains valid. The executable
Jupyter notebook is retained in the repository under
validation/.
Substitution histories under mutation–selection with epistasis
|
A fitness shift under a time-heterogeneous mutation–selection
model
|