Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

add_chemtable

Add a table of chemical information for use in making httk predictions.


Description

This function adds chemical-specific information to the table chem.physical_and_invitro.data. This table is queried by the model parameterization functions when attempting to parameterize a model, so adding sufficient data to this table allows additional chemicals to be modeled.

Usage

add_chemtable(
  new.table,
  data.list,
  current.table = NULL,
  reference = NULL,
  species = NULL,
  overwrite = FALSE,
  sig.fig = 4,
  clint.pvalue.overwrite = TRUE,
  allow.na = FALSE
)

Arguments

new.table

Object of class data.frame containing one row per chemical, with each chemical minimally described by a CAS number.

data.list

This list identifies which properties are to be read from the table. Each item in the list should point to a column in the table new.table. Valid names in the list are: 'Compound', 'CAS', 'DSSTox.GSID' 'SMILES.desalt', 'Reference', 'Species', 'MW', 'logP', 'pKa_Donor', 'pKa_Accept', 'logMA', 'Clint', 'Clint.pValue', 'Funbound.plasma', 'Fgutabs', 'Rblood2plasma'.

current.table

This is the table to which data are being added.

reference

This is the reference for the data in the new table. This may be omitted if a column in data.list gives the reference value for each chemical.

species

This is the species for the data in the new table. This may be omitted if a column in data.list gives the species value for each chemical or if the data are not species-specific (e.g., MW).

overwrite

If overwrite=TRUE then data in current.table will be replaced by any data in new.table that is for the same chemical and property. If overwrite=FALSE (DEFAULT) then new data for the same chemical and property are ignored. Funbound.plasma values of 0 (below limit of detection) are overwritten either way.

sig.fig

Sets the number of significant figures stored (defaults to 4)

clint.pvalue.overwrite

If TRUE then the Cl_int p-value is set to NA when the Cl_int value is changed unless a new p-value is provided. (defaults to TRUE)

allow.na

If TRUE (default is FALSE) then NA values are written to the table, otherwise they are ignored.

Value

data.frame

A new data.frame containing the data in current.table augmented by new.table

Author(s)

John Wambaugh

Examples

my.new.data <- as.data.frame(c("A","B","C"),stringsAsFactors=FALSE)
my.new.data <- cbind(my.new.data,as.data.frame(c("111-11-2","222-22-0","333-33-5"),
                     stringsAsFactors=FALSE))
my.new.data <- cbind(my.new.data,as.data.frame(c("DTX1","DTX2","DTX3"),
                    stringsAsFactors=FALSE))
my.new.data <- cbind(my.new.data,as.data.frame(c(200,200,200)))
my.new.data <- cbind(my.new.data,as.data.frame(c(2,3,4)))
my.new.data <- cbind(my.new.data,as.data.frame(c(0.01,0.02,0.3)))
my.new.data <- cbind(my.new.data,as.data.frame(c(0,10,100)))
colnames(my.new.data) <- c("Name","CASRN","DTXSID","MW","LogP","Fup","CLint")

chem.physical_and_invitro.data <- add_chemtable(my.new.data,
                                  current.table=chem.physical_and_invitro.data,
                                  data.list=list(
                                  Compound="Name",
                                  CAS="CASRN",
                                  DTXSID="DTXSID",
                                  MW="MW",
                                  logP="LogP",
                                  Funbound.plasma="Fup",
                                  Clint="CLint"),
                                  species="Human",
                                  reference="MyPaper 2015")
parameterize_steadystate(chem.name="C")  
calc_css(chem.name="B")

httk

High-Throughput Toxicokinetics

v2.0.4
GPL-3
Authors
John Wambaugh [aut, cre] (<https://orcid.org/0000-0002-4024-534X>), Robert Pearce [aut] (<https://orcid.org/0000-0003-3168-4049>), Caroline Ring [aut] (<https://orcid.org/0000-0002-0463-1251>), Greg Honda [aut] (<https://orcid.org/0000-0001-7713-9850>), Mark Sfeir [aut], Matt Linakis [aut] (<https://orcid.org/0000-0003-0526-2395>), Sarah Davidson [aut] (<https://orcid.org/0000-0002-2891-9380>), Miyuki Breen [ctb] (<https://orcid.org/0000-0001-8511-4653>), Shannon Bell [ctb], Xiaoqing Chang [ctb] (<https://orcid.org/0000-0003-0752-1848>), Jimena Davis [ctb], James Sluka [ctb] (<https://orcid.org/0000-0002-5901-1404>), Nisha Sipes [ctb] (<https://orcid.org/0000-0003-4203-6426>), Barbara Wetmore [ctb] (<https://orcid.org/0000-0002-6878-5348>), Woodrow Setzer [ctb] (<https://orcid.org/0000-0002-6709-9186>)
Initial release
2021-05-07

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.