Skip to content

0.15.0

Latest

Choose a tag to compare

@github-actions github-actions released this 02 Nov 12:04
· 1 commit to develop since this release
091d7a9

Release notes for sbmlsim 0.15.0

sbmlsim

A release of the likelihood and of PEtab v2. A fit minimizes the negative log-likelihood of the noise models of PEtab or the log posterior with the priors, so the standard deviations of the noise are estimated with the parameters of the model. sbmlsim reads PEtab v2 only: the PEtab test suite (149 of 149 cases, the ones of PEtab v1 converted) and the benchmark collection (at its newest commit, against AMICI 1.2.0) run in PEtab v2. Geometric means are fitted with their geometric standard deviations, and the events of a model evaluate every function of the math of SBML when a change triggers them.

Results which change: a PEtab problem read without the sbmlsim extension is fitted by maximum likelihood (before by least squares), the events which a change triggers and whose math has a function PEtab names otherwise or does not have (they fire now), the sciml formulas with a division by a number (computed as written), and a PEtab problem of PEtab v1, which from_petab refuses.

Features

  • The likelihood and the posterior as the objective of a fit (#428, #430). FitSettings(objective=...) is least_squares (the weighted least squares, the default of a fit defined in python), likelihood (the negative log-likelihood of the training data under the noise model of every mapping, FitMapping.noise, else the normal noise of the errors of the data) or posterior (with the priors of the parameters, the maximum a posteriori estimate). A parameter of a noise formula, e.g. the standard deviation sd_<observable>, is estimated with the parameters of the model. The likelihood is written as residuals for the least squares optimizer, the residual of the data and one of the scale of the noise per point, and the cost of a fit is the negative log-likelihood or log posterior itself, so the threshold of the profile likelihood is the likelihood ratio. A PEtab problem read without the sbmlsim extension is fitted with likelihood, as PEtab defines its objective. Boehm_JProteomeRes2014 reaches the log-likelihood of the benchmark collection (-138.30 against -138.22) with its three standard deviations estimated, Perelson_Science1996 has c, delta and the standard deviation identifiable.
  • The PEtab v2 tutorial as a simulation experiment (#430). examples/petab/tutorial defines the problem of the tutorial of PEtab v2 (Boehm et al. 2014) in python: the experiment epo_stimulation, the observables as ObservableModel, the noise of a placeholder filled with the estimated standard deviations. python -m examples.petab.tutorial writes it with to_petab, compares the tables with the ones of the tutorial, reads it back and fits it.
  • Geometric means are fitted with their geometric SDs (#403, #426). FitData(yid="gmean", yid_gsd="gsd") declares the error of geometric means as their geometric standard deviation, a factor without a unit. A point has the standard deviation of the log-normal distribution with that geometric CV, gmean * sqrt(exp(log(gsd)^2) - 1), for the residuals and the weights, its noise is log-normal with log(gsd) in the likelihood and the PEtab export, the reader reads such noise back as geometric SDs, and the report draws the error bars from gmean / gsd to gmean * gsd.
  • Events evaluate every function of the math of SBML at a change (#299, #419). The trigger, the priority and the assignments of an event which a change triggers are compiled from their MathML with sbmlmath (sbmlsim.sbml_math.compile_math) instead of being written as math of PEtab: floor, ceiling, factorial, quotient, rem, root, xor, implies, relations of more than two arguments, the inverse trigonometric functions, infinity, notanumber and function definitions fire the event at the change as roadrunner fires it during the integration. Only rateOf and delay are still reported. The values are the doubles roadrunner computes (NaN for the root of a negative number, infinity for a division by zero).

Changes

  • PEtab v2 only (#211, #427). PetabReader.from_yaml refuses a problem of PEtab v1. sbmlsim.fit.petab_v2.conversion.convert_v1 converts one with petab.v2.petab1to2 together with its reference simulations, which get the experiments of the measurements. create_petab_omex packages PEtab v2, the examples vendor their problems in PEtab v2. A parameter without a scale whose lower bound is not positive, e.g. log10_k of the encodings of PEtab v2 of the benchmark collection, is searched on the linear scale; the gap sciml-parameter-scale is parameter-scale.
  • The PEtab test suite runs its cases of PEtab v1 as well (#427). The suite is pinned to its newest commit, its 20 cases of PEtab v1 are converted to PEtab v2 at the download and run as the group v1/sbml: 149 of 149 cases pass.
  • The benchmark collection at its newest commit, against AMICI 1.2.0 (#427, #429). A problem is its encoding of PEtab v2 of the collection where it has one, else converted with its simulations. Froehlich_CellSystems2018 is excluded, it takes longer than a problem gets, Crauste_CellSystems2017 is simulated with a tighter integrator. 28 of 34 problems pass. The other six were checked: the simulation tables of Fujita_SciSignal2010, Sneyd_PNAS2002, Zheng_PNAS2012, Perelson_Science1996 and Chen_MSB2009 are not the models at their nominal parameters: the log-likelihood of sbmlsim agrees with the one of AMICI where the one of the tables does not, AMICI 1.2.0 reproduces the simulations of sbmlsim of Chen_MSB2009 to 4e-6 and SciPy the ones of Perelson_Science1996 (regenerated in Benchmark-Models-PEtab#343), and the reference log-likelihood of Chen_MSB2009 of AMICI is stale (AMICI-dev/AMICI#3503); the log-likelihood of Crauste_CellSystems2017 is 1.2e-3 off the one of AMICI.

Fixes

  • evaluate_formula of sciml computes the operations as written (#420, #424). The formulas of the derived changes and the inputs of a network read the numbers as rationals and let sympy evaluate the expression: q / 49 was 0.9999999999999999 for q = 49, rem(q, 49) was 49 and quotient(q, 49) was 0. They are evaluated with sbml_math.math_function, the operations as written and every number the double of its text; the Avogadro constant is the value roadrunner evaluates.
  • A concentration over a dimensionless volume has the unit of its substance (#425). Units.quotient wrote item/ for a species of the unit item in a compartment of a dimensionless unit, which pint does not read, so the benchmark problem Oliveira_NatCommun2021 failed to read its measurements.
  • The PEtab test suite no longer fills an empty column of floats with text, which pandas 4 refuses (#425).

Dependencies

  • petab 0.10.0 or newer is required, its petab1to2 converts an observable on the scale log10 to log-normal noise of the same density.