Programming

Languages FORTRAN

NONMEM PharmML & SO – Estimation Tools exchange formats Monolix winBUGS R Matlab PharmML SO for models used in Simulation (CTS) Tools Simulx R Matlab Simcyp Simulator QSP and PMx Optimal PFIM PopED Design Tools Maciej J Swat ([email protected]) EMBL-EBI On behalf of the DDMoRe consorum Outline

Variability Model

Parameter Model Model Covariate Model Definition § IMI/DDMoRe – brief introducon Structural Model Observation Model

NONMEM/MONOLIX § Exchange standards & databases Dataset Interventions • PharmML Observations Trial Covariates Design Occasions - connecon to SBML TollSettings

RawResults EXPLICIT TRIAL DESIGN Arms

Task Design Spaces • SO Information Simulation Step Model Estimation Diagnostic • ProbOnto Modelling Estimation Step Simulations Steps Design Evaluation

§ Optimal Design Optimisation Conclusions Design

MDL PML MDL LogNormal2 LogNormal3 ( , v ) LogNormal1 PML ( m , ) ( , ) MDL

LogNormal4 MDL LogNormal7 ( m , cv ) ( N , N )

LogNormal5 LogNormal6 ( , ) ( m , g )

MDL PML Timeline

- Conditional statements - Mixture models Release legend - DE redesign - Bayesian inference - Nonparam distributions Minor - User-def trafos/distr PharmML - Updated mapping rules - Redesigned design - Stats/Nary operators changes - Dosing scaling - Transition matrix - Autocorr residual errors SO (Optimal design) 0.3.1 0.7-0.7.2 0.3 0.8.1 0.9 Spec ProbOnto - Discrete data models (Count, 1.0 Minor 0.1 0.2 update Categorical, Time-To-Event) PK Macros changes - DDEs 0.3 0.8 1.1 2.0 2.5 - Matrices/Vectors 0.6 - 2nd 0.2public 0.0.1 0.5.1 0.5 release - Higher - External datasets var levels - NONMEM file driven design 0.4.1 - Lookup-tables & Interpolation Minor - Structure 0.4 - Optimal changes 150 distr. changes Design 219 rels. - Six basic - Revised TrialDesign (CDISC) sections - UncertML 0.3.1 105 distr. 160 rels. 109 distr. - Extended residual error model 180 rels. Minor 0.3 - ML & MKS 81 distr. New HFs/SFs changes Proposals 57 distr. >120 rels. - Continuous data models - Variability, Covariate, Parameter, Structural, Observation Models 0.2.1 - 1st public - TrialDesign - Estimation/Simulation tasks 0.2 release 0.1

M0 M12 M24 M36 M48 M60 M66

March 2011 March 2012 March 2013 March 2014 March 2015 March 2016 August 2016 Changes and extensions in recent 2 years – only PharmML related

PharmML 0.6 - 28th Jan 2015 PharmML 0.8.1 - 16th March 2016 - Discrete data models - ParametersToEstimate added to optimal design (OD) - PK macros - Stage definition added in OD - Delay Differential Equations, DDE - ODEs allowed in conditional statements - Support for software settings in external files and specification PharmML 0.7 - 2nd July 2015 of output files - ProbOnto - ontology and knowledge base of parametric - New values added to ‘columnType’, removed redundant ones probability distributions - first introduction of the - Hierarchical models & Bayesian inference support PharmML 0.9 - 20th July 2016 - Complete redesign of the trial design and optimal design - Mixture models support * mixtures of distributions * mixtures of structural models (wsmm, bsmm) PharmML 0.7.2 - 4th Sept 2015 - New DE notation - encodable are ODEs, DDEs & PDEs with Design optimization and evaluation tasks support. boundary and initial conditions - Autocorrelation models of residual errors PharmML 0.8 - 11th January 2016 - BoxCox2 & user-defined transformations - Assignment statements - User-defined distributions - Conditional statements - Updated covariates, occasions/design spaces handling in TD - Nested piecewise statements - Exclusion and inclusion criteria for covariates - Probability functions support (PDF, CDF, HZ and SF) - Categorical covariates building (clustering) - Empirical distributions support - Observation model extensions - multiple models and models - Random realisations in conditionals permitted - Transition matrix for Markov models - Tool-specific settings support - N-ary operators - Statistical operators - Conditional ignorance

