Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MobiToolboxforR multiple dose simulations #416

Open
krinaj opened this issue Nov 4, 2019 · 3 comments

Comments

@krinaj
Copy link

@krinaj krinaj commented Nov 4, 2019

Hello all,

I am trying to use a model available in xml file from literature (Cordes et al. 2016, http://aac.asm.org/content/60/10/6134.long, https://github.com/HenrikCordes/isoniazid-PBPK-model) and do some simulations. I do not have pksim or mobi files for the model.

The model was initialized with single dose. I am trying to simulate steady states concentrations, so doing multiple doses. Can anyone please suggest how to do so in R? Below is what I am doing. It increases simulations times to 10 days, but not adding multiple doses. I think I need to add more Applications, i.e. Application_2, _3, .., etc, but am not sure how to do so in R. Any help will be appreciated.

Thanks,
Krina

mySim = function(dose, dtimes){
myDCI =initSimulation(paste0(simFolder, modelName, ".xml"),
whichInitParam = "allNonFormula")

myDCI = setParameter(
value = c(dose, dtimes),
path_id = c("|Applications|300mgOD|Lint80_Bing|Application_1|ProtocolSchemaItem|Dose",
"
|Applications|300mgOD|Lint80_Bing|Application_1|ProtocolSchemaItem|Start time"),
DCI_Info = myDCI)

myDCI = setSimulationTime(timepoints=seq(0, 14400, 60), DCI_Info = myDCI)

#Simulate model.
myDCI = processSimulation(DCI_Info = myDCI);
}

library(MoBiToolboxForR)
library(dplyr)

#Path to the folder with the model files
simFolder = "./isoniazid-PBPK-model-master/"
modelName = "INH_Fast"

myDCI <- mySim(dose=rep(3e-04, times=10), dtimes=seq(0,240,24))

@HenrikCordes

This comment has been minimized.

Copy link

@HenrikCordes HenrikCordes commented Nov 4, 2019

Dear @krinaj,

as far as I know, it is not possible to add additional administrations from within R or Matlab.
You need to genarate a new simulation with an altered administration form within the .pksim5 file, then export the simulation as .xml file.

From there you access and change the (pre defind) dosing in R/Matlab.

I added the .pksim5 file in https://github.com/HenrikCordes/isoniazid-PBPK-model, so you can alter the administration schedule as you like.

Hope this helps!

Kind regards,
Henrik

@krinaj

This comment has been minimized.

Copy link
Author

@krinaj krinaj commented Nov 4, 2019

Many thanks, Henrik (@HenrikCordes) for making the .pksim5 available.

@HenrikCordes

This comment has been minimized.

Copy link

@HenrikCordes HenrikCordes commented Nov 5, 2019

Dear @krinaj,

you are welcome. If you need anything else or want to discuss some model features / applications feel free to contact me.

Kind regards,
Henrik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.