pkpdapp-team / pkpdapp

A web application for modeling the distribution and effects of drugs.
BSD 3-Clause "New" or "Revised" License
9 stars 3 forks source link

usecase2 - instructions #290

Closed martinjrobins closed 6 months ago

martinjrobins commented 1 year ago

Description

PKPD antibiotics (one compartment PK with adaptive resistant PD model) model fitting to (naive pooled) data of PK (plasma concentration) and PD (bacterial CFU time course), data obtained from different dose regimens to be fitted simultaneously

Getting Started

Download the SBML file for the PD model: https://raw.githubusercontent.com/pkpdapp-team/pkpdapp-datafiles/main/usecase2/ABx_updated3.xml Download the data file: https://raw.githubusercontent.com/pkpdapp-team/pkpdapp-datafiles/main/usecase2/PKPD_UseCase_Abx.csv

Instructions

  1. Log into the pkpdapp and create a new project titled "usecase2"
  2. Create a new dataset (Click on the "plus" button directly below "Datasets") and rename it to "usecase2" and click save
  3. Click on "Upload CSV File" in the dataset detail pane and select the dataset that you downloaded earlier, this will upload the data into the dataset you have created
  4. Create a new PD model (Click on the "plus" button directly below "PD Models") and rename it to "usecase2 - pd" and click save.
  5. Click on the "Upload SBML" button and select the PD model .xml file you downloaded earlier
Screenshot 2023-02-08 at 11 13 19
  1. Click the "plus" button below the "PK Models" heading, this will create a new pk model. Rename this model to "usecase2 - model" and click save
  2. Set the "Base Pharmacokinetic Model" to "three_compartment_pk_model"
  3. Set the "Pharmacodynamic Model" to "usecase2 - pd"
  4. Set the Protocol to "usecase2-DemoDrug-1" and click save
  5. Add a mapping variable (The plus symbol next to "Mapping variables") and choose "central.drug_c_concentration" for the Pharmacokinetic variable and "PD.Drug_concentration" for the Pharmacodynamic variable
Screenshot 2023-02-08 at 11 38 34
  1. Turn off all the outputs of the model except "central.drug_c_concentration"

  2. Screenshot 2023-02-08 at 11 19 39
  3. Visualise the dataset as well as the PKPD model and turn off the CFU output from the dataset. Change the units of the drug concentration data to match the model (e.g. use g/L for both)

Screenshot 2023-02-08 at 11 21 36
  1. Create a new inference in the "Inferences" tab. In the first dialog screen select "usecase2 - model" for the model and "usecase2" for the dataset.
  2. In the next screen, select "central.drug_c_concentration" for the model output and "DemoDrug Concentration" for the dataset measurement. Change the noise param from "Fixed" to "Uniform" with an upper limit of 0.01
  3. In the next "Parameters" screen, change the following parameters from "Fixed" to "Uniform", and set the lower/upper bounds:
    • central.size: [0.01, 1]
    • myokit.clearence: [0.01, 1]
    • myokit.k_peripheral: [0.0001, 0.1]
    • myokit.k_peripheral: [0.0001, 0.1]
    • peripheral_1.size: [0.001, 0.3]
    • peripheral_2.size: [0.001, 0.3]
    • PD.EC50k: [0.01, 10]
    • PD.KNetgrowth: [0.01, 10]
    • PD.Kdeath: [0.01, 10]
    • PD.Kmax: [0.01, 10]
    • PD.beta: [0.01,10]
    • PD.gamma: [0.01, 10]
    • PD.tau: [0.01, 10]
    • PD.tvbmax: [100000000, 10000000000]
    • dose.absorption_rate: [0.01, 10]
  4. Again in the "Parameters" screen, set the fixed value of P1.size to 1102000, then click next.
  5. choose a name for your inference run, change the algorithm to "CMAES" and click "Run"
  6. In a few seconds, you should now have a new inference in your list of inferences. Click on this
  7. In the detail screen for the inference, click "Refresh" until you see some results and the progress bar is 100% complete. You should now see some trace plots of model variables versus iteration (of the algorithm).
Screenshot 2023-02-08 at 14 38 36 Screenshot 2023-02-08 at 14 40 14
  1. Navigate back to the "Workbench" screen and to the "usecase2 - model" pk model (click on the name in the LHS panel). Click the "Set Inferred Parameters" button and select the inference that you have just run, this will set the parameters of the model to the fitted parameters, and you should see a good fit to the dataset chosen. Note that there are 5 different subjects with different protocols, and only data for 3 subjects, so choose each protocol in turn for that model to see the comparison over all 5 subjects.
martinjrobins commented 6 months ago

closing as this was for the older version