PharmML & SO – Big Picture

Programming

Languages FORTRAN Tools generating NONMEM PharmML Estimation Tools

(MDL-IDE or Monolix winBUGS R Matlab infix2pharmml) PharmML SO Simulation (CTS) Tools Simulx R Matlab Simcyp Simulator SBML

Optimal PFIM PopED Recording of Encoding of model, trial design Design Tools results from and modelling tasks various tasks

5 Typical NLME model with trial design

Structural model Covariate model

Parameter model Other covariates

Trial design

Variability model Parameter Variability Parent Variability Model Level Residual Variability Level Parameter Distribution PharmML is about … Population General Structured w. Parameter Model Fixed/Random Effcts Individual Distribution General Pair-wise Correlation Structure Variability Reference Matrix Interpolation (cont) Model Transformation Covariate Model Categorical/ Definition Continuous Distribution Assignment Algebraic Eqs Model PK Macros Structural Model ODE Initial Condition DDE History Distribution Continuous General

Standard Var.Ref. Observation Model Count PMF Categorical PMF/Transition Matrix Discrete Hazard/Survival Fct Time-To-Event Censoring NONMEM/MONOLIX Mapping/ Column/Target/ Dataset Transformation Category Bolus Administrations Infusion Washout Actions Variable Reset Interventions Lookup Table Individual Dosing Dose Administrations Time Amount Interventions-Combinations Trial Observation Continuous Discrete Design Indiv. Observations Design Observations Lookup Table Observations Combinations

EXPLICIT TRIAL DESIGN Covariate Model Covariates Indiv. Covariates Occasions Start/End Points / Arms ArmSize, DoseAmount Times, Duration, Stage, NumberArms/Samples/Times, ObsTimes, Refs Reference to any design element with space Design Spaces definition

Simulation Step Observations Algorithm Operation Property Parameter Intitial Estimate Estimation Step Estimation Lower/Upper Bound Dataset/Observation Modelling Reference Steps FIM Design Evaluation Optimize On Method Task Compute 7 Cost Design Optimisation Prior Information Software Settings Mathemacal formalism 1 – standard connuous/discrete models

ObservationModel CountData

ContinuousData Distribution Type Structured Type CategoricalData Equation Type

TimeToEventData Usually

i.e. drug concentration as predicted by the structural model

StructuralModel ParameterModel 8

Structured Type ODE Distribution Type Equation Type Algebraic Eq.

PK macros

CovariateModel VariabilityModel

Distribution Hierarchical structures for Transformation - Parameter related variability Interpolation - Residual error related variability New covariate ObservationModel CountData

ContinuousData Distribution Type Structured Type CategoricalData Equation Type Mathemacal formalism 2 TimeToEventData – structural/parameter/covariate/Usually

variability modelsi.e. drug concentration as predicted by the structural model

StructuralModel ParameterModel

Structured Type ODE Distribution Type Equation Type Algebraic Eq.

PK macros

CovariateModel VariabilityModel

Distribution Hierarchical structures for Transformation - Parameter related variability Interpolation - Residual error related variability New covariate 9 Selected models 1

Drug-drug interaction models – ‘open’ form models Count data models

A pharmacodynamic model for a combined effect, E, a function of two

drug doses, d1 and d2, which does not have a closed form.

Markov models

10 Selected models 2 – (pregnant) woman PBPK model

LUNGS

BRAIN Bois et al. FAT HEART MUSCLE MARROW SKIN ADRENALS OTHER LUNGS THYROID BRAIN BREAST FAT KIDNEYS HEART MUSCLE MARROW PANCREAS SKIN ADRENALS VENOUS VENOUS BLOOD SPLEEN

ARTERIAL BLOOD OTHER THYROID STOMACH STOMACH LUMEN THYMUS KIDNEYS GUT GUT LUMEN VENOUS VENOUS BLOOD ARTERIAL BLOOD LIVER SPLEEN UTERUS PANCREAS PLACENTA LIVER GUT AMNIOTIC FLUID Woman model implemented already in PharmML

11 PharmML can handle single subject and populaon data

Individual data Mulple subject data

y = f(t , ) + g(t ; , ⇠) ✏ 1 j n j j j j   Experimental Model Error data prediction |{z} | {z } | {z } y = f(x , ) + g(x , , ⇠) ✏ 1 i N, 1 j n ij ij i ij i ij     i Experimental Model Error data prediction 12 |{z} | {z } | {z } Model – data mapping

