This function computes Exposure:Activity ratios using user-provided measured
concentration data from the output of create_toxEval
,
and joins the data with the activity concentration at cutoff data provided by
ToxCast.Data from ToxCast is included with this package, but alternative
benchmark data can be provided to perform the same "toxEval" analysis.
Usage
get_chemical_summary(
tox_list,
ACC = NULL,
filtered_ep = "All",
chem_data = NULL,
chem_site = NULL,
chem_info = NULL,
exclusion = NULL
)
Arguments
- tox_list
List with data frames for chem_data, chem_info, chem_site, and optionally exclusions and benchmarks. Created with
create_toxEval
.- ACC
Data frame with columns: CAS, chnm, endPoint, and ACC_value for specific chemical/endpoint combinations generated using the
get_ACC
function. EndPoints with specific data quality flags may optionally be removed using theremove_flags
function.- filtered_ep
Data frame with columns: endPoints, groupCol. Default is
"All"
, where no filtering occurs.- chem_data
Optional data frame with (at least) columns: CAS, SiteID, and Value. Default is
NULL
. The argument will over-ride what is in tox_list.- chem_site
Optional data frame with (at least) columns: SiteID, and Short Name. Default is
NULL
. The argument will over-ride what is in tox_list.- chem_info
Optional data frame with (at least) columns: CAS, and class. Default is
NULL
. The argument will over-ride what is in tox_list.- exclusion
Optional data frame with (at least) columns: CAS and endPoint. Default is
NULL
. The argument will over-ride what is in tox_list.
Value
a data frame with the columns: CAS, chnm (chemical name as a factor), site, date, EAR, Bio_category, shortName (of site), Class. The output of this function is where you find EAR values for every chemical/endpoint combination.
Details
To use the data provided by the package, a sample workflow is shown below in the examples. The examples include retrieving the ToxCast (ACC) values that are used to calculate EARs, choosing endPoints that should be ignored based on data quality "flags" in the ToxCast database, and removing groups of endPoints that may not be important to the analysis at hand.
Examples
path_to_tox <- system.file("extdata", package = "toxEval")
file_name <- "OWC_data_fromSup.xlsx"
full_path <- file.path(path_to_tox, file_name)
tox_list <- create_toxEval(full_path)
ACC <- get_ACC(tox_list$chem_info$CAS)
ACC <- remove_flags(ACC)
cleaned_ep <- clean_endPoint_info(end_point_info)
filtered_ep <- filter_groups(cleaned_ep)
chemical_summary <- get_chemical_summary(tox_list, ACC, filtered_ep)
head(chemical_summary)
#> # A tibble: 6 × 9
#> CAS chnm endPoint site date EAR Bio_category shortName
#> <chr> <fct> <chr> <chr> <dttm> <dbl> <chr> <chr>
#> 1 102-3… 3,4-… TOX21_E… USGS… 2011-07-18 10:29:00 1.45e-4 Nuclear Rec… Milwaukee
#> 2 102-3… 3,4-… TOX21_E… USGS… 2011-07-27 08:14:00 2.17e-4 Nuclear Rec… Milwaukee
#> 3 102-3… 3,4-… TOX21_E… USGS… 2011-09-18 19:04:00 1.45e-4 Nuclear Rec… Milwaukee
#> 4 102-3… 3,4-… TOX21_E… USGS… 2011-09-20 11:25:00 1.45e-4 Nuclear Rec… Milwaukee
#> 5 102-3… 3,4-… TOX21_E… USGS… 2011-09-29 08:57:00 1.45e-4 Nuclear Rec… Burns
#> 6 102-3… 3,4-… TOX21_E… USGS… 2011-05-16 14:00:00 2.45e-4 Nuclear Rec… Saginaw
#> # ℹ 1 more variable: Class <fct>