# \donttest{
# Multiple doses per day:
head(solve_pbtk(
chem.name='Bisphenol-A',
daily.dose=.5,
days=2.5,
doses.per.day=2,
tsteps=2))
# Starting with an initial concentration:
out <- solve_pbtk(
chem.name='bisphenola',
dose=0,
days=2.5,
output.units="mg/L",
initial.values=c(Agut=200))
# Working with parameters (rather than having solve_pbtk retrieve them):
params <- parameterize_pbtk(chem.cas="80-05-7")
head(solve_pbtk(parameters=params, days=2.5))
# We can change the parameters given to us by parameterize_pbtk:
params <- parameterize_pbtk(dtxsid="DTXSID4020406", species = "rat")
params["Funbound.plasma"] <- 0.1
out <- solve_pbtk(parameters=params, days=2.5)
# A fifty day simulation:
out <- solve_pbtk(
chem.name = "Bisphenol A",
days = 50,
daily.dose=1,
doses.per.day = 3)
plot.data <- as.data.frame(out)
css <- calc_analytic_css(chem.name = "Bisphenol A")
library("ggplot2")
c.vs.t <- ggplot(plot.data, aes(time, Cplasma)) +
geom_line() +
geom_hline(yintercept = css) +
ylab("Plasma Concentration (uM)") +
xlab("Day") +
theme(
axis.text = element_text(size = 16),
axis.title = element_text(size = 16),
plot.title = element_text(size = 17)) +
ggtitle("Bisphenol A")
print(c.vs.t)
# The following will not work because Diquat dibromide monohydrate's
# Henry's Law Constant (-3.912) is higher than that of Acetone (~-4.5):
try(head(solve_pbtk(chem.cas = "6385-62-2")))
# However, we can turn off checking for phys-chem properties, since we know
# that Diquat dibromide monohydrate is not too volatile:
head(solve_pbtk(chem.cas = "6385-62-2", physchem.exclude = FALSE))
# Caco-2 absorption tests:
p <- parameterize_pbtk(chem.name="Aminopterin")
# calculate what initial dose of 1 mg/kg should be in uM in the gut:
initial.dose <- signif(1/1e3*1e6/p[["MW"]]*p[["BW"]]*p[["Fabsgut"]],
4)
# This should be the same as what solve_pbtk givesus:
initial.dose == solve_pbtk(chem.cas="80-05-7",days=1)[1,"Agutlumen"]
# By default we now include calculation of Fabs and Fgut (we explicitly model
# first-pass hepatic metabolism in the model "pbtk")
head(solve_pbtk(chem.cas="80-05-7",days=1))
# Therefore if we set Fabs = Fgut = 1 with keetit100=TRUE, we should get a
# higher tissue concentrations:
head(solve_pbtk(chem.cas="80-05-7",days=1,
Caco2.options=list(keepit100=TRUE)))
# Different ways to call the function:
head(solve_pbtk(chem.cas="80-05-7",days=1))
head(solve_pbtk(parameters=parameterize_pbtk(chem.cas="80-05-7"),days=1))
# }
Run the code above in your browser using DataLab