M O D T E R L I D A L E F I D N E S I I T G I O N ID TIME Y AMT WT SEX N 1 0 0 100 65 1 1 10 1.5 . 65 1 1 20 6.8 . 65 1 ...... 2 0 0 100 72 0 2 12 2 . 72 0 2 21 5.9 . 72 0 ...... SBML in DDMoRe environment

NONMEM Estimation Tools

Monolix winBUGS R Matlab Tools generating PharmML (MDL-IDE or infix2pharmml) PharmML Simulation (CTS) Tools SO Simulx R Matlab Simcyp Simulator

SBML

PFIM PopED Recording of Encoding of model, trial design OED Tools results from and modelling tasks various tasks Interoperability in SB/QSP and PMX ca. 1 year ago

I nt eroperabilit y in Syst ems Biology I nt eroperabilit y in Pharmacomet rics

CellDesigner WinBUGS AMIGO MONOLIX NONMEM Toolbox PySCeS

simulx MATLAB Copasi SBML SBW PharmML

PFIM R

SBtoolbox2 and >200(!) other tools BioModels SIMCYP PopED Database Simulator

Selected SBML compatible software tools ur r e n t D D M o R e t a r ge t t o o l s Where PharmML and core SBML overlap

Variability Model Parameter Variability Parent Variability Model Level Residual Variability Level Parameter Model Model Parameter Covariate Model Distribution Definition Population Structural Model General Structured w. Parameter Model Observation Model Fixed/Random Effcts Individual NONMEM/MONOLIX Distribution Dataset General Interventions Pair-wise Correlation Structure Variability Reference Matrix Observations Interpolation (cont) Model / Transformation Trial Covariates Covariate Model Categorical Design Definition Continuous Distribution Core Occasions Assignment SBML Algebraic Eqs EXPLICIT TRIAL DESIGN Arms PK Macros Structural Model Design Spaces ODE Initial Condition DDE History Simulation Step Distribution Continuous General Estimation Step Modelling Standard Var.Ref. Observation Model Count PMF Steps Design Evaluation Categorical PMF/Transition Matrix Discrete Hazard/Survival Fct Design Optimisation Time-To-Event Censoring Structure of PharmML: DDMoRe (Cyprotex & SBML) provides bi-directional model definition, trial design translator between PharmML and SBML and modelling steps Interoperability in SB/QSP and PMX today

I nt eroperabilit y in Syst ems Biology I nt eroperabilit y in Pharmacomet rics

CellDesigner WinBUGS AMIGO MONOLIX NONMEM Toolbox PySCeS

simulx MATLAB Copasi SBML SBW PharmML DDMoRe Bi-directional converter PFIM R SBtoolbox2 and >200(!) other tools BioModels SIMCYP PopED Database Simulator

Selected SBML compatible software tools C ur r e n t D D M o R e t a r ge t t o o l s SB – QSP – PMX: data types and objecves

Clinical phase Preclinical Early Clinical Late Clinical Quantitative Systems Discipline Pharmacology Translational PKPD Pharmacometrics

Data type Frequently sampled single subject data (Sparse) Population data

Drug - Disease/ Drug - Target Drug - Pathway/Tissue Drug/PBPK - Organism Main objective Population

Model exchange formats SBML PharmML

Thanks to the available converters between SBML and PharmML, these two exchange formats have the potential to cover the entire spectrum of M&S in Systems Biology, Quantitative Systems Pharmacology and Pharmacometrics. Programming

Languages FORTRAN

NONMEM Estimation Tools

Monolix winBUGS R Matlab

SO – Standard Output PharmML SO Simulation (CTS) Tools Simulx R Matlab Simcyp Simulator

Optimal PFIM PopED Design Tools

On behalf of the DDMoRe consorum SO - storing and retrieving typical M&S results

The Standard Output (SO) represents a tool-independent format for storing typical output produced in a PMx/QSP workflow. It aims at: § providing a flexible storage structure for typical results of M&S analyses performed in any DDMoRe target tool; § enabling effecve data flow across tasks to ensure opmal interacons among soware tools and, then, extend the modeling capabilies of the workflow; § facilitang informaon retrieval for post-processing and reporng, by allowing immediate access to M&S results.

20 SO structure (latest spec…)

