Tumor growth inhibition model

Comparing 2 dosage regimens









  [LONGITUDINAL]  
  input={K, KDE, KPQ, KQPP, LAMBDAP, GAMMA, DELTAQP}
  
  PK:
  depot(target=C)
  
  EQUATION:
  PT_0=5
  Q_0 = 40
  PSTAR = PT+Q+QP
  ddt_C = -KDE*C
  ddt_PT = LAMBDAP*PT*(1-PSTAR/K) + KQPP*QP - KPQ*PT - GAMMA*KDE*PT*C
  ddt_Q = KPQ*PT - GAMMA*KDE*Q*C
  ddt_QP = GAMMA*KDE*Q*C - KQPP*QP - DELTAQP*QP  
#-------------------------------------------------------------------------
#  This application is governed by the CeCILL-B license. 
#  You can  use, modify and/ or redistribute this code under the terms
#  of the CeCILL license:  http://www.cecill.info/index.en.html
#
#  Marc Lavielle, Inria Saclay
#  April 29th, 2015
#-------------------------------------------------------------------------

shinyUI(fluidPage(
  titlePanel(
    list(HTML('<p style="color:#4C0B5F; font-size:24px">Tumor growth inhibition model</p>
              <p style="color:#4C0B5F; font-size:18px">Comparing 2 dosage regimens</p>' )),
    windowTitle="tumor growth II"),
  navbarPage("", selected="Plot", id="nav", inverse="FALSE", 
             title="",
             tabPanel("Plot",
                      tabsetPanel( id="tabs", type="pills",
                                   tabPanel("regimen 1"),
                                   tabPanel("regimen 2"),
                                   tabPanel("parameters"),
                                   tabPanel("output")
                      ),
                      fluidRow(
                        column(3,
                               br(), br(),
                               conditionalPanel(condition="input.tabs=='regimen 1'",
                                                sliderInput("nd1", "Number of doses:", value=6, min=0, max = 20, step=1),
                                                sliderInput("ii1", "Interdose interval:", value = 12, min = 1, max = 20, step=1),
                                                sliderInput("amt1", "Amount:", value = 1, min = 0, max = 5, step=0.25),
                                                br()
                               ),
                               conditionalPanel(condition="input.tabs=='regimen 2'",
                                                sliderInput("nd2", "Number of doses:", value=6, min=0, max = 20, step=1),
                                                sliderInput("ii2", "Interdose interval:", value = 4, min = 1, max = 20, step=1),
                                                sliderInput("amt2", "Amount:", value = 1, min = 0, max = 5, step=0.25),
                                                br()
                               ),
                               
                               conditionalPanel(condition="input.tabs=='parameters'",
                                                sliderInput("GAMMA", "GAMMA:", value = 1, min = 0, max = 4, step=0.1), 
                                                sliderInput("K", "K:", value = 100, min = 0, max = 200, step=5),
                                                sliderInput("KDE", "KDE:", value = 0.3, min = 0, max = 1, step=0.05),
                                                sliderInput("LAMBDAP", "LAMBDAP:", value = 0.12, min = 0, max = 0.5, step=0.025) ,
                                                sliderInput("DELTAQP", "DELTAQP:", value = 0.01, min = 0, max = 0.05, step=0.0025),
                                                sliderInput("KPQ", "KPQ:", value = 0.025, min = 0, max = 0.1, step=0.005),
                                                sliderInput("KQPP", "KQPP:", value = 0.004, min = 0, max = 0.01, step=0.0005),
                                                br()
                               ),
                               
                               conditionalPanel(condition="input.tabs=='output'",
                                                radioButtons("output","",c("PSTAR" = "PSTAR","PT" = "PT","Q" = "Q","QP" = "QP")),
                                                br(),
                                                sliderInput("range", "time range", min = -100, max = 500, value = c(-50,200), step=10),
                                                br(),
                                                sliderInput("ngp", "grid size", min = 101, max = 1001, value = 501, step=100),
                                                br()
                               )
                        ),
                        column(9,
                               plotOutput("plot",  height="500px"))
                      )),
             tabPanel("Table", tableOutput("table")),
             navbarMenu("Codes",
                        tabPanel("Mlxtran", pre(includeText("tgi_model.txt"))),
                        tabPanel("ui.R", pre(includeText("ui.R"))),
                        tabPanel("server.R", pre(includeText("server.R"))
                        )
             ),
             tabPanel("ReadMe", withMathJax(), includeMarkdown("readMe.Rmd")),
             tabPanel("About", includeMarkdown("../../about/about.Rmd"))
  )
))

#-------------------------------------------------------------------------
#  This application is governed by the CeCILL-B license. 
#  You can  use, modify and/ or redistribute this code under the terms
#  of the CeCILL license:  http://www.cecill.info/index.en.html
#
#  Marc Lavielle, Inria Saclay
#  April 30th, 2015
#-------------------------------------------------------------------------

library(mlxR)

shinyServer(function(input, output) {

  r <- reactive({  
    param.value=c(input$K,input$KDE,input$KPQ,input$KQPP,input$LAMBDAP,input$GAMMA,input$DELTAQP)
    t.value=seq(input$range[1],input$range[2],length.out=input$ngp)

    t11=0
    t12=input$ii1*(input$nd1-1)+t11
    if (t12>=t11){
      t1.dose=seq(t11,t12,by=input$ii1)
      adm1 <- list(time=t1.dose, amount=input$amt1)
    }else{
      adm1 <- list(time=t11, amount=0, type=1)
    }
    t21=0
    t22=input$ii2*(input$nd2-1)+t21
    if (t22>=t21){
      t2.dose=seq(t21,t22,by=input$ii2)
      adm2 <- list(time=t2.dose, amount=input$amt2)
    }else{
      adm2 <- list(time=t21, amount=0, type=2)
    }
    
    g <- list(list(treatment=adm1),list(treatment=adm2))
    f  <- list(name=c('PSTAR','PT','Q','QP'),time=t.value)
    p   <- list(name=c('K','KDE','KPQ','KQPP','LAMBDAP','GAMMA','DELTAQP'), value=param.value)
    
    res <- simulx( model     = 'tgi_model.txt',
                   group = g, 
                 parameter = p,
                 output    = f)
    res
  })
  
  output$plot <- renderPlot({
    r=r()
    r <- r[[input$output]]
    j<-which(names(r)==input$output)
    names(r)[j] <- "f"
    pl=ggplotmlx(data=r, aes(x=time, y=f, colour=id)) + geom_line(size=0.75) +
      theme(legend.position=c(.1, .9))
    print(pl)
  })

output$table <- renderTable({ 
  r <- r()
  d <- merge(r$PSTAR,r$PT)
  d <- merge(d,r$Q)
  d <- merge(d,r$QP)
  return(d)
})

  
})

Objective

Compare the effect of two different treatments using the Tumor Growth Inhibition (TGI) model proposed by RIbba et al.

\[ \newcommand{\deriv}[1]{\dot{#1}(t)} \def\iid{\mathop{\sim}_{\rm i.i.d.}} \]


Mathematical model

ODEs:

\[ \begin{aligned} \deriv{C} &= - k_{de} C(t) \\ \deriv{P_T} &= \lambda P_T(t)(1- P^{\star}(t)/K) + k_{QPP}Q_P(t) -k_{PQ} P_T(t) -\gamma \, k_{de} P_T(t)C(t) \\ \deriv{Q} &= k_{PK} P_T(t) -\gamma \, k_{de} Q(t)C(t) \\ \deriv{Q_P} &= \gamma \, k_{de} Q(t)C(t) - k_{QPP} Q_P(t) -\delta_{QP} Q_P(t) \end{aligned} \]

  • \(C\): concentration of the compartment that receives the doses.
  • \(P_T\): proliferative cells
  • \(Q\): quescient cells
  • \(Q_P\): damaged quescient cells
  • \(P^{\star} = P_T(t) + Q(t) + Q_P(t)\): observed tumor size

Initial conditions:

\[ \begin{aligned} C(0) &= Q_P(0) = 0 \\ P_T(0) &= p_{T0} \\ Q(0) &= q_0 \end{aligned} \]


Playing with the shiny app

1. Define the two dosage regimens to compare in the tabs regimen 1 and regimen 2:

  • number of doses,
  • interdose interval,
  • amount per dose.


2. select the parameter values in the tab parameters:


3. define the outputs in the tab outputs :

  • select the output to display,

  • select the time range where the prediction is computed,

  • select the number of time points of the grid where the prediction is computed.


This application is governed by the CeCILL-B license.
You can use, modify and/or redistribute these codes under the terms of the CeCILL license.


This Shiny application requires the mlxR package.


Marc Lavielle
Inria Saclay, Popix team
April 29th, 2015