Skip to content

1.3.0

Latest

Choose a tag to compare

@github-actions github-actions released this 25 Sep 11:51
· 2 commits to develop since this release
40214d4

Release notes for pkpdutils 1.3.0

Minor release of pkpdutils which compares the non-compartmental analysis against the public benchmark suite of the NonCompart validation report (#103): all eight scenarios (theophylline and indomethacin, intravenous bolus, 0.25 h infusion and extravascular dose, linear and linear-up / log-down trapezoids) against the published Phoenix WinNonlin output and against PKNCA 0.12.1 and NonCompart 0.8.4 run on the same data, plus analytical profiles with an exact answer. Every parameter of every subject agrees with all three tools, to the digits the published tables carry. The comparison found one important difference, now fixed: the area of an extravascular dose whose first sample comes after the dose. The new pkpdutils.crosswalk writes and reads the result tables of the three tools, and every result carries the predicted variants of the extrapolated parameters.

Important fixes

  • The area of an extravascular single dose starts at the dose. A curve whose first sample comes after the dose now gets a zero inserted at the dose time for the areas (never for the terminal regression), as for an infusion and as Phoenix WinNonlin, PKNCA and NonCompart all do. Up to 1.2.0 the area of such a curve started at its first sample, which was deliberately left out of the zero rule in 1.2.0; the benchmark shows that every reference tool applies it, and without it auc_last, auc_all, auc_inf_obs, aumc_*, mrt, cl_f, vz_f and the extrapolated fractions of the extravascular indomethacin profiles were up to 13 % off. A curve with a sample at the dose (the theophylline study) is unchanged. partial_auc and the urine analysis already applied the rule; the documentation of nca_urine described it.
  • The NCA figure shades the area the analysis computed. plot_nca, plot_nca_grid and draw_nca_panel shade AUC(0-tlast) from the dose, with the value the analysis inserts there (the back-extrapolated C0 after a bolus, 0 after an infusion or an extravascular dose) and a dotted segment to the first sample; before, the shading started at the first sample and left out the area the reported number contains.

Breaking changes

  • auc_last, auc_all, auc_inf_obs, auc_inf_pred, aumc_last, aumc_inf, mrt, thalf_eff, cl_f, vz_f, auc_extrap_fraction, the dose normalized areas and everything computed from them (summaries, ratios, bioequivalence, the uncertainty) change for an extravascular single dose curve whose first sample is after the dose; see "Important fixes". A BLQ value at the dose which a rule drops leaves the same gap and is filled with the same zero.
  • Every NCAResult of a single dose analysis carries the new variables below, so to_dataframe, to_pp and the tables have more columns.

Non-compartmental analysis

  • The predicted variants of Phoenix WinNonlin and PKNCA, from the value of the terminal regression at tlast (clast_pred): aumc_inf_pred, mrt_pred, cl_pred / cl_f_pred, vz_pred / vz_f_pred, vss_pred, auc_inf_pred_dn, auc_extrap_fraction_pred and auc_back_extrap_fraction_pred; and aumc_extrap_fraction, aumc_extrap_fraction_pred and mrt_last, the mean residence time to the last measurable value. The mean residence times of an infusion are corrected by half its duration. Their CDISC codes (AUMCIFP, MRTEVIFP / MRTIBIFP / MRTICIFP, CLP, CLFP, VZP, VZFP, VSSP, AUCIFPD, AUCPEP, AUCPBEP, AUMCPEO, AUMCPEP, MRTEVLST / MRTIBLST / MRTICLST) are extracted from the same NCI EVS terminology file as the others, and the fractions are written as percentages in the PP domain.

Data formats

  • pkpdutils.crosswalk, the result tables of other tools: to_winnonlin / write_winnonlin / read_winnonlin (the "Final Parameters Pivoted" table of Phoenix WinNonlin), to_pknca_results / write_pknca_results / read_pknca_results (the long table of as.data.frame(pk.nca(...))) and to_noncompart / write_noncompart / read_noncompart (the table of NonCompart::tblNCA), with the name maps WINNONLIN_NAMES, PKNCA_NAMES, NONCOMPART_NAMES and their route dependent parts. The writers export the percentages of the tools, the readers return the variables of pkpdutils with fractions, so a published result compares column by column.
  • Timecourses.from_dataframe(dose_duration=...) reads the infusion duration from a column, constant per sample or one per dose with dose_time.

Validation

  • docs/benchmark_datasets.md: the eight scenarios with every setting in docs/data/benchmarks/scenarios.csv, the code of the comparison, the largest deviation per parameter and tool, the exported tables and the analytical profiles (the exact monoexponential bolus and the convergence of the trapezoid on a Bateman curve). Every table is the printed output of the code above it, pasted by scripts/benchmark_datasets.py; tests/docs/test_benchmark_datasets.py fails when the page is stale and tests/nca/test_benchmark_datasets.py asserts the agreement within 1e-8.
  • docs/data/benchmarks/ holds the theophylline and indomethacin datasets (moved from tests/data/validation/), the eight WinNonlin tables of the report unchanged and the PKNCA and NonCompart results, which scripts/benchmark_datasets.R recomputes.

Python

  • Python 3.15 is supported and tested on Linux, macOS and Windows (#104).

Documentation

  • The snippets of the documentation may read the directories of docs/data/ as well.
  • The pages whose output depends on the extravascular zero (the quickstart, the workflows, NCA, uncertainty, bioequivalence, data formats, units, urinary excretion) and the example figures are regenerated.