Interactive · reproducible · scientifically explicit
Two Views of Evolutionary Dynamics is a reproducible benchmark and interactive playground for examining the same genotype-frequency time series through two mathematically different operators:
- Direct fitness inference — a trailing-window estimate of relative genotype fitness;
- DiffEvol constraint inference — a pointwise normalized constraint relative to mutation-only propagation.
The project is designed to make the comparison visually intuitive without pretending that the two quantities are equivalent.
The same evolutionary trajectory can look different depending on what is being inferred.
| Direct | DiffEvol | |
|---|---|---|
| Output | relative fitness | normalized constraint |
| Temporal support | trailing fitting window | pointwise observation time |
| Mutation reference | known mutation term in the inference equation | mutation-only baseline f(0) W^t |
| Gauge / zero | zero-mean relative-fitness gauge | K_i = 1/G after the display transform |
| Displayed quantity | relative fitness | log(G K_i) |
The paired view is therefore a comparison of two diagnostic coordinates, not a claim that they occupy one common physical phase space.
The Streamlit playground lets you change the synthetic evolutionary scenario and inspect how both methods respond.
You can vary:
- population sample size;
- mutation probability;
- selection strength;
- landscape ruggedness;
- environmental transition timing;
- random seed;
- Direct rolling-window length;
- bootstrap size;
- displayed genotypes;
- inference mutation-model mismatch.
Built-in presets include clean benchmark conditions, abrupt transitions, noisy sampling, rare genotypes, weak identifiability, and mutation-model mismatch.
Uploaded count or frequency tables are validated before analysis.
Recommended setup on Linux and WSL:
git clone https://github.com/spicmaff/two-views-evolution.git
cd two-views-evolution
./setup_env.sh
export PYTHON_BIN="$HOME/.venvs/two_views_evolution_v2_4/bin/python"
./RUN_PLAYGROUND.shThen open the URL printed by the launcher.
Generic Python installation outside a Windows-mounted WSL filesystem:
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -e ".[playground]"
two-views-playgroundSynthetic baseline:
two-views-run \
--config configs/baseline.yaml \
--outdir playground_outputUploaded genotype counts:
two-views-run \
--config configs/baseline.yaml \
--data examples/example_counts.csv \
--outdir uploaded_outputThe batch workflow writes a reproducibility bundle containing configuration, numerical outputs, diagnostics, preview, warnings, and a SHA-256 manifest.
Direct and DiffEvol do not estimate the same physical quantity.
Direct values shown at time t summarize a constant-fitness fit over the configured trailing observation window.
DiffEvol values at time t are pointwise constraints relative to mutation-only propagation from the initial state, followed here by the visualization transform log(G K_i).
For synthetic data, sampled-versus-noise-free correlations are sampling-stability diagnostics. They are not independent biological validation and should not be described as recovery of a universal ground truth.
For uploaded experimental data, the generating truth is unknown, so the software suppresses synthetic recovery claims.
See the full scientific scope and method/equation mapping before interpreting results.
Direct genotype-fitness inference
V. Mohanty & E. I. Shakhnovich (2026),
Direct estimation of genotype fitness from time series.
bioRxiv.
https://doi.org/10.64898/2026.07.18.739367
DiffEvol
D. Lazarev, A. Sappington, G. Chau, R. Zhang & B. Berger (2026),
Constrained Diffusion as a Paradigm for Evolution.
bioRxiv.
https://doi.org/10.64898/2026.03.10.710948
The repository implements and compares these methods while documenting repository-specific extensions separately.
The public release pipeline includes:
- CI on Python 3.10 and 3.12;
- unit and renderer regression tests;
- repository integrity audit;
- playground smoke test;
- versioned source archives;
- Python wheel and source distribution;
- SHA-256 release digests;
- citation metadata;
- explicit scientific provenance.
Publication-oriented rendering additionally records exact configuration, frame schedules, diagnostics, manifests, and hashes.
v2.4.2 is the first public GitHub-ready release.
The scientific inference core retains protocol version 2.3.0. The v2.4 series adds the public playground, packaging, reproducibility infrastructure, CI, and deployment tooling without redefining the two inference operators.
If you use this software in scientific work, cite:
- this software repository/release;
- the relevant primary method papers above.
GitHub-compatible citation metadata are provided in CITATION.cff.
Issues, reproducibility reports, visualization suggestions, and scientifically motivated extensions are welcome.
See CONTRIBUTING.md and SECURITY.md.
Software in this repository is released under the MIT License.
The primary papers remain subject to their respective publication licenses.
Two methods. One trajectory. Explicitly different meanings.
