mPBPK模型复现代码分享

原文:Cao Y, Jusko WJ. Applications of minimal physiologically-based pharmacokinetic models. J Pharmacokinet Pharmacodyn. 2012 Dec;39(6):711-23.

原文下载:

nihms430946.pdf (1.9 MB)

案例复现:阿莫西林

原文图片:

复现代码:

library(rxode2)

mod <- rxode2({ 
CL   = TVCL;  
V1   = TVV1;  
V2   = TVV2;  
VP   = TVVP;  
FUP  = TVFUP;  
Kp   = TVKP;  
fd1  = TVFD1;  
fd2  = TVFD2;  
QCO  = TVQCO;  

# derive para  
CP = plasma/VP;  
C1 = tight/V1;  
C2 = leaky/V2;  

# define the ODE  
d/dt(plasma) =  fd1*QCO*(C1/Kp)+fd2*QCO*(C2/Kp)-CP*(fd1*QCO+fd2*QCO+CL);  d/dt(tight) = (CP-C1/Kp)*fd1*QCO;  d/dt(leaky) = (CP-C2/Kp)*fd2*QCO;
})
# Define fixed effect parameters
theta <- c(
TVCL    = 0.298, 
TVVP    = 5.2,           
TVV1    = 8.26,           
TVV2    = 4.47,           
TVFUP   = 0.82,           
TVKP    = 0.785,           
TVFD1   = 0.018,           
TVFD2   = 0.0737,           
TVQCO   = 5.6 )                 

# dose setting
dose <- 1000#mg

# event setting
ev <- et(amount.units = "mg", time.units = "min") %>%  
add.dosing(dosing.to = "plasma", dose = dose, nbr.doses = 1,             # dosing.interval = 24,             
start.time = 0) %>%  
add.sampling(seq(from=0,to=600,by=1))
# create simulation
set.seed(1234)
sim  <- rxSolve(mod,theta,ev,nSub=1) %>%  mutate(time = as.numeric(time))
# concentration-time profile
pl1 <- sim %>%  
ggplot(mapping=aes(x=time, y=CP)) +   
geom_line(size=1.5, color="red") +  
geom_point(data = obs_dat, aes(x=Time, y = Conc))+  
theme_bw(base_size = 30) +  scale_x_continuous("Time (MIN)") +  scale_y_continuous("Concentration (mg/L)") +  
theme (legend.position = "none", plot.background = element_blank(),         panel.grid.minor = element_blank(), panel.grid.major = element_blank())

plot(pl1)
# export
jpeg(filename = paste0(output_dir, "./rxode.jpg"), width = 4000, height = 3000,res=600)
print(pl1)
dev.off()

mrgsolve的.cpp文件代码分享:

//mPBPK Platform for antiboitics

[PARAM] 
//Amoxicillin Parameters
fup = 0.82    // fraction unbound
Kp  = 0.785   // tissue-plasma partition parameter
fd1 = 0.0180  // fraction of the cardiac output for the COM1
fd2 = 0.0737  // fraction of the cardiac output for the COM2
V1  = 8.26    // distribution volume of COM1; L
CL  = 0.298   // clearance; L/min 
VSS = 15.4    // the steady state of distribution volume; L
QCO = 5.6     // the cardiac output L/min
VP  = 5.2     // blood volume for man, 5.2 L/70 kg
V2 = 4.47    // extracellular fluid volume, L

[CMT] 
PLASMA
TIGHT
LEAKY

[ODE]
double CP = PLASMA/VP;
double C1 = TIGHT/V1;
double C2 = LEAKY/V2;

dxdt_PLASMA = fd1*QCO*(C1/Kp)+fd2*QCO*(C2/Kp)-CP*fd1*QCO+fd2*QCO+CL);
dxdt_TIGHT  = (CP-C1/Kp)*fd1*QCO;dxdt_LEAKY  = (CP-C2/Kp)*fd2*QCO;

[TABLE] 
capture CP1=PLASMA/VP;
2 个赞