Dynamic QSP reporting with Julia and Jupiter

This is an example of creation of a dynamic QSP report in Julia and IJulia.jl (Jupiter) build based on HetaSimulator.jl. The content of this file and modeling platform is published in GitHub repository https://github.com/insysbio/insulin-signaling-t2d

Preamble

The QSP model which is used as an example of QSP model was published in the article:

Brannmark C, Nyman E, Fagerholm S, Bergenholm L, Ekstrand EM, Cedersund G, Stralfors P. Insulin Signaling in Type 2 Diabetes: Experimental and modeling analyses reveal mechanisms of insulin resistance in human adipocytes. Journal of biological chemistry.. 2013 288(14):9867–9880. DOI: 10.1074/jbc.M112.432062

The SBML code was downloaded from BioModels https://www.ebi.ac.uk/biomodels/BIOMD0000000448 and used as the part of the Heta-based modeling platform.

The report includes the steps to reproduce simulations from the original article demonstration facilities of the approach and necessary setups.

All necessary files can also be found in the repository.

Preparations

For easier creation of the Heta-based platform install heta compiler.

In command line interface run the code below to create heta platform template

heta init

The minimal content will be created.

Download the SBML model from the database and copy it into src/BIOMD0000000448.xml

Update the src/index.heta with the following content:

heta
// load SBML model as a content of the platform
include BIOMD0000000448_url.xml type sbml

// make the records of a model observable
block {output: true} begin
  measuredIRp;
  measuredIRint;
  measuredIRS1p;
  measuredIRS1307;
  measuredPKB308p;
  measuredPKB473p;
  measuredAS160p;
  measuredmTORC1a;
  measuredS6Kp;
  glucoseuptake;
  measuredmTORC2a;
  measuredS6p;
end

// make insulin as an input of the model
insulin @Const = 10; // nM

// make IR (insuline resistance) specific parameters as an input of the model
IR_total @Const = 100;    // reduce to 55%
GLUT4_total @Const = 100; // GLUT4 reduce to 50%
diabetes @Const = 1;      // reduce to 15%

// recalculate initial values for IR and base conditions
IR .= IR_total * 99.87/100; // 99.87
IRp .= 0;
IRins .= 0;
IRip .= IR_total * 0.02/100;      // 0.02
IRi .= IR_total * 0.11/100;       // 0.11
//
GLUT4 .= GLUT4_total * 73.48/100;   // 73.48
GLUT4m .= GLUT4_total * 26.52/100;  // 26.52

// variable parameters
k1a @Const = 0.6331;
k1basal @Const = 0.03683;
k1c @Const = 0.8768;
k1d @Const = 31.01;

Install Julia and add all necessary packages in Julia's console:

] add HetaSimulator StatsPlots IJulia.jl

Run Jupiter notebook engine

using IJulia
notebook(dir=".")

Loading platform

Default simulation

To simulate the observables only one line of code is required. Here we are using "chain" with |> syntax.

Based on the original publication the insuline resistance (IR) can be set by updating three parameters.

Simulation scenarios

Two simulation scenarios above can be created in tabular format and loaded into platform p. Create CSV file with the following content:

id parameters.IR_total parameters.GLUT4_total parameters.diabetes tspan
base 30
ir 55 50 0.15 30

Advanced visualization

If you need to reshape and visualize different simulation results the easier way is to convert simulation results into DataFrame.

Titration-like simulations

The simulations of another type (not time dependence) can be performed and visualized by applying different simulation scenarios. For example in the original article the titration-like experiment is simulated: intake of insulin and measurements of different observables after 10 minutes.

To reproduce them the following set of scenarion should be created:

id parameters.insulin parameters.IR_total parameters.GLUT4_total parameters.diabetes tspan parameters.is_titr
base_ins_3 1.00E-03 10 1
base_ins_25 3.16E-03 10 1
base_ins_2 1.00E-02 10 1
base_ins_15 3.16E-02 10 1
base_ins_1 1.00E-01 10 1
base_ins_05 3.16E-01 10 1
base_ins0 1.00E+00 10 1
base_ins05 3.16E+00 10 1
base_ins1 1.00E+01 10 1
base_ins15 3.16E+01 10 1
base_ins2 1.00E+02 10 1
ir_ins_3 1.00E-03 55 50 0.15 10 1
ir_ins_25 3.16E-03 55 50 0.15 10 1
ir_ins_2 1.00E-02 55 50 0.15 10 1
ir_ins_15 3.16E-02 55 50 0.15 10 1
ir_ins_1 1.00E-01 55 50 0.15 10 1
ir_ins_05 3.16E-01 55 50 0.15 10 1
ir_ins0 1.00E+00 55 50 0.15 10 1
ir_ins05 3.16E+00 55 50 0.15 10 1
ir_ins1 1.00E+01 55 50 0.15 10 1
ir_ins15 3.16E+01 55 50 0.15 10 1
ir_ins2 1.00E+02 55 50 0.15 10 1

Multiple simulations

HetaSimulator includes the mechanism to run Monte-Carlo simulations based on parameter variability. For the demonstration purposes we will generate a random set of parameters: k1a, k1basal, k1c, k1d. This simulations mimic the uncertainty in the selected parameters.

The generated dataset can be summarized to plot the median and 90% bounds for uncertainty predictions.