Skip to contents

This wrapper function retrieves toxicological information for specified chemicals by calling several external functions to query multiple databases, including PubChem, the Integrated Chemical Environment (ICE), CompTox Chemicals Dashboard, and the Integrated Risk Information System (IRIS) and other.

Usage

extr_tox(casrn, verbose = TRUE, force = TRUE, delay = 2)

Arguments

casrn

A character vector of CAS Registry Numbers (CASRN) representing the chemicals of interest.

verbose

A logical value indicating whether to print detailed messages. Default is TRUE.

force

Logical indicating whether to force a fresh download of the EPA PPRTV database. Default is TRUE.

delay

Numeric value indicating the delay in seconds between requests to avoid overwhelming the server. Default is 3 seconds.

Value

A list of data frames containing toxicological information retrieved from each database:

who_iarc_monographs

Lists if any, the WHO IARC monographs related to that chemical.

pprtv

Risk assessment data from the EPA PPRTV

ghs_dat

Toxicity data from PubChem's Globally Harmonized System (GHS) classification.

ice_dat

Assay data from the Integrated Chemical Environment (ICE) database.

iris

Risk assessment data from the IRIS database.

comptox_list

List of dataframe with toxicity information from the CompTox Chemicals Dashboard.

Details

Specifically, this function:

  • Calls extr_monograph to return monographs informations from WHO IARC.

  • Calls extr_pubchem_ghs to retrieve GHS classification data from PubChem.

  • Calls extr_ice to gather assay data from the ICE database.

  • Calls extr_iris to retrieve risk assessment information from the IRIS database.

  • Calls extr_comptox to retrieve data from the CompTox Chemicals Dashboard.

Examples

# \donttest{
condathis::with_sandbox_dir({ # this is to write on tempdir as for CRAN policies # nolint
  Sys.sleep(4) # To avoid overwhelming the server
  extr_tox(casrn = c("100-00-5", "107-02-8"), delay = 4)
})
#>  Checking Internet Connection...
#>  Internet connection OK...
#> Querying 100-00-5. 
#> OK (HTTP 200).
#> 
#> Querying 7474. 
#> OK (HTTP 200).
#> 
#> Querying 107-02-8. 
#> OK (HTTP 200).
#> 
#> Querying 7847. 
#> OK (HTTP 200).
#> 
#>  Checking Internet Connection...
#>  Internet connection OK...
#>  Sending request to CompTox...
#>  Request succeeded with status code: 202
#>  Getting info from CompTox...
#>  Request succeeded with status code: 200
#>  Checking Internet Connection...
#>  Internet connection OK...
#>  Sending request to ICE database...
#>  Request succeeded with status code: 200
#>  Checking Internet Connection...
#>  Internet connection OK...
#>  Quering 100-00-5 to EPA IRIS database...
#>  Request succeeded with status code: 200
#>  Quering 107-02-8 to EPA IRIS database...
#>  Request succeeded with status code: 200
#> Warning: Chemical 100-00-5 not found!
#>  Extracting WHO IARC monographs...
#> Last updated: 2024-11-29 5:08pm (CET)
#>  Checking Internet Connection...
#>  Internet connection OK...
#>  Checking Internet Connection...
#>  Internet connection OK...
#>  Downloading data from <https://cfpub.epa.gov/ncea/pprtv/atoz.cfm>.
#>  Saving data in the cache /var/folders/bp/fpwcfq1563l21rz5gdcsfcsw0000gn/T//Rtmpunbf6d/tmp-cache509f3f0cdcae/R/extractox/epa_pprtvs.rds.
#>  Extracting EPA PPRTVs.
# }