From gpvolve v1¶
gpvolve-v2 is a clean-break rewrite. There is no compatibility shim. The
table below maps every v1 public symbol to its v2 equivalent. v1 here
means harmslab/gpvolve v0.2.0
(Aug 2020).
Public API mapping¶
| v1 | v2 |
|---|---|
GenotypePhenotypeMSM(gpm) |
GenotypePhenotypeMSM.from_graph(GenotypePhenotypeGraph.from_gpm(gpm), fitness_column=..., fixation=...) |
msm.build_transition_matrix(model="moran", ...) |
build_transition_matrix(graph, fitness_column=..., fixation="moran", population_size=N) |
msm.stationary (cached property) |
stationary_distribution(msm.transition_matrix) |
msm.eigenvalues, msm.timescales |
timescales(msm.transition_matrix, k=10) |
msm.tpt(source, target) |
forward_committor(P, A=..., B=...), then reactive_flux(P, A=..., B=...) |
msm.sample_paths(...) |
sample_paths(msm, source, [target], convergence=ConvergenceCheck()) |
gpvolve.utils.* |
gpvolve.analysis.* and gpvolve.io.* |
gpvolve.cluster.pcca (msmtools shim) |
gpvolve.cluster.pcca_plus |
gpvolve.visualization.* |
gpvolve.pyplot.* |
Fixation model rename¶
v1 used model="mcclandish" (misspelled). v2 uses
fixation="mccandlish", with mcclandish retained as an alias only so
existing v1 scripts keep working. New code should use mccandlish.
Six v1 bugs explicitly fixed¶
build_transition_matrixcould be called beforeapply_selectionand produced silently wrong results. v2 makesfitness_columna required keyword arg.- Row/column indexing was inconsistent between sparse and dense paths.
v2 locks indices to
gpm.data.indexviagpgraph-v2's int-keyed contract. - Self-loops were sometimes computed from the fixation probability of
itoi, which is not well-defined. v2 always computesP[i, i] = 1 - sum_j P[i, j]after the off-diagonals are filled. - Stochastic path sampling convergence was a Euclidean distance on probability vectors, which conflates Monte Carlo error with mixing. v2 uses ESS + Gelman-Rubin R-hat.
- PCCA+ was a thin wrapper on
msmtools, which is unmaintained. v2 reimplements the Roeblitz-Weber algorithm natively. msm.stationaryused an unstable eigenvector solve for ill-conditioned chains. v2 uses power iteration first and falls back to shifted ARPACK.
Removed surface¶
gpvolve.flux.*merged intogpvolve.paths.tptandgpvolve.paths.flux.- Direct dependency on
gpmap(nowgpmap-v2). - Direct dependency on
gpgraph(nowgpgraph-v2). - Direct dependency on
msmtools(dropped entirely). - Cython hot paths (replaced by Rust via PyO3 in upcoming releases).