MLE Tool Settings PosteriorMean Population Bayesian PosteriorMedian Estimates Mean OtherMethod DataFile Raw Results Median GraphicsFile FIM CovarianceMatrix CorrelationMatrix ToolName MLE StandardError Name RelatStandardError Message Content AsymptoticCI Task Severity ConditionNumber Information OutputFilePath Precision StandDevPosterior RunTime Population Bayesian PosteriorDistrib NumberChains Estimates PercentilesCI NumberIterations CorrelationMatrix CovarianceMatrix StandardDeviation Diagnostic IndivObsPredict OtherMethod StandardError StructuralModel VPC PercentilesCI Model RandomEffects PosteriorDistribution Diagnostic Diagnostic RelationIndiv Estimation AsymptoticCI IndividualParams ParamsCovariates Mean PDFIndivParams Estimates Median Mode Individual EffectMeang Estimates SimulatedProfiles RandomEffects EffectMedian IndivParameters EffectMode RandomEffects EtaShrinkage Covariates StandardDeviation Simulations Precision Regressors Individual EstimatesDistrib Population Estimates PercentilesCI Parameters SimulationBlock ResidualTable Dosing Residuals RawResultsFile EpsShrinkage Predictions Likelihood FIM LogLikelihood CovarianceMatrix Deviance ParamPrecision ToolObjFunction Optimal OFMeasures Criteria Design IndivContribToLL Tests AIC Information SimulatedData BIC Criteria OptimalDesignBlock Design DIC

21 Standard Output (SO) – Structure

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ds="http://www.pharmml.org/pharmml/0.8/Dataset" ... xmlns:ct="http://www.pharmml.org/pharmml/0.8/CommonTypes" xmlns:po="http://www.pharmml.org/probonto/ProbOnto" ... xsi:schemaLocation="http://www.pharmml.org/so/0.3/StandardisedOutput http://www.pharmml.org/so/0.3/StandardisedOutput" ... implementedBy="MJS" writtenVersion="0.3.1" metadataFile="warfarin_PK_ODE_SO_FULL.rdf" id="i1"> ...

...

...

... ... Tool settings ... ... Raw results Task information Simulation

... ... ...

... ...

... ...

... ...

... ...

... ... Estimation ... ... Optimal design Model diagnostic

22 BER2 ZIP1 BBIN1 ZINB1 BS1 ZIGP1 BUR1 BUGS UD2 CATU1 UD1 GAM2 Monolix CMP1 TRU1 N3 LOGN5 F1 GAM1 DP1 TR1 NB1 ST2 GOM1 B1 LAP2 ERL1 ProbOnto TN1 BER1 CHIS1 LOGN2 WB2 LOGN1 EXP2 RIC1 BIN1 EXP1 GUM1 N2 Ontology and NIG1 CATO1 U1 FR2 ST1 PARI1 WB1 NONMEM GNB1 NB4 POI1 Knowledge Base STAN RAY1 N1 SN1 GP1 NB2 FR1 BIN2 SU1 of Probability NAK1 CAU1 EMG1 GP2 LOGU1 HGEOM1 IGAM1 NB3 NB6 GP3 LOGN6 IB1 PARII1 NB5 GEOM1 Distribuons LOGN4 OL1 POI2 SICS1 HN1 SKN1 WDM1 LOGN3 VM1 HS1 LOGL2 IGAU1 LOM1 LAP1 LOGL1 LOGITN1 CHF ISF H(x) Z(a) ProbOnto SF PPF HF S(x) G(a) h(x) CDF PDF URL: probonto.org F(x) f(x) Re-parameterizaon relaonships

m/ g m g § Interoperability background: LN3 X Y = log(X) various tools support different log LN1 parameterisaons, e.g. log-normal ST.DEV. distribuon exp LN4 § When moving model from tool to natural scale log scale MEDIAN, m MODE MEDIAN tool MODE MEAN, N MEAN, –> re-parameterisaon is needed Other parameters used on natural scale: and on log scale: LN2 LN6 COEFF OF VARIATION, cv VARIANCE, v § ProbOnto stores the formulas GEOMETRIC ST.DEV., g PRECISION, ST.DEV., N LN7 LN5

MDL PML MDL LogNormal2 LogNormal3 ( , v ) LogNormal1 PML ( m , ) ( , ) MDL

