eapath contains both data and code to calculate estrogen and androgen AUC values.
It can be installed using devtools. After installing devtools, run the following to install the newest development version of eapath.
# install.packages("devtools")
devtools::install_github("ericwatt/eapath")
To install all of the suggested packages as well, which are used to develop the package and run some of the examples, include the option dependencies = TRUE
.
devtools::install_github("ericwatt/eapath", dependencies = TRUE)
library(eapath)
library(data.table)
The package includes all ToxCast data for ER assays. This can be accessed in er_L5_prod_ext_v2
. An example of this data for one chemical:
The first step is to restructure the data using function tcpl_to_model_dat
.
dat_cast <- tcpl_to_model_dat(er_L5_prod_ext_v2, pathway = "ER")
This wide format table can now be passed to the function er_model_light
. The example below performs the calculation for 4 chemicals.
codes <- c("C500389", "C100005", "C57636", "C10161338")
auc_results <- lapply(codes,
er_model_light,
dat = dat_cast,
pathway = "ER")
dat_auc <- rbindlist(auc_results)
Then the columns are named
pseudo_receptor_columns <- c("AUC.R3", "AUC.R4", "AUC.R5", "AUC.R6", "AUC.R7", "AUC.R8",
"AUC.R9", "AUC.A1", "AUC.A2", "AUC.A3", "AUC.A4", "AUC.A5", "AUC.A6",
"AUC.A7", "AUC.A8", "AUC.A9", "AUC.A10", "AUC.A11", "AUC.A12",
"AUC.A13", "AUC.A14", "AUC.A15", "AUC.A17", "AUC.A18")
auc_names <- c("AUC.Agonist", "AUC.Antagonist",
pseudo_receptor_columns, "code")
setnames(dat_auc, auc_names)
code
AUC.Agonist
AUC.Antagonist
C500389
0.261
0
C100005
0
0
C57636
0.9983
0.003788
C10161338
0.5297
0
While the pathway and assay lists are different, the AR model is run by the user in much the same way as the ER model. One additional change is that the assay hitcalls need to be filtered by the viability assays. Both datasets needed to do this are included, ar_L5_invitrodb
contains the data for the 11 assays to run the model and ar_L5_invitrodb_viability
has the viability data from TOX21_AR_BLA_Antagonist_viability
and TOX21_AR_LUC_MDAKB2_Antagonist2_viability
assays which are used to filter the hit calls for TOX21_AR_BLA_Antagonist_ratio
and TOX21_AR_LUC_MDAKB2_Antagonist2
assays.
dat <- via_filter(ar_L5_invitrodb, ar_L5_invitrodb_viability)
dat_cast <- tcpl_to_model_dat(dat, pathway = "AR")
dat_auc <- er_model_light(dat = dat_cast, chem = "C68962", pathway = "AR")
pseudo_receptor_columns <- c("AUC.R3", "AUC.R4", "AUC.R5", "AUC.R6",
"AUC.R7", "AUC.A1", "AUC.A2", "AUC.A3",
"AUC.A4", "AUC.A5", "AUC.A7", "AUC.A8",
"AUC.A9", "AUC.A10", "AUC.A11")
auc_names <- c("AUC.Agonist", "AUC.Antagonist",
pseudo_receptor_columns, "code")
setnames(dat_auc, auc_names)
code
AUC.Agonist
AUC.Antagonist
C68962
0.9414
0
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.