Perelson_Science1996 data and model fixes - #323
Open
m-philipps wants to merge 4 commits into
Open
m-philipps wants to merge 4 commits into
m-philipps wants to merge 4 commits into
Conversation
…322) The measurement table held crudely digitised values read off the figure in Perelson et al. (1996). The underlying data are publicly released by Hulin Wu's group as "Early Intensive Viral Dynamic Data"; the PEtab problem uses patient ID 4 there (median ratio of the digitised to the released series 1.010; no other patient in the release is within a factor of 8). Replace all 16 values and their sampling times with the released ones. The digitised values were accurate to a few percent except at t=0.25 d, which was off by a factor of 1.78 (1.86e6 instead of 1.04e6 copies/ml). The times were read off the x-axis rather than taken from the nominal sampling schedule (hours 0/2/4/6/12/18/24/30/36/42/48, then days 3-7), drifting by up to 46 min. Refitting the problem as-is to the corrected data moves the optimum to c = 1.907, delta = 0.529, closer to the published c = 2.06, delta = 0.53 than the digitised data's optimum (c = 1.861, delta = 0.547). Data source: https://sph.uth.edu/dept/bads/faculty-home/hulinwu/datasets/early-intensive-viral-dynamic-data Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The problem implements the plasma HIV-1 RNA time course of a single
patient, patient 105 of the publication (ID 4 in the data release).
Name the observable accordingly instead of task0_model0_perelson1_V,
which carried no information about what is measured.
PEtab requires the noise placeholder to be spelled
noiseParameter${n}_${observableId}, so the noise parameter is renamed
along with it: sd_task0_model0_perelson1_V -> sd_patient_105.
The id does not occur in the SBML model. petablint passes.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Rename four ids to the notation of the publication: Vin -> V_I infectious virions, present before the drug took effect Vni -> V_NI non-infectious virions, produced after the drug took effect NN -> N virions produced per infected cell over its lifetime K0 -> k infection rate constant Vin/Vni were particularly easy to misread, being one transposition apart and resembling the paper's V_NI. c, delta, T0 and V already matched. Tstar keeps its name, since SBML ids cannot contain "*". Only the id, species and ci occurrences were edited, so the model file keeps its formatting. The right-hand sides of the ODE system, assembled from the stoichiometry and the kinetic laws, are bit-identical to those of the previous model under the renaming; libsbml reports no new warnings and petablint passes. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Three changes to make the problem the one solved in the publication, plus the bookkeeping they entail. Time base. Eq. 6 of the paper is not a function of time since dosing: its t = 0 is the onset of the drug effect, which for patient 105 follows dosing by a measured pharmacologic delay of 6 h. Subtract 0.25 d from the sampling times and drop the three measurements taken before the onset, which lie outside the model's domain (16 -> 13 measurements). Initial conditions. V0 becomes an estimated parameter, as the Fig. 1 caption states it was in the publication. The other initial values follow from the pre-treatment quasi steady state and are now SBML initial assignments rather than literals, so they track V0, c and delta: V_I(0) = V0, V(0) = V0 and Tstar(0) = c*V0/(N_virions*delta). Steady-state coupling of k. The same steady state gives c = N_virions*k*T0, so k is an initial assignment c/(N_virions*T0) and no longer a free parameter. This is required, not cosmetic: with k held at a literal the model drifts from Eq. 6 as soon as the estimated c moves -- by up to 13 % at c = 1.5 -- so V0 would have been estimated against the wrong model. Noise. The observable's noiseFormula is the literal 1 and the sd_ parameter is gone, making the objective the unweighted sum of squared log10 residuals, which is the nonlinear least squares problem the paper solves. The noiseParameters column is dropped from both measurement and simulation tables. The burst size is named N_virions rather than N because N is SymPy's numeric-evaluation function, and AMICI parses SBML initial assignments through SymPy; a parameter called N makes the model fail to import. Validation: AMICI at the nominal parameters agrees with Eq. 6 to 2e-8, and re-estimating recovers the values published for patient 105 -- c = 2.062, delta = 0.525, V0 = 1.832e6 against 2.06, 0.53, 1.86e6 -- so the nominal parameters now sit essentially at the optimum. simulatedData is regenerated from the model at the nominal parameters, which also fixes the measurement/ simulation row mismatch that made petab.v1.calculate.calculate_llh raise IndexError for this problem (see #278); calculate_llh and AMICI now agree on -199.60959155685103. petablint passes, README updated with bmp-create-overview --update. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #322 and addresses the
Perelson_Science1996entry in #278.Details in the new
Benchmark-Models/Perelson_Science1996/README.md.ID 4)kas coupled toc** viac = N_virions*k*T0t = 0is the onset of the drug effect, 6 h after dosing for this patient. Times were shifted by −0.25 d; the three pre-onsetmeasurements were dropped.
noiseFormulawas updated to match the nonlinear least squares optimisation from the paper: Fix the noise parameter to 1simulatedDatausing AMICI at the nominal parametersREADME.mdrefreshed withbmp-create-overview --update