LogNormal4 MDL LogNormal7 ( m , cv ) ( N , N )

LogNormal5 LogNormal6 ( , ) ( m , g )

MDL PML CHF ISF H(x) Z(a) SF PPF HF Figure: Re-parameterizaon relaonships implemented in ProbOnto and S(x) 24 G(a) h(x) their support in target languages/tools. CDF PDF F(x) f(x) LN1…LN7 re-parameterisaons

CHF ISF H(x) Z(a) SF PPF HF S(x) 25 G(a) h(x) screenshots from the ProbOnto 2.0 specification CDF PDF F(x) f(x) ProbOnto – coverage of univariates

CHF ISF H(x) Z(a) SF PPF HF S(x) G(a) h(x)

CDF PDF F(x) f(x) Applicaon of ProbOnto in PharmML

Problem description: Count data models require the specification of the according PMF (probability mass function), here e.g. for the Zero-inflated Poisson

PMF implemented using ProbOnto –> full interoperability by using the code names of the distribuon and its parameters

CHF ISF H(x) Z(a) SF PPF HF S(x) G(a) h(x) PMF implemented explicitly –> error prone 27 CDF PDF process and limited interoperability F(x) f(x) Conclusions

PharmML and SO cover both model definion and tool output and have the potenal to improve the way modelers work today by • Facilitang smooth and lossless transmission of models between tools. • Enabling complex workflows based on standard model and output definion. • Improving reproducibility of research. • Easier reporng and bug tracking. • Improving interacon with regulatory agencies. • Facilitang the use of exisng models, see e.g. BioModels database of computaonal models of biological processes (SBML). • Smulang development of new tools and methods. ProbOnto • Facilitates encoding, and annotaon of stascal models Future direcons

§ DDMoRe foundaon – post August 2016

• keeping products updated winBUGS NONMEM Matlab • developing further the Monolix soware infrastructure § Get in touch with Simulx DDMoRe foundaon FORTRAN PharmML § Write your own Berkeley translator for PFIM Madonna

Berkeley Madonna R or acslX PopED Simcyp Simulator or hire an expert Contribuons

PharmML Variability Model Parameter Model Model Covariate Model Definition § Swat MJ, S Moodie, SM Wimalaratne, NR Kristensen, M Lavielle, A Mari, Structural Model

Observation Model P Magni, MK Smith, R Bizzoo, L Paso, E Mezzalana, E Comets, C Sarr, NONMEM/MONOLIX Dataset N Terranova, E Blaudez, P Chan, J Chard, K Chatel, M Chenel, D Edwards, Interventions Observations

Trial Covariates C Franklin, T Giorgino, M Glont, P Girard, P Grenon, K Harling, AC Hooker, Design Occasions

R Kaye, R Keizer, C Klo, JN Kok, N Kokash, C Laibe, C Laveille, G Lesni, F EXPLICIT TRIAL DESIGN Arms Mentre, A Munafo, R Nordgren, HB Nyberg, ZP Parra-Guillen, E Plan, B Design Spaces Simulation Step Ribba, G Smith, IF Troconiz, F Yvon, PA Milligan, L Harnisch, M Karlsson, H Modelling Estimation Step Steps Design Evaluation

Hermjakob and N Le Novère Design Optimisation

TollSettings SO RawResults Task Information

§ Nadia Terranova, Marc Lavielle, Mike K Smith, Emmanuelle Model Estimation Comets, Kajsa Harling, Rikard Nordgren, Duncan Edwards, Diagnostic Simulations Andrew Hooker, Celine Sarr, France Mentre, Florent Yvon, Optimal Maciej J Swat Design ProbOnto

§ Maciej J Swat, Pierre Grenon, Sarala M Wimalaratne 30 References & Resources

DDMoRe • DDMoRe project website, URL: www.ddmore.eu • http://www.ddmore.eu/product/interoperability-framework

PharmML • Swat et al. (2015). Pharmacometrics Markup Language (PharmML): Opening New Perspectives for Model Exchange in Drug Development. CPT PSP, 4(6):316-9. • URL: pharmml.org

SO • URL: ddmore.eu/projects/so-standard-output

ProbOnto • Swat MJ, Grenon P, Wimalaratne S. ProbOnto - ontology and knowledge base of probability distributions, Bioinformatics 2016; doi: 10.1093/ bioinformatics/btw170. • URL: www.probonto.org