Skip to content

About

Interactive and reproducible benchmark comparing Direct fitness inference and DiffEvol constraint on genotype-frequency dynamics.

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Two Views of Evolutionary Dynamics

One genotype-frequency trajectory. Two non-equivalent inference views.

CI Release Python License

Interactive · reproducible · scientifically explicit

Latest release · Methods · Scientific scope · Data format


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.

Observed frequencies, Direct fitness, DiffEvol constraint, and paired diagnostic trajectories

Why two views?

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.

Interactive playground

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.

Quick start

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.sh

Then 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-playground

Batch analysis

Synthetic baseline:

two-views-run \
  --config configs/baseline.yaml \
  --outdir playground_output

Uploaded genotype counts:

two-views-run \
  --config configs/baseline.yaml \
  --data examples/example_counts.csv \
  --outdir uploaded_output

The batch workflow writes a reproducibility bundle containing configuration, numerical outputs, diagnostics, preview, warnings, and a SHA-256 manifest.

Scientific interpretation

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.

Primary methods

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.

Reproducibility

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.

Current release

v2.4.2 is the first public GitHub-ready release.

View 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.

Citation

If you use this software in scientific work, cite:

  1. this software repository/release;
  2. the relevant primary method papers above.

GitHub-compatible citation metadata are provided in CITATION.cff.

Contributing

Issues, reproducibility reports, visualization suggestions, and scientifically motivated extensions are welcome.

See CONTRIBUTING.md and SECURITY.md.

License

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.

About

Interactive and reproducible benchmark comparing Direct fitness inference and DiffEvol constraint on genotype-frequency dynamics.

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages