# \donttest{
# Count how many chemicals for which HTTK is available without the QSPR:
num.chems <- length(get_cheminfo())
print(num.chems)
# For chemicals with Dawson et al. (2021) Clint and Fup QSPR predictions,
# add them to our chemical information wherever measured values are
# unavailable:
load_dawson2021()
# For chemicals with Dawson et al. (2021) QSPR predictions, add them to
# our chemical information -- overwriting measured values where we had them:
load_dawson2021(overwrite=TRUE)
# Let's see how many chemicals we have now with the Dawson et al. (2021)
# predictions loaded:
length(get_cheminfo())
# Now let us reset the chemical data to the initial version:
reset_httk()
# We should be back to our original number:
num.chems == length(get_cheminfo())
# Demonstrate loading data for specific chemicals:
#
# Find chemicals with a clint and no fup:
subset(chem.physical_and_invitro.data,!is.na(Human.Clint) & Human.Funbound.plasma==0)$CAS
chem1 <- "32598-13-3"
chem2 <- "2971-36-0"
# Take a look at what parameterize_steadystate gives (working from a default fup of 0.005):
a1 <- parameterize_steadystate(chem.cas=chem1)
a2 <- parameterize_steadystate(chem.cas=chem2)
# load Dawson for this chemical:
load_dawson2021(chem_include=chem1)
# Check values, only fup for the first chemical should change:
a3 <- parameterize_steadystate(chem.cas=chem1)
a4 <- parameterize_steadystate(chem.cas=chem2)
# All tests should be true:
a1[["Clint"]] == a3[["Clint"]]
a1[["Funbound.plasma"]] != a3[["Funbound.plasma"]]
a2[["Clint"]] == a4[["Clint"]]
a2[["Funbound.plasma"]] == a4[["Funbound.plasma"]]
# load Dawson for this chemical, but allow it to overwrite the clint:
load_dawson2021(chem_include=chem1, overwrite=TRUE)
# Check values, both clint and fup for the first chemical should change:
a5 <- parameterize_steadystate(chem.cas=chem1)
a6 <- parameterize_steadystate(chem.cas=chem2)
# All tests should be true:
a1[["Clint"]] != a5[["Clint"]]
a1[["Funbound.plasma"]] != a5[["Funbound.plasma"]]
a2[["Clint"]] == a6[["Clint"]]
a2[["Funbound.plasma"]] == a6[["Funbound.plasma"]]
# Load Dawson for all chemicals, fup should change for second chemical:
load_dawson2021()
a7 <- parameterize_steadystate(chem.cas=chem1)
a8 <- parameterize_steadystate(chem.cas=chem2)
# All tests should be true:
a1[["Clint"]] != a7[["Clint"]]
a1[["Funbound.plasma"]] != a7[["Funbound.plasma"]]
a2[["Clint"]] == a8[["Clint"]]
a2[["Funbound.plasma"]] != a8[["Funbound.plasma"]]
# load Dawson for this chemical, but allow it to overwrite all clints:
load_dawson2021(overwrite=TRUE)
# Both clint and fup should now be changed for second chemical:
a9 <- parameterize_steadystate(chem.cas=chem1)
a10 <- parameterize_steadystate(chem.cas=chem2)
# All tests should be true:
a1[["Clint"]] != a9[["Clint"]]
a1[["Funbound.plasma"]] != a9[["Funbound.plasma"]]
a2[["Clint"]] != a10[["Clint"]]
a2[["Funbound.plasma"]] != a10[["Funbound.plasma"]]
# }
Run the code above in your browser using DataLab