diff --git a/DESCRIPTION b/DESCRIPTION
index a3c7e47..77dc3f7 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,6 +1,6 @@
Package: extractox
Title: Extract Tox Info from Various Databases
-Version: 0.1.9001
+Version: 0.1.9003
Authors@R: c(
person("Claudio", "Zanettini", , "claudio.zanettini@gmail.com", role = c("aut", "cre", "cph"),
comment = c(ORCID = "0000-0001-5043-8033")),
@@ -12,9 +12,11 @@ Description: Extract toxicological and chemical information from databases
Comparative Toxicogenomics Database , the
Integrated Chemical Environment , the
Integrated Risk Information System ,
+ Provisional Peer-Reviewed Toxicity Values
+ ,
the CompTox Chemicals Dashboard Resource Hub
,
- and PubChem .
+ PubChem , and others.
License: MIT + file LICENSE
URL: https://github.com/c1au6i0/extractox,
https://c1au6i0.github.io/extractox/
diff --git a/R/cache.R b/R/cache.R
index d7e5b93..993a642 100644
--- a/R/cache.R
+++ b/R/cache.R
@@ -59,7 +59,6 @@ save_to_cache <- function(dat, file_name, verbose = FALSE) {
#' @keywords internal
#' @noRd
read_from_cache <- function(file_name, verbose = FALSE) {
-
if (base::missing(file_name)) {
cli::cli_abort("The argument {.field {file_name}} is required.")
}
@@ -95,7 +94,6 @@ read_from_cache <- function(file_name, verbose = FALSE) {
#' with_extr_sandbox(Sys.getenv("R_USER_CACHE_DIR"))
#' with_extr_sandbox(tools::R_user_dir("extractox", "cache"))
with_extr_sandbox <- function(code, temp_dir = tempdir()) {
-
if (base::missing(code)) {
cli::cli_abort("The argument {.field {file_name}} is required.")
}
diff --git a/R/extr_ice.R b/R/extr_ice.R
index 62ab289..bbdd7a5 100644
--- a/R/extr_ice.R
+++ b/R/extr_ice.R
@@ -49,7 +49,8 @@ extr_ice <- function(casrn,
httr2::request(base_url) |>
httr2::req_retry(max_tries = 2, backoff = ~3) |>
httr2::req_body_json(list(chemids = casrn, assays = assays),
- auto_unbox = FALSE) |>
+ auto_unbox = FALSE
+ ) |>
httr2::req_options(!!!libcurl_opt) |>
httr2::req_perform()
},
@@ -69,8 +70,10 @@ extr_ice <- function(casrn,
"reference_url", "dtxsid", "substance_name", "pubmed_id"
)
- out <- stats::setNames(as.data.frame(matrix(ncol = length(col_names), nrow = 0)),
- col_names)
+ out <- stats::setNames(
+ as.data.frame(matrix(ncol = length(col_names), nrow = 0)),
+ col_names
+ )
# Parse the JSON content
content <- tryCatch(
diff --git a/R/extr_pprtv.R b/R/extr_pprtv.R
index 58e8b0b..d40b650 100644
--- a/R/extr_pprtv.R
+++ b/R/extr_pprtv.R
@@ -22,6 +22,7 @@
#' This is was introduced for debugging purposes.
#' @return A data frame with extracted information matching the specified
#' identifiers, or NULL if no matches are found.
+#' @seealso \href{https://www.epa.gov/pprtv/provisional-peer-reviewed-toxicity-values-pprtvs-assessments}{EPA PPRTVs}
#' @export
#' @examples
#' \donttest{
diff --git a/R/extr_tox.R b/R/extr_tox.R
index 0ae29c9..1333269 100644
--- a/R/extr_tox.R
+++ b/R/extr_tox.R
@@ -59,16 +59,20 @@ extr_tox <- function(casrn, verbose = TRUE, force = TRUE) {
iris_filt <- extr_iris(casrn = casrn, verbose = verbose)
- extracted_monographs <- extr_monograph(ids = casrn, search_type = "casrn",
- verbose = verbose)
+ extracted_monographs <- extr_monograph(
+ ids = casrn, search_type = "casrn",
+ verbose = verbose
+ )
extracted_pprtv <- extr_pprtv(ids = casrn, verbose = verbose)
- list_1 <- list(who_iarc_monographs = extracted_monographs,
- pprtv = extracted_pprtv,
- ghs_dat = ghs_dat,
- iris = iris_filt,
- ice = ice_dat)
+ list_1 <- list(
+ who_iarc_monographs = extracted_monographs,
+ pprtv = extracted_pprtv,
+ ghs_dat = ghs_dat,
+ iris = iris_filt,
+ ice = ice_dat
+ )
out <- c(list_1, comptox_list)
out
}
diff --git a/R/other.R b/R/other.R
index 5032ea2..df18483 100644
--- a/R/other.R
+++ b/R/other.R
@@ -21,10 +21,12 @@ ice_assays <- function() {
)
- ice_invivo_sensitization <- c("Human Maximization Test",
- "Human Repeat Insult Patch Test",
- "LLNA",
- "Guinea Pig Maximization/Buehler")
+ ice_invivo_sensitization <- c(
+ "Human Maximization Test",
+ "Human Repeat Insult Patch Test",
+ "LLNA",
+ "Guinea Pig Maximization/Buehler"
+ )
ice_invivo_irritation <- c(
"Draize Skin Irritation/Corrosion Test",
diff --git a/R/utils.R b/R/utils.R
index 1e6b296..ef959b3 100644
--- a/R/utils.R
+++ b/R/utils.R
@@ -85,7 +85,7 @@ download_db <- function(url,
#' @param col_names Column names to be used when creating a new dataframe in case of no matches.
#' @param chemical_col The name of the column in dat where chemical names are stored.
#' @return A dataframe with search results.
-#' @internal
+#' @keywords internal
#'
#' @details This function is used in `extr_pprtv` and `extr_monograph`.
#'
diff --git a/README.Rmd b/README.Rmd
index d793f84..3dd0f59 100644
--- a/README.Rmd
+++ b/README.Rmd
@@ -69,7 +69,7 @@ extr_ice_assay_names("Rat Acute") # keep empty to retrieve all
```
-### IRIS
+### EPA IRIS
The IRIS database is managed by the EPA and contains information on the health effects of exposure to various substances found in the environment. It provides qualitative and quantitative health risk information.
@@ -81,6 +81,19 @@ names(iris_info)
```
+### EPA PPRTVs
+
+The `extr_pprtv` function allows you to extract data for specified identifiers (CASRN or chemical names) from the EPA's Provisional Peer-Reviewed Toxicity Values (PPRTVs) database. This function retrieves and processes data, with options to use cached files or force a fresh download if necessary.
+
+```{r}
+# Example usage to extract data for a specific CASRN
+extr_pprtv(ids = "107-02-8", search_type = "casrn", verbose = TRUE)
+
+# Example usage to extract data for a chemical name
+extr_pprtv(ids = "Acrolein", search_type = "name", verbose = TRUE, force = FALSE)
+```
+
+
### CompTox
The CompTox Chemistry Dashboard, managed by the EPA, provides access to data on chemical structures, properties, and associated bioactivity data. It integrates data from various sources to support chemical safety assessments.
@@ -99,7 +112,6 @@ The IARC Monographs database is managed by the World Health Organization (WHO) I
The functione `extr_monograph` provides access to the WHO IARC Monographs database and accepts queries using CASRN or the names of chemicals.
-
```{r}
dat <- extr_monograph(search_type = "casrn", ids = c("105-74-8", "120-58-1"))
str(dat)
@@ -109,6 +121,32 @@ dat2 <- extr_monograph(search_type = "name", ids = c("Aloe", "Schistosoma", "Sty
```
+### PubChem Database
+
+PubChem is an open chemistry database at the NIH. It provides information on chemical structures, identifiers, chemical and physical properties, biological activities, safety and toxicity information, patents, literature citations, and more.
+
+A series of functions that rely on the `webchem` package are used to extract chemical information, Globally Harmonized System (`GHS`) classification data, or flavor classification from PubChem.
+
+The function `extr_chem_info` retrieves chemical information of IUPAC-named chemicals. A warning is displayed if the chemical is not found.
+
+```{r}
+chem_info <- extr_chem_info(IUPAC_names = c("Formaldehyde", "Aflatoxin B1"))
+names(chem_info)
+```
+
+
+Two functions are used to extract specific sections of PubChem chemical information using CASRN:
+
+- `extr_pubchem_ghs` extracts Globally Harmonized System (GHS) codes.
+- `extr_pubchem_fema` extracts flavor profile data.
+
+
+```{r}
+ghs_info <- extr_pubchem_ghs(casrn = c("50-00-0", "64-17-5"))
+fema_info <- extr_pubchem_fema(casrn = c("50-00-0", "123-68-2"))
+```
+
+
### Tox Info
The function `extr_tox` is a wrapper used to call all the above-mentioned functions and retrieve a list of dataframes.
@@ -166,31 +204,6 @@ tetramer_data <- extr_tetramer(
names(tetramer_data)
```
-### PubChem Database
-
-PubChem is an open chemistry database at the NIH. It provides information on chemical structures, identifiers, chemical and physical properties, biological activities, safety and toxicity information, patents, literature citations, and more.
-
-A series of functions that rely on the `webchem` package are used to extract chemical information, Globally Harmonized System (`GHS`) classification data, or flavor classification from PubChem.
-
-The function `extr_chem_info` retrieves chemical information of IUPAC-named chemicals. A warning is displayed if the chemical is not found.
-
-```{r}
-chem_info <- extr_chem_info(IUPAC_names = c("Formaldehyde", "Aflatoxin B1"))
-names(chem_info)
-```
-
-
-Two functions are used to extract specific sections of PubChem chemical information using CASRN:
-
-- `extr_pubchem_ghs` extracts Globally Harmonized System (GHS) codes.
-- `extr_pubchem_fema` extracts flavor profile data.
-
-
-```{r}
-ghs_info <- extr_pubchem_ghs(casrn = c("50-00-0", "64-17-5"))
-fema_info <- extr_pubchem_fema(casrn = c("50-00-0", "123-68-2"))
-```
-
## Important Note for Linux Users
diff --git a/man/extr_casrn_from_cid.Rd b/man/extr_casrn_from_cid.Rd
index 6ace071..8f531b2 100644
--- a/man/extr_casrn_from_cid.Rd
+++ b/man/extr_casrn_from_cid.Rd
@@ -10,7 +10,8 @@ extr_casrn_from_cid(pubchem_ids, verbose = TRUE)
\item{pubchem_ids}{A numeric vector of PubChem CIDs. These are unique identifiers
for chemical compounds in the PubChem database.}
-\item{verbose}{A logical value indicating whether to print detailed messages. Default is TRUE.}
+\item{verbose}{A logical value indicating whether to print detailed messages.
+Default is TRUE.}
}
\value{
A data frame containing the CID, CASRN, and IUPAC name of the compound.
@@ -24,7 +25,8 @@ The returned data frame includes three columns:
}
\description{
This function retrieves the CASRN for a given set of PubChem Compound Identifiers (CID).
-It queries PubChem through the \code{webchem} package and extracts the CASRN from the depositor-supplied synonyms.
+It queries PubChem through the \code{webchem} package and extracts the CASRN from
+the depositor-supplied synonyms.
}
\examples{
\donttest{
diff --git a/man/extr_chem_info.Rd b/man/extr_chem_info.Rd
index 811c7d1..f5ddce7 100644
--- a/man/extr_chem_info.Rd
+++ b/man/extr_chem_info.Rd
@@ -10,14 +10,17 @@ extr_chem_info(iupac_names, verbose = TRUE)
\item{iupac_names}{A character vector of IUPAC names. These are standardized names
of chemical compounds that will be used to search in the PubChem database.}
-\item{verbose}{A logical value indicating whether to print detailed messages. Default is TRUE.}
+\item{verbose}{A logical value indicating whether to print detailed messages.
+Default is TRUE.}
}
\value{
-A data frame with information on the queried compounds, including:
+A data frame with phisio-chemical information on the queried compounds,
+including but not limited to:
\describe{
\item{iupac_name}{The IUPAC name of the compound.}
\item{cid}{The PubChem Compound Identifier (CID).}
-\item{isomeric_smiles}{The SMILES string (Simplified Molecular Input Line Entry System).}
+\item{isomeric_smiles}{The SMILES string (Simplified Molecular Input Line
+Entry System).}
}
}
\description{
diff --git a/man/extr_comptox.Rd b/man/extr_comptox.Rd
index db5f3c6..68c8720 100644
--- a/man/extr_comptox.Rd
+++ b/man/extr_comptox.Rd
@@ -42,100 +42,149 @@ extr_comptox(
)
}
\arguments{
-\item{ids}{A character vector containing the items to be searched within the CompTox Chemistry Dashboard. These can be chemical names, CAS Registry Numbers (CASRN), InChIKeys, or DSSTox substance identifiers (DTXSID).}
+\item{ids}{A character vector containing the items to be searched within the
+CompTox Chemistry Dashboard. These can be chemical names, CAS Registry Numbers
+(CASRN), InChIKeys, or DSSTox substance identifiers (DTXSID).}
-\item{download_items}{A character vector of items to be downloaded. This includes a comprehensive set of chemical properties, identifiers, predictive data, and other relevant information. By Default, it download all the info
+\item{download_items}{A character vector of items to be downloaded.
+This includes a comprehensive set of chemical properties, identifiers, predictive
+data, and other relevant information. By Default, it download all the info
\describe{
-\item{CASRN}{The Chemical Abstracts Service Registry Number, a unique numerical identifier for chemical substances.}
-\item{INCHIKEY}{The hashed version of the full International Chemical Identifier (InChI) string.}
-\item{IUPAC_NAME}{The International Union of Pure and Applied Chemistry (IUPAC) name of the chemical.}
-\item{SMILES}{The Simplified Molecular Input Line Entry System (SMILES) representation of the chemical structure.}
+\item{CASRN}{The Chemical Abstracts Service Registry Number, a unique numerical
+identifier for chemical substances.}
+\item{INCHIKEY}{The hashed version of the full International Chemical
+Identifier (InChI) string.}
+\item{IUPAC_NAME}{The International Union of Pure and Applied Chemistry
+(IUPAC) name of the chemical.}
+\item{SMILES}{The Simplified Molecular Input Line Entry System (SMILES)
+representation of the chemical structure.}
\item{INCHI_STRING}{The full International Chemical Identifier (InChI) string.}
-\item{MS_READY_SMILES}{The SMILES representation of the chemical structure, prepared for mass spectrometry analysis.}
-\item{QSAR_READY_SMILES}{The SMILES representation of the chemical structure, prepared for quantitative structure-activity relationship (QSAR) modeling.}
-\item{MOLECULAR_FORMULA}{The chemical formula representing the number and type of atoms in a molecule.}
-\item{AVERAGE_MASS}{The average mass of the molecule, calculated based on the isotopic distribution of the elements.}
-\item{MONOISOTOPIC_MASS}{The mass of the molecule calculated using the most abundant isotope of each element.}
+\item{MS_READY_SMILES}{The SMILES representation of the chemical structure,
+prepared for mass spectrometry analysis.}
+\item{QSAR_READY_SMILES}{The SMILES representation of the chemical structure,
+prepared for quantitative structure-activity relationship (QSAR) modeling.}
+\item{MOLECULAR_FORMULA}{The chemical formula representing the number and type
+of atoms in a molecule.}
+\item{AVERAGE_MASS}{The average mass of the molecule, calculated based on the
+isotopic distribution of the elements.}
+\item{MONOISOTOPIC_MASS}{The mass of the molecule calculated using the most
+abundant isotope of each element.}
\item{QC_LEVEL}{The quality control level of the data.}
\item{SAFETY_DATA}{Safety information related to the chemical.}
\item{EXPOCAST}{Exposure predictions from the EPA's ExpoCast program.}
\item{DATA_SOURCES}{Sources of the data provided.}
\item{TOXVAL_DATA}{Toxicological values related to the chemical.}
-\item{NUMBER_OF_PUBMED_ARTICLES}{The number of articles related to the chemical in PubMed.}
+\item{NUMBER_OF_PUBMED_ARTICLES}{The number of articles related to the chemical
+in PubMed.}
\item{PUBCHEM_DATA_SOURCES}{Sources of data from PubChem.}
-\item{CPDAT_COUNT}{The number of entries in the Chemical and Product Categories Database (CPDat).}
-\item{IRIS_LINK}{Link to the EPA's Integrated Risk Information System (IRIS) entry for the chemical.}
-\item{PPRTV_LINK}{Link to the EPA's Provisional Peer-Reviewed Toxicity Values (PPRTV) entry for the chemical.}
+\item{CPDAT_COUNT}{The number of entries in the Chemical and Product Categories
+Database (CPDat).}
+\item{IRIS_LINK}{Link to the EPA's Integrated Risk Information System (IRIS)
+entry for the chemical.}
+\item{PPRTV_LINK}{Link to the EPA's Provisional Peer-Reviewed Toxicity Values
+(PPRTV) entry for the chemical.}
\item{WIKIPEDIA_ARTICLE}{Link to the Wikipedia article for the chemical.}
\item{QC_NOTES}{Notes related to the quality control of the data.}
\item{ABSTRACT_SHIFTER}{Information related to the abstract shifter.}
\item{TOXPRINT_FINGERPRINT}{The ToxPrint chemoinformatics fingerprint of the chemical.}
-\item{ACTOR_REPORT}{The Aggregated Computational Toxicology Resource (ACTOR) report for the chemical.}
+\item{ACTOR_REPORT}{The Aggregated Computational Toxicology Resource (ACTOR)
+report for the chemical.}
\item{SYNONYM_IDENTIFIER}{Identifiers for synonyms of the chemical.}
\item{RELATED_RELATIONSHIP}{Information on related chemicals.}
-\item{ASSOCIATED_TOXCAST_ASSAYS}{Assays associated with the chemical in the ToxCast database.}
+\item{ASSOCIATED_TOXCAST_ASSAYS}{Assays associated with the chemical
+in the ToxCast database.}
\item{TOXVAL_DETAILS}{Details of toxicological values.}
\item{CHEMICAL_PROPERTIES_DETAILS}{Details of the chemical properties.}
-\item{BIOCONCENTRATION_FACTOR_TEST_PRED}{Predicted bioconcentration factor from tests.}
-\item{BOILING_POINT_DEGC_TEST_PRED}{Predicted boiling point in degrees Celsius from tests.}
-\item{48HR_DAPHNIA_LC50_MOL/L_TEST_PRED}{Predicted 48-hour LC50 for Daphnia in mol/L from tests.}
+\item{BIOCONCENTRATION_FACTOR_TEST_PRED}{Predicted bioconcentration factor from
+tests.}
+\item{BOILING_POINT_DEGC_TEST_PRED}{Predicted boiling point in degrees Celsius
+from tests.}
+\item{48HR_DAPHNIA_LC50_MOL/L_TEST_PRED}{Predicted 48-hour LC50 for Daphnia
+in mol/L from tests.}
\item{DENSITY_G/CM^3_TEST_PRED}{Predicted density in g/cm³ from tests.}
\item{DEVTOX_TEST_PRED}{Predicted developmental toxicity from tests.}
-\item{96HR_FATHEAD_MINNOW_MOL/L_TEST_PRED}{Predicted 96-hour LC50 for fathead minnow in mol/L from tests.}
-\item{FLASH_POINT_DEGC_TEST_PRED}{Predicted flash point in degrees Celsius from tests.}
-\item{MELTING_POINT_DEGC_TEST_PRED}{Predicted melting point in degrees Celsius from tests.}
+\item{96HR_FATHEAD_MINNOW_MOL/L_TEST_PRED}{Predicted 96-hour LC50 for fathead
+minnow in mol/L from tests.}
+\item{FLASH_POINT_DEGC_TEST_PRED}{Predicted flash point in degrees Celsius
+from tests.}
+\item{MELTING_POINT_DEGC_TEST_PRED}{Predicted melting point in degrees Celsius
+from tests.}
\item{AMES_MUTAGENICITY_TEST_PRED}{Predicted Ames mutagenicity from tests.}
-\item{ORAL_RAT_LD50_MOL/KG_TEST_PRED}{Predicted oral LD50 for rats in mol/kg from tests.}
-\item{SURFACE_TENSION_DYN/CM_TEST_PRED}{Predicted surface tension in dyn/cm from tests.}
-\item{THERMAL_CONDUCTIVITY_MW_M×K_TEST_PRED}{Predicted thermal conductivity in mW/m×K from tests.}
-\item{TETRAHYMENA_PYRIFORMIS_IGC50_MOL/L_TEST_PRED}{Predicted IGC50 for Tetrahymena pyriformis in mol/L from tests.}
+\item{ORAL_RAT_LD50_MOL/KG_TEST_PRED}{Predicted oral LD50 for rats in mol/kg
+from tests.}
+\item{SURFACE_TENSION_DYN/CM_TEST_PRED}{Predicted surface tension in dyn/cm
+from tests.}
+\item{THERMAL_CONDUCTIVITY_MW_M×K_TEST_PRED}{Predicted thermal conductivity
+in mW/m×K from tests.}
+\item{TETRAHYMENA_PYRIFORMIS_IGC50_MOL/L_TEST_PRED}{Predicted IGC50 for Tetrahymena
+pyriformis in mol/L from tests.}
\item{VISCOSITY_CP_CP_TEST_PRED}{Predicted viscosity in cP from tests.}
-\item{VAPOR_PRESSURE_MMHG_TEST_PRED}{Predicted vapor pressure in mmHg from tests.}
-\item{WATER_SOLUBILITY_MOL/L_TEST_PRED}{Predicted water solubility in mol/L from tests.}
-\item{ATMOSPHERIC_HYDROXYLATION_RATE_\(AOH\)_CM3/MOLECULE\*SEC_OPERA_PRED}{Predicted atmospheric hydroxylation rate in cm³/molecule\*sec from OPERA.}
+\item{VAPOR_PRESSURE_MMHG_TEST_PRED}{Predicted vapor pressure in mmHg from
+tests.}
+\item{WATER_SOLUBILITY_MOL/L_TEST_PRED}{Predicted water solubility in mol/L
+from tests.}
+\item{ATMOSPHERIC_HYDROXYLATION_RATE_\(AOH\)_CM3/MOLECULE\*SEC_OPERA_PRED}{Predicted
+atmospheric hydroxylation rate in cm³/molecule\*sec from OPERA.}
\item{BIOCONCENTRATION_FACTOR_OPERA_PRED}{Predicted bioconcentration factor from OPERA.}
-\item{BIODEGRADATION_HALF_LIFE_DAYS_DAYS_OPERA_PRED}{Predicted biodegradation half-life in days from OPERA.}
-\item{BOILING_POINT_DEGC_OPERA_PRED}{Predicted boiling point in degrees Celsius from OPERA.}
-\item{HENRYS_LAW_ATM-M3/MOLE_OPERA_PRED}{Predicted Henry's law constant in atm-m³/mole from OPERA.}
+\item{BIODEGRADATION_HALF_LIFE_DAYS_DAYS_OPERA_PRED}{Predicted biodegradation
+half-life in days from OPERA.}
+\item{BOILING_POINT_DEGC_OPERA_PRED}{Predicted boiling point in degrees
+Celsius from OPERA.}
+\item{HENRYS_LAW_ATM-M3/MOLE_OPERA_PRED}{Predicted Henry's law constant
+in atm-m³/mole from OPERA.}
\item{OPERA_KM_DAYS_OPERA_PRED}{Predicted Km in days from OPERA.}
-\item{OCTANOL_AIR_PARTITION_COEFF_LOGKOA_OPERA_PRED}{Predicted octanol-air partition coefficient (log Koa) from OPERA.}
-\item{SOIL_ADSORPTION_COEFFICIENT_KOC_L/KG_OPERA_PRED}{Predicted soil adsorption coefficient (Koc) in L/kg from OPERA.}
-\item{OCTANOL_WATER_PARTITION_LOGP_OPERA_PRED}{Predicted octanol-water partition coefficient (log P) from OPERA.}
-\item{MELTING_POINT_DEGC_OPERA_PRED}{Predicted melting point in degrees Celsius from OPERA.}
+\item{OCTANOL_AIR_PARTITION_COEFF_LOGKOA_OPERA_PRED}{Predicted octanol-air
+partition coefficient (log Koa) from OPERA.}
+\item{SOIL_ADSORPTION_COEFFICIENT_KOC_L/KG_OPERA_PRED}{Predicted soil adsorption
+coefficient (Koc) in L/kg from OPERA.}
+\item{OCTANOL_WATER_PARTITION_LOGP_OPERA_PRED}{Predicted octanol-water partition
+coefficient (log P) from OPERA.}
+\item{MELTING_POINT_DEGC_OPERA_PRED}{Predicted melting point in degrees Celsius
+from OPERA.}
\item{OPERA_PKAA_OPERA_PRED}{Predicted pKa (acidic) from OPERA.}
\item{OPERA_PKAB_OPERA_PRED}{Predicted pKa (basic) from OPERA.}
-\item{VAPOR_PRESSURE_MMHG_OPERA_PRED}{Predicted vapor pressure in mmHg from OPERA.}
-\item{WATER_SOLUBILITY_MOL/L_OPERA_PRED}{Predicted water solubility in mol/L from OPERA.}
-\item{EXPOCAST_MEDIAN_EXPOSURE_PREDICTION_MG/KG-BW/DAY}{Predicted median exposure from ExpoCast in mg/kg-bw/day.}
+\item{VAPOR_PRESSURE_MMHG_OPERA_PRED}{Predicted vapor pressure in mmHg from
+OPERA.}
+\item{WATER_SOLUBILITY_MOL/L_OPERA_PRED}{Predicted water solubility in mol/L
+from OPERA.}
+\item{EXPOCAST_MEDIAN_EXPOSURE_PREDICTION_MG/KG-BW/DAY}{Predicted median
+exposure from ExpoCast in mg/kg-bw/day.}
\item{NHANES}{National Health and Nutrition Examination Survey data.}
\item{TOXCAST_NUMBER_OF_ASSAYS/TOTAL}{Number of assays in ToxCast.}
\item{TOXCAST_PERCENT_ACTIVE}{Percentage of active assays in ToxCast.}
}}
-\item{mass_error}{Numeric value indicating the mass error tolerance for searches involving mass data. Default is \code{0}.}
+\item{mass_error}{Numeric value indicating the mass error tolerance for searches
+involving mass data. Default is \code{0}.}
-\item{verify_ssl}{Logical value indicating whether SSL certificates should be verified. Default is \code{FALSE}. Note that this argument is not used
-on linux OS.}
+\item{verify_ssl}{Logical value indicating whether SSL certificates should be
+verified. Default is \code{FALSE}. Note that this argument is not used on linux OS.}
-\item{verbose}{A logical value indicating whether to print detailed messages. Default is TRUE.}
+\item{verbose}{A logical value indicating whether to print detailed messages.
+Default is TRUE.}
-\item{...}{Additional arguments passed to \code{httr2::req_options()}. Note that this argument is not used
-on linux OS.}
+\item{...}{Additional arguments passed to \code{httr2::req_options()}.}
}
\value{
A cleaned data frame containing the requested data from CompTox.
}
\description{
-This function interacts with the CompTox Chemistry Dashboard to download and extract a wide range of chemical data based on user-defined search criteria. It allows for flexible input types and supports downloading various chemical properties, identifiers, and predictive data.
-It was inspired by the \code{ECOTOXr::websearch_comptox} function.
+This function interacts with the CompTox Chemistry Dashboard to download and
+extract a wide range of chemical data based on user-defined search criteria.
+It allows for flexible input types and supports downloading various chemical
+properties, identifiers, and predictive data. It was inspired by the
+\code{ECOTOXr::websearch_comptox} function.
}
\details{
-Please note that this function, which pulls data from EPA servers, may encounter issues on some Linux systems.
-This is because those servers do not accept secure legacy renegotiation. On Linux systems, the current function depends
-on \code{curl} and \code{OpenSSL}, which have known problems with unsafe legacy renegotiation in newer versions.
-One workaround is to downgrade to \code{curl v7.78.0} and \code{OpenSSL v1.1.1}.
-However, please be aware that using these older versions might introduce potential security vulnerabilities.
-Refer to \href{https://gist.github.com/c1au6i0/5cc2d87966340a31032ffebf1cfb657c}{this gist} for instructions on how to downgrade \code{curl} and \code{OpenSSL} on Ubuntu.
+Please note that this function, which pulls data from EPA servers, may encounter
+issues on some Linux systems. This is because those servers do not accept secure
+legacy renegotiation. On Linux systems, the current function depends on \code{curl}
+and \code{OpenSSL}, which have known problems with unsafe legacy renegotiation
+in newer versions. One workaround is to downgrade to \code{curl v7.78.0} and
+\code{OpenSSL v1.1.1}. However, please be aware that using these older versions
+might introduce potential security vulnerabilities. Refer to
+\href{https://gist.github.com/c1au6i0/5cc2d87966340a31032ffebf1cfb657c}{this gist}
+for instructions on how to downgrade \code{curl} and \code{OpenSSL} on Ubuntu.
}
\examples{
\donttest{
diff --git a/man/extr_ctd.Rd b/man/extr_ctd.Rd
index 5fafa94..51bd2c0 100644
--- a/man/extr_ctd.Rd
+++ b/man/extr_ctd.Rd
@@ -19,11 +19,15 @@ extr_ctd(
\arguments{
\item{input_terms}{A character vector of input terms such as CAS numbers or IUPAC names.}
-\item{category}{A string specifying the category of data to query. Valid options are "all", "chem", "disease", "gene", "go", "pathway", "reference", and "taxon". Default is "chem".}
+\item{category}{A string specifying the category of data to query. Valid options
+are "all", "chem", "disease", "gene", "go", "pathway", "reference", and "taxon".
+Default is "chem".}
-\item{report_type}{A string specifying the type of report to return. Default is "genes_curated". Valid options include:
+\item{report_type}{A string specifying the type of report to return. Default is
+"genes_curated". Valid options include:
\describe{
-\item{"cgixns"}{Curated chemical-gene interactions. Requires at least one \code{action_types} parameter.}
+\item{"cgixns"}{Curated chemical-gene interactions. Requires at least one
+\code{action_types} parameter.}
\item{"chems"}{All chemical associations.}
\item{"chems_curated"}{Curated chemical associations.}
\item{"chems_inferred"}{Inferred chemical associations.}
@@ -38,21 +42,29 @@ extr_ctd(
\item{"pathways_enriched"}{Enriched pathway associations.}
\item{"phenotypes_curated"}{Curated phenotype associations.}
\item{"phenotypes_inferred"}{Inferred phenotype associations.}
-\item{"go"}{All Gene Ontology (GO) associations. Requires at least one \code{ontology} parameter.}
-\item{"go_enriched"}{Enriched GO associations. Requires at least one \code{ontology} parameter.}
+\item{"go"}{All Gene Ontology (GO) associations. Requires at least one
+\code{ontology} parameter.}
+\item{"go_enriched"}{Enriched GO associations. Requires at least one
+\code{ontology} parameter.}
}}
-\item{input_term_search_type}{A string specifying the search method to use. Options are "hierarchicalAssociations" or "directAssociations". Default is "directAssociations".}
+\item{input_term_search_type}{A string specifying the search method to use.
+Options are "hierarchicalAssociations" or "directAssociations". Default is
+"directAssociations".}
-\item{action_types}{An optional character vector specifying one or more interaction types for filtering results. Default is "ANY".
-Other acceptable inputs are "abundance", "activity", "binding", "cotreatment", "expression", "folding", "localization", "metabolic processing"...See https://ctdbase.org/tools/batchQuery.go
-for a full list.}
+\item{action_types}{An optional character vector specifying one or more interaction
+types for filtering results. Default is "ANY".
+Other acceptable inputs are "abundance", "activity", "binding", "cotreatment",
+"expression", "folding", "localization", "metabolic processing"...
+See https://ctdbase.org/tools/batchQuery.go for a full list.}
-\item{ontology}{An optional character vector specifying one or more ontologies for filtering GO reports. Default NULL.}
+\item{ontology}{An optional character vector specifying one or more ontologies
+for filtering GO reports. Default NULL.}
\item{verify_ssl}{Boolean to control of SSL should be verified or not.}
-\item{verbose}{A logical value indicating whether to print detailed messages. Default is TRUE.}
+\item{verbose}{A logical value indicating whether to print detailed messages.
+Default is TRUE.}
\item{...}{Any other arguments to be supplied to \code{req_option} and thus to \code{libcurl}.}
}
@@ -88,8 +100,10 @@ str(dat2)
}
\references{
\itemize{
-\item Davis, A. P., Grondin, C. J., Johnson, R. J., Sciaky, D., McMorran, R., Wiegers, T. C., & Mattingly, C. J. (2019).
-The Comparative Toxicogenomics Database: update 2019. Nucleic acids research, 47(D1), D948–D954. \doi{10.1093/nar/gky868}
+\item Davis, A. P., Grondin, C. J., Johnson, R. J., Sciaky, D., McMorran, R.,
+Wiegers, T. C., & Mattingly, C. J. (2019).
+The Comparative Toxicogenomics Database: update 2019. Nucleic acids research,
+47(D1), D948–D954. \doi{10.1093/nar/gky868}
}
}
\seealso{
diff --git a/man/extr_ice.Rd b/man/extr_ice.Rd
index 66ccc1e..6564d63 100644
--- a/man/extr_ice.Rd
+++ b/man/extr_ice.Rd
@@ -31,7 +31,7 @@ information based on specified chemical IDs and assays.
}
\examples{
\donttest{
-extr_ice(c("50-00-0"))
+extr_ice(casrn = c("50-00-0"))
}
}
\seealso{
diff --git a/man/extr_iris.Rd b/man/extr_iris.Rd
index 9b4433d..2dd0c07 100644
--- a/man/extr_iris.Rd
+++ b/man/extr_iris.Rd
@@ -17,12 +17,12 @@ A data frame containing the extracted data.
}
\description{
The \code{extr_iris} function sends a request to the EPA IRIS database to search
-for information based on a specified keywords and cancer types. It retrieves and parses the HTML content from the response.
-Note that if \code{keywords} is not provide all dataset are retrieved.
+for information based on a specified keywords and cancer types. It retrieves
+and parses the HTML content from the response.
}
\examples{
\donttest{
-extr_iris(c("1332-21-4", "50-00-0"))
+extr_iris(casrn = c("1332-21-4", "50-00-0"))
}
}
\seealso{
diff --git a/man/extr_monograph.Rd b/man/extr_monograph.Rd
index 7571537..d7c49a8 100644
--- a/man/extr_monograph.Rd
+++ b/man/extr_monograph.Rd
@@ -29,8 +29,11 @@ A data frame containing the relevant information from the WHO IARC,
. and \code{additional_information} where the chemical was described.
}
\description{
-This function retrieves information regarding Monographs from the World Health Organization (WHO) International
-Agency for Research on Cancer (IARC) based on CAS Registry Number or Name of the chemical.
+This function returns information regarding Monographs from the World Health
+Organization (WHO) International Agency for Research on Cancer (IARC) based on
+CAS Registry Number or Name of the chemical. Note that the data is not fetched
+dynamically from the website, but has retrieved and copy hasbeen saved as
+internal data in the package.
}
\examples{
{
@@ -38,10 +41,10 @@ Agency for Research on Cancer (IARC) based on CAS Registry Number or Name of th
str(dat)
# Example usage for name search
- dat2 <- extr_monograph(search_type = "name",
- ids = c("Aloe", "Schistosoma",
-. "Styrene")
-. )
+ dat2 <- extr_monograph(
+ search_type = "name",
+ ids = c("Aloe", "Schistosoma", "Styrene")
+ )
str(dat2)
}
}
diff --git a/man/extr_pprtv.Rd b/man/extr_pprtv.Rd
index 7758ff9..1b45d18 100644
--- a/man/extr_pprtv.Rd
+++ b/man/extr_pprtv.Rd
@@ -50,8 +50,10 @@ with_extr_sandbox({ # this is to write on tempdir as for CRAN policies
extr_pprtv(ids = "107-02-8", search_type = "casrn", verbose = TRUE)
# Extract data for a chemical name
- extr_pprtv(ids = "Acrolein", search_type = "name", verbose = TRUE,
- force = FALSE)
+ extr_pprtv(
+ ids = "Acrolein", search_type = "name", verbose = TRUE,
+ force = FALSE
+ )
# Extract data for multiple identifiers
extr_pprtv(
@@ -63,3 +65,6 @@ with_extr_sandbox({ # this is to write on tempdir as for CRAN policies
})
}
}
+\seealso{
+\href{https://www.epa.gov/pprtv/provisional-peer-reviewed-toxicity-values-pprtvs-assessments}{EPA PPRTVs}
+}
diff --git a/man/extr_tetramer.Rd b/man/extr_tetramer.Rd
index 7a5fcb9..a5e33e0 100644
--- a/man/extr_tetramer.Rd
+++ b/man/extr_tetramer.Rd
@@ -17,7 +17,8 @@ extr_tetramer(
)
}
\arguments{
-\item{chem}{A string indicating the chemical identifiers such as CAS number or IUPAC name of the chemical.}
+\item{chem}{A string indicating the chemical identifiers such as CAS number or
+IUPAC name of the chemical.}
\item{disease}{A string indicating a disease term. Default is an empty string.}
@@ -25,13 +26,18 @@ extr_tetramer(
\item{go}{A string indicating a Gene Ontology term. Default is an empty string.}
-\item{input_term_search_type}{A string specifying the search method to use. Options are "hierarchicalAssociations" or "directAssociations". Default is "directAssociations".}
+\item{input_term_search_type}{A string specifying the search method to use.
+Options are "hierarchicalAssociations" or "directAssociations". Default is
+"directAssociations".}
-\item{qt_match_type}{A string specifying the query type match method. Options are "equals" or "contains". Default is "equals".}
+\item{qt_match_type}{A string specifying the query type match method. Options
+are "equals" or "contains". Default is "equals".}
-\item{verify_ssl}{Boolean to control if SSL should be verified or not. Default is FALSE.}
+\item{verify_ssl}{Boolean to control if SSL should be verified or not.
+Default is FALSE.}
-\item{verbose}{A logical value indicating whether to print detailed messages. Default is TRUE.}
+\item{verbose}{A logical value indicating whether to print detailed messages.
+Default is TRUE.}
\item{...}{Any other arguments to be supplied to \code{req_option} and thus to \code{libcurl}.}
}
@@ -39,7 +45,8 @@ extr_tetramer(
A data frame containing the queried tetramer data in CSV format.
}
\description{
-This function queries the Comparative Toxicogenomics Database API to retrieve tetramer data based on chemicals, diseases, genes, or other categories.
+This function queries the Comparative Toxicogenomics Database API to retrieve
+tetramer data based on chemicals, diseases, genes, or other categories.
}
\examples{
\donttest{
@@ -57,11 +64,15 @@ str(tetramer_data)
\references{
\itemize{
\item Comparative Toxicogenomics Database: \url{http://ctdbase.org}
-\item Davis, A. P., Grondin, C. J., Johnson, R. J., Sciaky, D., McMorran, R., Wiegers, T. C., & Mattingly, C. J. (2019).
-The Comparative Toxicogenomics Database: update 2019. Nucleic acids research, 47(D1), D948–D954. \doi{10.1093/nar/gky868}
-\item Davis, A. P., Wiegers, T. C., Wiegers, J., Wyatt, B., Johnson, R. J., Sciaky, D., Barkalow, F., Strong, M., Planchart, A., & Mattingly, C. J. (2023).
-CTD tetramers: A new online tool that computationally links curated chemicals, genes, phenotypes, and diseases to inform molecular mechanisms for
-environmental health. Toxicological Sciences, 195(2), 155–168.
+\item Davis, A. P., Grondin, C. J., Johnson, R. J., Sciaky, D., McMorran, R.,
+Wiegers, T. C., & Mattingly, C. J. (2019).
+The Comparative Toxicogenomics Database: update 2019. Nucleic acids research,
+47(D1), D948–D954. \doi{10.1093/nar/gky868}
+\item Davis, A. P., Wiegers, T. C., Wiegers, J., Wyatt, B., Johnson,
+R. J., Sciaky, D., Barkalow, F., Strong, M., Planchart, A.,
+& Mattingly, C. J. (2023). CTD tetramers: A new online tool that computationally
+links curated chemicals, genes, phenotypes, and diseases to inform molecular
+mechanisms for environmental health. Toxicological Sciences, 195(2), 155–168.
\doi{10.1093/toxsci/kfad069}
}
}
diff --git a/man/extr_tox.Rd b/man/extr_tox.Rd
index a70da21..d31519e 100644
--- a/man/extr_tox.Rd
+++ b/man/extr_tox.Rd
@@ -4,37 +4,52 @@
\alias{extr_tox}
\title{Extract Toxicological Information from Multiple Databases}
\usage{
-extr_tox(casrn, verbose = TRUE)
+extr_tox(casrn, verbose = TRUE, force = TRUE)
}
\arguments{
-\item{casrn}{A character vector of CAS Registry Numbers (CASRN) representing the chemicals of interest.}
+\item{casrn}{A character vector of CAS Registry Numbers (CASRN) representing
+the chemicals of interest.}
-\item{verbose}{A logical value indicating whether to print detailed messages. Default is TRUE.}
+\item{verbose}{A logical value indicating whether to print detailed messages.
+Default is TRUE.}
+
+\item{force}{Logical indicating whether to force a fresh download of the EPA
+PPRTV database. Default is TRUE.}
}
\value{
-A list of data frames containing toxicological information retrieved from each database:
+A list of data frames containing toxicological information retrieved
+from each database:
\describe{
-\item{who_iarc_monographs}{Lists if any, the WHO IARC monographs related to that chemical.}
-\item{ghs_dat}{Toxicity data from PubChem's Globally Harmonized System (GHS) classification.}
-\item{ice_dat}{Assay data from the Integrated Chemical Environment (ICE) database.}
-\item{iris}{Risk assessment data from the IRIS database.}
+\item{who_iarc_monographs}{Lists if any, the WHO IARC monographs related
+to that chemical.}
+\item{pprtv}{Risk assessment data from the EPA PPRTV}
+\item{ghs_dat}{Toxicity data from PubChem's Globally Harmonized System (GHS)
+classification.}
+\item{ice_dat}{Assay data from the Integrated Chemical Environment (ICE)
+database.}
\item{iris}{Risk assessment data from the IRIS database.}
-\item{comptox_list}{List of dataframe with toxicity information from the CompTox Chemicals Dashboard.}
+\item{comptox_list}{List of dataframe with toxicity information
+from the CompTox Chemicals Dashboard.}
}
}
\description{
-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).
+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.
}
\details{
Specifically, this function:
\itemize{
-\item Calls \code{\link{extr_monograph}} to return monographs informations from WHO IARC.
-\item Calls \code{\link{extr_pubchem_ghs}} to retrieve GHS classification data from PubChem.
+\item Calls \code{\link{extr_monograph}} to return monographs informations
+from WHO IARC.
+\item Calls \code{\link{extr_pubchem_ghs}} to retrieve GHS classification
+data from PubChem.
\item Calls \code{\link{extr_ice}} to gather assay data from the ICE database.
-\item Calls \code{\link{extr_iris}} to retrieve risk assessment information from the IRIS database.
-\item Calls \code{\link{extr_comptox}} to retrieve data from the CompTox Chemicals Dashboard.
+\item Calls \code{\link{extr_iris}} to retrieve risk assessment information
+from the IRIS database.
+\item Calls \code{\link{extr_comptox}} to retrieve data from the CompTox
+Chemicals Dashboard.
}
}
\examples{
diff --git a/man/search_and_match.Rd b/man/search_and_match.Rd
index 781306b..3bacd48 100644
--- a/man/search_and_match.Rd
+++ b/man/search_and_match.Rd
@@ -21,9 +21,10 @@ search_and_match(dat, ids, search_type, col_names, chemical_col = "chemical")
A dataframe with search results.
}
\description{
-This function searches for matches in a dataframe based on a given list of ids and search type,
-then combines the results into a single dataframe, making sure that NA rows are added for any missing ids.
-The column \code{query} is a the end of the dataframe.
+This function searches for matches in a dataframe based on a given list of ids
+and search type, then combines the results into a single dataframe, making sure
+that NA rows are added for any missing ids. The column \code{query} is a the end of
+the dataframe.
}
\details{
This function is used in \code{extr_pprtv} and \code{extr_monograph}.
@@ -31,3 +32,4 @@ This function is used in \code{extr_pprtv} and \code{extr_monograph}.
\seealso{
\code{\link{extr_pprtv}}, \code{\link{extr_monograph}}
}
+\keyword{internal}
diff --git a/man/with_extr_sandbox.Rd b/man/with_extr_sandbox.Rd
index c6a4d5c..28cb1f6 100644
--- a/man/with_extr_sandbox.Rd
+++ b/man/with_extr_sandbox.Rd
@@ -1,5 +1,5 @@
% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/utils.R
+% Please edit documentation in R/cache.R
\name{with_extr_sandbox}
\alias{with_extr_sandbox}
\title{Run Code in a Temporary Sandbox Environment}
diff --git a/tests/testthat/setup.R b/tests/testthat/setup.R
index c7b0f02..bb06219 100644
--- a/tests/testthat/setup.R
+++ b/tests/testthat/setup.R
@@ -4,4 +4,3 @@ withr::local_envvar(
),
.local_envir = testthat::teardown_env()
)
-
diff --git a/tests/testthat/test-chace.R b/tests/testthat/test-chace.R
index 1ccb336..0ab7efc 100644
--- a/tests/testthat/test-chace.R
+++ b/tests/testthat/test-chace.R
@@ -10,28 +10,37 @@ library(fs)
song <- c("bella", "ciao", "bella", "ciao", "ciao", "ciao")
test_that("Save to cache works", {
-
- expect_message({
+ expect_message(
+ {
file_path <- save_to_cache(dat = song, file_name = "song.txt", verbose = TRUE)
- }, "Saving")
-
- exp_path <- normalizePath(fs::path(Sys.getenv("R_USER_CACHE_DIR"), "R",
- "extractox", "song.txt"))
- file_path <- normalizePath(file_path)
-
- expect_equal(exp_path, file_path)
- message(file_path)
+ },
+ "Saving"
+ )
+
+ exp_path <- normalizePath(fs::path(
+ Sys.getenv("R_USER_CACHE_DIR"), "R",
+ "extractox", "song.txt"
+ ))
+ file_path <- normalizePath(file_path)
+
+ expect_equal(exp_path, file_path)
+ message(file_path)
})
test_that("Save to cache overwrites cache if present", {
- expect_message({
- file_path <- save_to_cache(dat = song, file_name = "song.txt", verbose = TRUE)
- }, "Overwriting")
+ expect_message(
+ {
+ file_path <- save_to_cache(dat = song, file_name = "song.txt", verbose = TRUE)
+ },
+ "Overwriting"
+ )
expect_no_message({
- file_path <- save_to_cache(dat = song,
- file_name = "song.txt",
- verbose = FALSE)
+ file_path <- save_to_cache(
+ dat = song,
+ file_name = "song.txt",
+ verbose = FALSE
+ )
})
})
@@ -40,27 +49,25 @@ test_that("Save to cache overwrites cache if present", {
# @@@@@@@@@@@@@@@@
test_that("load cache verbose, load silent", {
-
-
- expect_message({
- dat <- read_from_cache(file_name = "song.txt", verbose = TRUE)
- }, "Successfully")
+ expect_message(
+ {
+ dat <- read_from_cache(file_name = "song.txt", verbose = TRUE)
+ },
+ "Successfully"
+ )
expect_no_message({
- dat2 <- read_from_cache(file_name = "song.txt", verbose = FALSE)
+ dat2 <- read_from_cache(file_name = "song.txt", verbose = FALSE)
})
expect_equal(dat, song)
-
})
test_that("load cache fail if no file", {
-
expect_error({
- read_from_cache(file_name = "non_esisto.txt", verbose = TRUE)
+ read_from_cache(file_name = "non_esisto.txt", verbose = TRUE)
})
-
})
# @@@@@@@@@@@@@@@@
@@ -69,13 +76,11 @@ test_that("load cache fail if no file", {
test_that("Sandbox works", {
-
to_check <- normalizePath(tempdir(), mustWork = FALSE)
with_extr_sandbox(temp_dir = to_check, code = {
- out <- normalizePath(Sys.getenv("R_USER_CACHE_DIR"), mustWork = FALSE)
+ out <- normalizePath(Sys.getenv("R_USER_CACHE_DIR"), mustWork = FALSE)
})
expect_equal(to_check, normalizePath(out, mustWork = FALSE))
})
-
diff --git a/tests/testthat/test-tox.R b/tests/testthat/test-tox.R
index e77bbb5..7ca4cbd 100644
--- a/tests/testthat/test-tox.R
+++ b/tests/testthat/test-tox.R
@@ -6,11 +6,13 @@ library(testthat)
Sys.sleep(5)
-col_names <- c("who_iarc_monographs", "pprtv", "ghs_dat", "iris", "ice",
- "comptox_cover_sheet", "comptox_main_data", "comptox_abstract_sifter",
- "comptox_synonym_identifier", "comptox_related_relationships",
- "comptox_toxcast_assays_ac50", "comptox_toxval_details",
- "comptox_chemical_properties")
+col_names <- c(
+ "who_iarc_monographs", "pprtv", "ghs_dat", "iris", "ice",
+ "comptox_cover_sheet", "comptox_main_data", "comptox_abstract_sifter",
+ "comptox_synonym_identifier", "comptox_related_relationships",
+ "comptox_toxcast_assays_ac50", "comptox_toxval_details",
+ "comptox_chemical_properties"
+)
test_that("extr_tox fetches data for CASRN 50-00-0 and warn", {
@@ -18,11 +20,10 @@ test_that("extr_tox fetches data for CASRN 50-00-0 and warn", {
skip_if_offline()
expect_no_warning({
- out <- extr_tox(casrn = c("50-00-0", "ciao"), verbose = FALSE)
+ out <- extr_tox(casrn = c("50-00-0", "ciao"), verbose = FALSE)
})
expect_true(is.list(out))
expect_true(all(unlist(lapply(out, is.data.frame))))
expect_equal(names(out), col_names)
})
-