explore biological variability with virtual patients using simbiology model analyzer
this example shows how to generate and simulate virtual patients using the simbiology model analyzer app. in this example, a virtual patient is represented as a single realization of model parameters. the example uses a tumor growth model [1] to explore the variability of some model parameters that influence the tumor growth and investigate various dosing regimens to control it.
this example requires statistics and machine learning toolbox™.
tumor growth model
the model used in this example is a simbiology® implementation of the pharmacokinetic/pharmacodynamic (pk/pd) model by simeoni et al. it quantifies the effect of anticancer drugs on tumor growth kinetics from in vivo animal studies. the drug pharmacokinetics are described by a two-compartment model with iv bolus dosing and linear elimination (ke) from the central compartment. tumor growth is a biphasic process with an initial exponential growth followed by linear growth. the growth rate of the proliferating tumor cells is described by
l0,
l1, and ψ are tumor growth parameters,
x1 is the weight of the proliferating
tumor cells, and w is the total tumor weight. in the absence of any
drugs, the tumor consists of proliferating cells only, that is,
w =
x1
. in the presence of an anticancer
agent, a fraction of the proliferating cells is transformed into nonproliferating cells. the
rate of this transformation is assumed to be a function of the drug concentration in the
plasma and an efficacy factor k2. the
nonproliferating cells x2 go through a series of transit stages
(x3 and x4) and are eventually cleared from the
system. the flow-through of the transit compartments is modeled as a first-order process
with the rate constant k1.
the simbiology model makes these adjustments to the pharmacodynamics of tumor growth:
instead of defining the tumor weight as the sum of x1, x2, x3, and x4, the model defines the tumor weight by the reaction named increase,
null → tumor_weight
, with the reaction rate .tumor_weight is the total tumor weight, x1 is the weight of the proliferating tumor cells, and l0, and l1 are tumor growth parameters.
similarly, the model defines the decrease in tumor weight by the reaction named decay,
tumor_weight → null
, with the reaction ratek1*x4
. the constant k1 is the forward rate parameter, and x4 is the last species in the series of transit reductions in tumor weight.ke is a function of the clearance and the volume of the central compartment:
ke = cl_central/central
.
description of virtual population
the virtual population in this example is represented by virtual patients, specified as distinct sets of patient-specific parameter values. suppose that, based on prior knowledge or of the model, the tumor growth is sensitive to these model parameters: l0, l1, w0, k1, k2, and cl_central. assuming that these biological parameters follow the lognormal distribution (and must always be positive), you can generate virtual patients that represent different parameter values drawn from the joint lognormal distribution.
the lognormal distribution uses these parameters:
mu – mean of logarithmic values
sigma – standard deviation of logarithmic values
for details, see (statistics and machine learning toolbox).
in this example, sigma is assumed to be 0.01 for all the parameters. for a small sigma value, the mean of a lognormal distribution is approximately equal to the log of the model value. hence, this example assumes that mu for each parameter is the log of the model value.
dosing strategies
in this example, an anticancer drug is used to control the tumor growth. each virtual patient receives the same amount of the drug on the same schedule. the tumor growth response is simulated for each patient. dose amounts are then varied to find the range of dose amounts that can suppress the tumor growth of many virtual patients in the population.
generate samples to represent virtual patients
the following steps show how to draw sample values from the joint probability distribution for model parameters that are sensitive to tumor growth. these sample values represent virtual patients.
load tumor growth model
at the matlab® command line, enter:
simbiologymodelanalyzer("tumor_growth_vpop_sa.sbproj");
simbiology model analyzer opens. in the browser pane, the models folder contains the tumor growth model.
define joint probability distribution
create a program to draw sample values from the joint lognormal distribution for tumor growth sensitive parameters: l0, l1, w0, k1, k2, and cl_central.
on the home tab, select program > generate samples. a new program opens.
in the variants section of the program, select parameterestimates, which contains the estimated parameter values.
keep the doses section as is so that no doses are selected.
in the generate samples step, click the plot button to disable default plot generation. you will plot the samples later on.
in the parameter set section, set type to
values from a distribution
.set number of samples to
25
.double-click the empty cell in the component name column, and enter l0.
change distribution for l0 to
lognormal
. by definition, mu is the mean of logarithmic values. so, change mu to -0.5644, which islog(current value)
orlog(0.5687)
. change sigma to 0.01. for a small sigma value, the mean of a lognormal distribution is approximately equal tolog(current value)
. for details, see (statistics and machine learning toolbox).double-click the empty cell in the component name column, and add l1. repeat the same process to change the distribution to lognormal and set the mu and sigma values. similarly, add w0, k1, k2, and ke. this table lists the corresponding mu values of these parameters that you can copy and paste in the software. change sigma to 0.01 for each parameter.
parameter
current value mu or log(current value) l0
0.5687
-0.5644
l1
0.2690
-1.3130
w0
1
0
k1
0.4643
-0.7672
k2
8.4200e-4
-7.0797
cl_central
0.6672
-0.4047
for sampling, use the default option:
random sampling with rank correlation matrix
, where the matrix is an identity matrix.the following figure shows the parameter set section with the parameters configured.
(optional) save the project under a new name by selecting save > save project as on the home tab.
define dosing strategies
add the dosing information as another parameter set by specifying different dose amount—specifically, six dose amounts that are equally spaced from 5 to 35 mg. then combine the doses with the first parameter set (virtual patients) using the cartesian combination method. this method combines every virtual patient with every dose amount to generate a total of 150 iterations (or simulation scenarios). for details, see .
at the bottom of the generate samples step, click add parameter set to scan. another parameter set (ps2) appears.
double-click the empty cell in the component name column, and type
interval
. a list of choices appears. selectinterval_dose.amount
.set type to
individual values
and set values to[5:6:35]
.near the top of the generate samples step, under parameter set combinations, ensure that the combination type is set to
cartesian
to combineps1
andps2
.
generate and visualize parameter and dose combinations
once you have defined the joint lognormal distribution for model parameters, range of dose amounts, and the combination method, you can run the step to generate the different parameters and dose combinations.
click the run this program step button to generate samples.
tip
you can run every program execution step separately. an execution step includes the run button next to the name the step. running an individual step is especially helpful if the program contains multiple steps and you want to see the intermediate results from a particular step. by doing so, you can make adjustments as needed before running the next step or the whole program. to run the whole program, click the run button on the home tab.
by default, the app stores the generated samples in the lastrun folder of the program.
visualize the generated samples. in the browser pane on the left, expand the program1 folder. expand the lastrun folder, and then click samples. in the plot section on the home tab, click plot matrix. the plot shows the distribution of each parameter varied around its model value, except the dose amounts, which appear in a uniform range. note that your plot might vary from the plot shown here due to randomness.
note
you can enable default plot generation to display the plot automatically every time you run the step. to do so, click the plot button at the top of the generate samples step. keep in mind that when the program step has a lot of samples, plotting all the samples can be time consuming.
display the generated virtual patients and dose combinations numerically in a tabular format. on the home tab, click new datasheet. from the lastrun folder of the program, drag samples into the new datasheet. each row of the table represents a simulation scenario with different model parameter values and dose amounts.
perform monte carlo simulations
once you have the samples ready, you can simulate the model to explore the tumor growth of virtual patients receiving different dose amounts.
go back to the program by clicking the program1 tab.
click the ( ) icon at the upper left and click simulation.
in the model setup step, in the variants section, make sure that parameterestimates is selected. also make sure that no doses are selected in the doses section. in the states to log section, click the option for viewing the states, and then clear all check boxes except [tumor growth model].tumor_weight.
at the top of the simulation step (scroll down to see this step), click the run this program step button to simulate the model.
the app simulates the generated scenarios from the generate samples step that you ran previously. you do not need to rerun that step.
once the simulation finishes, the app saves the simulation results in the lastrun folder and opens plot2.
in the property editor pane, under style, click time. each line in the plot represents the tumor weight profile of each simulation scenario.
the plot shows that the tumor weight profiles appear in groups, corresponding to different dose amounts. to better visualize this observation, you can slice the data by dose amounts. to do so, you can use the slice data table, which contains a summary of slicing variables that are currently being used in the plot and their corresponding plot styles.
tip
plots are backed by data that are currently present in the app workspace. plots are not snapshots. when the data (either experimental data or simulation results) is removed or changed, the plots are also updated according to the changes in the underlying data.
in the visual channels table of property editor, double-click
l0
and selectinterval_dose amount
.tip
you can slice data using different slicing variables. each slicing variable appears in the plot with a different visual style (or channel) such as color, line style, and axes position. slicing variables can represent attributes of data, such as responses or scenarios (that is, groups or simulation runs). slicing variables can also be covariates or parameter values associated with a scenario or group. by default, the app provides slicing variables for different response variables and different scenarios in the plotted data. you can add other visual styles (or channels) for sets of responses and associated parameter or covariate variables.
double-click the empty cell in the style column and select
grid
.the app updates plot2 to show each dose amount on its own axes.
the plot shows that different dose amounts play critical roles in the tumor growth of virtual patients. from this plot, you can obtain some initial insights into the optimal dose amounts and dose scheduling. for instance, suppose that the target tumor weight to reach is 0.5 grams. the simulation results indicates that a dose amount of 23 milligrams or larger can achieve that goal (you can fine-tune the range of dose amounts further by tweaking it in the generate samples step of the program). you can use this information in combination with existing drug toxicity information (not discussed in this example) to get a dosing regimen that satisfies both efficacy and safety requirements, for instance.
postprocess simulation data
you can also postprocess the simulation results to look at the correlation between dose amounts and the tumor weight in another way.
go back to the program by clicking the program1 tab. click the ( ) icon near the top of the program and select calculate observables under postprocessing.
a postprocessing: calculate observables step appears below the simulation step.
double-click the first cell in the name column. enter
stat1
.in the expression column, enter the following expression:
min(vertcat(nan,tumor_weight(time>=7)))
. the expression returns the minimum tumor weight after the first dose applied at day 7 from each simulation.note
anytime you add an expression to the observables table in the step, the expression is automatically added as an
observable
object to the corresponding model.in the units column, enter
gram
.rerun the simulation step by clicking the run button at the top of the step. the app simulates and evaluates the
stat1
expression for each simulation scenario or iteration, and generates the following plot. the x-axis represents the parameters and the y-axis represents the minimum tumor weight. each dot represents a simulation scenario. the plot also shows that there is no correlation between the tumor size and the values of various model parameters, except for the dose amounts (the rightmost subplot).show only the dose amount subplot. in the plot settings, clear all check boxes in the parameters table, except
interval_dose amount
.in the grid section, select both to show the grids for both the x- and y-axis.
the plot confirms that higher dose amounts control the tumor growth better. these initial simulation results indicate that the dose amounts of 23 mg or larger could reach the hypothetical tumor weight threshold of 0.5 grams or lower. you can further adjust the range of dose amounts in the generate samples step.
tip
to interactively explore the plotted data, export the plot to a separate figure window by selecting export plot from the context (right-click) menu of the plot.
this example shows you how to generate samples to represent virtual patients and perform monte carlo simulations to explore the model response on tumor growth under different dose amounts. the simulation results indicate a range for dose amounts and dose schedules that controls the tumor growth for various virtual patients. you could further adjust the dosing regimens so that the doses stay within some known efficacy and toxicity thresholds. for a similar analysis, see the example .
references
[1] simeoni, monica, paolo magni, cristiano cammia, giuseppe de nicolao, valter croci, enrico pesenti, massimiliano germani, italo poggesi, and maurizio rocchetti. “predictive pharmacokinetic-pharmacodynamic modeling of tumor growth kinetics in xenograft models after administration of anticancer agents.” cancer research 64, no. 3 (february 1, 2004): 1094–1101.
[2] koch, gilbert, antje walz, gezim lahu, and johannes schropp. “modeling of tumor growth and anticancer effects of combination therapy.” journal of pharmacokinetics and pharmacodynamics 36, no. 2 (april 2009): 179–97.
see also
simbiology model analyzer | observable