README.md

Travis-CI Build Status Coverage Status CRAN_Status_Badge

eapath: Computational Models for Estrogen and Androgen Receptor Activity

Installation

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)

Estrogen receptor calculation

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:

chnm code m4id aenm aeid hitc modl_ga modl_gw modl_tp Nordihydroguaiaretic acid C500389 9056516 ACEA_T47D_80hr_Positive 2 1 -1.867 8 27.59 Nordihydroguaiaretic acid C500389 8174202 ATG_ERE_CIS_up 75 1 0.8566 1.514 2.094 Nordihydroguaiaretic acid C500389 8509521 ATG_ERa_TRANS_up 117 1 0.9017 1.83 2.276 Nordihydroguaiaretic acid C500389 7685532 NVS_NR_bER 708 1 1.15 0.7664 81.82 Nordihydroguaiaretic acid C500389 7688098 NVS_NR_hER 714 1 -0.2094 1.449 79.46 Nordihydroguaiaretic acid C500389 7693250 NVS_NR_mERa 725 1 0.2719 1.571 86.51 Nordihydroguaiaretic acid C500389 8772706 OT_ER_ERaERa_0480 742 1 0.9288 1.725 198.8 Nordihydroguaiaretic acid C500389 8774332 OT_ER_ERaERa_1440 743 1 0.8362 4.191 69.81 Nordihydroguaiaretic acid C500389 8776446 OT_ER_ERaERb_0480 744 1 0.4789 3.256 168.6 Nordihydroguaiaretic acid C500389 8778155 OT_ER_ERaERb_1440 745 1 1.385 1.812 834.9 Nordihydroguaiaretic acid C500389 8780054 OT_ER_ERbERb_0480 746 1 0.5387 7.999 108.8 Nordihydroguaiaretic acid C500389 8782066 OT_ER_ERbERb_1440 747 1 0.8208 2.491 36.02 Nordihydroguaiaretic acid C500389 8788070 OT_ERa_EREGFP_0120 750 1 0.1681 4.769 81.79 Nordihydroguaiaretic acid C500389 8790123 OT_ERa_EREGFP_0480 751 1 0.7216 4.88 81.71 Nordihydroguaiaretic acid C500389 1265922 TOX21_ERa_BLA_Agonist_ratio 785 1 1.786 3.506 36.87 Nordihydroguaiaretic acid C500389 1276419 TOX21_ERa_BLA_Antagonist_ratio 786 1 1.83 8 108.8 Nordihydroguaiaretic acid C500389 1297413 TOX21_ERa_LUC_BG1_Agonist 788 1 1.246 1.464 44.19 Nordihydroguaiaretic acid C500389 1307910 TOX21_ERa_LUC_BG1_Antagonist 789 0 -0.3829 3.082 9.34

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

Androgen receptor calculation

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

ericwatt/eapath documentation built on May 16, 2019, 8:41 a.m.