| Title: | Utilities for Interacting with the 'CTX' APIs |
|---|---|
| Description: | Access chemical, hazard, bioactivity, and exposure data from the Computational Toxicology and Exposure ('CTX') APIs <https://www.epa.gov/comptox-tools/computational-toxicology-and-exposure-apis>. 'ctxR' was developed to streamline the process of accessing the information available through the 'CTX' APIs without requiring prior knowledge of how to use APIs. Most data is also available on the CompTox Chemical Dashboard ('CCD') <https://comptox.epa.gov/dashboard/> and other resources found at the EPA Computational Toxicology and Exposure Online Resources <https://www.epa.gov/comptox-tools>. |
| Authors: | Paul Kruse [aut] (ORCID: <https://orcid.org/0000-0001-5516-9717>), Caroline Ring [aut] (ORCID: <https://orcid.org/0000-0002-0463-1251>), Madison Feshuk [ctb, cre] (ORCID: <https://orcid.org/0000-0002-1390-6405>), Brianna Dirks [ctb] (ORCID: <https://orcid.org/0009-0003-3691-1543>), Carter Thunes [ctb], Jason Brown [ctb] (ORCID: <https://orcid.org/0009-0000-2294-641X>) |
| Maintainer: | Madison Feshuk <[email protected]> |
| License: | GPL (>= 3) |
| Version: | 1.1.3.9000 |
| Built: | 2026-05-18 10:30:19 UTC |
| Source: | https://github.com/usepa/ctxr |
A section of url used in Bioactivity API Endpoints
bioactivity_api_serverbioactivity_api_server
An object of class character of length 1.
Check API key
check_api_key(API_key = NULL, verbose = FALSE)check_api_key(API_key = NULL, verbose = FALSE)
API_key |
User input API key during function call. |
verbose |
A logical indicating if some “progress report” should be given. |
Either the API key (input during function call or loaded) or NULL (neither input during function call nor loaded).
Check existence by DTXSID
check_existence_by_dtxsid( DTXSID = NULL, API_key = NULL, Server = chemical_api_server, verbose = FALSE )check_existence_by_dtxsid( DTXSID = NULL, API_key = NULL, Server = chemical_api_server, verbose = FALSE )
DTXSID |
The chemical identifier DTXSID |
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating whether some "progress report" should be given. |
A data.table with information on whether the input DTXSID is valid, and where to find more information on the chemical when the DTXSID is valid.
# DTXSID for bpa bpa <- check_existence_by_dtxsid('DTXSID7020182') # False DTXSID false_res <- check_existence_by_Dtxsid('DTXSID7020182f')# DTXSID for bpa bpa <- check_existence_by_dtxsid('DTXSID7020182') # False DTXSID false_res <- check_existence_by_Dtxsid('DTXSID7020182f')
Check existence by DTXSID batch
check_existence_by_dtxsid_batch( DTXSID = NULL, API_key = NULL, rate_limit = 0L, Server = chemical_api_server, verbose = FALSE )check_existence_by_dtxsid_batch( DTXSID = NULL, API_key = NULL, rate_limit = 0L, Server = chemical_api_server, verbose = FALSE )
DTXSID |
The chemical identifier DTXSIDs |
API_key |
The user-specific API key |
rate_limit |
Number of seconds to wait between each request. |
Server |
The root address of the API endpoint |
verbose |
A logical indicating whether some "progress report" should be given. |
A data.table of information detailing valid and invalid DTXSIDs.
dtxsids <- c('DTXSID7020182F', 'DTXSID7020182', 'DTXSID0020232F') existence <- check_existence_by_dtxsid_batch(DTXSID = dtxsids)dtxsids <- c('DTXSID7020182F', 'DTXSID7020182', 'DTXSID0020232F') existence <- check_existence_by_dtxsid_batch(DTXSID = dtxsids)
A section of url used in Chemical API Endpoints
chemical_api_serverchemical_api_server
An object of class character of length 1.
Chemical contains
chemical_contains( word = NULL, API_key = NULL, Server = chemical_api_server, verbose = FALSE, top = NULL )chemical_contains( word = NULL, API_key = NULL, Server = chemical_api_server, verbose = FALSE, top = NULL )
word |
A character string of a chemical identifier or portion of a chemical identifier. Identifiers can be a chemical name, dtxsid, dtxcid, casrn, or inchikey. |
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some “progress report” should be given. |
top |
The number of results to return if there are multiple results available |
A data.frame of chemicals and related values matching the query parameters
Paul Kruse, Kristin Issacs
# Pull chemicals that contain substring substring_chemicals <- chemical_contains(word = 'TXSID702018')# Pull chemicals that contain substring substring_chemicals <- chemical_contains(word = 'TXSID702018')
Chemical contains batch search
chemical_contains_batch( word_list = NULL, API_key = NULL, rate_limit = 0L, verbose = FALSE, top = NULL )chemical_contains_batch( word_list = NULL, API_key = NULL, rate_limit = 0L, verbose = FALSE, top = NULL )
word_list |
A list of character strings of chemical names or portion of chemical names |
API_key |
User-specific API key |
rate_limit |
Number of seconds to wait between each request |
verbose |
A logical indicating if some “progress report” should be given. |
top |
The number of results to return if there are multiple results available |
A named list of data.frames of chemicals and related values matching the query parameters. The data.frames under the 'valid' entry contain chemical information for successful requests while the data.frames under the 'invalid' entry contain data.frames with chemical name suggestions based on the input search values.
Paul Kruse, Kristin Issacs
# Pull chemicals that contain substrings substring_chemicals <- chemical_contains_batch(word_list = c('TXDIS702018', 'DTXSID70201'))# Pull chemicals that contain substrings substring_chemicals <- chemical_contains_batch(word_list = c('TXDIS702018', 'DTXSID70201'))
Chemical equal
chemical_equal( word = NULL, API_key = NULL, Server = chemical_api_server, verbose = FALSE )chemical_equal( word = NULL, API_key = NULL, Server = chemical_api_server, verbose = FALSE )
word |
A character string of a chemical identifier or portion of a chemical identifier. Identifiers can be a chemical name, dtxsid, dtxcid, casrn, or inchikey. |
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some “progress report” should be given. |
A data.frame of chemicals and related values matching the query parameters
Paul Kruse, Kristin Issacs
# Pull chemicals with matching DTXSID bpa_dtxsid <- chemical_equal(word = 'DTXSID7020182')# Pull chemicals with matching DTXSID bpa_dtxsid <- chemical_equal(word = 'DTXSID7020182')
Chemical equal batch search
chemical_equal_batch( word_list = NULL, API_key = NULL, rate_limit = 0L, verbose = FALSE )chemical_equal_batch( word_list = NULL, API_key = NULL, rate_limit = 0L, verbose = FALSE )
word_list |
A list of character strings of chemical names or portion of chemical names, DTXSIDs, CASRNs, InChIKeys. |
API_key |
User-specific API key |
rate_limit |
Number of seconds to wait between each request |
verbose |
A logical indicating if some “progress report” should be given. |
A named list of data.tables of chemicals and related values matching the query parameters. The list contains two entries, 'valid' and 'invalid'; 'valid', contains a data.table of the results of the the searched chemical that were found in the databases; 'invalid' contains a data.table with 'suggestions' for each searched valued that did not return a chemical.
Paul Kruse, Kristin Issacs
# Pull chemicals that match input strings bpa <- chemical_equal_batch(word_list = c('DTXSID7020182', 'DTXCID30182'))# Pull chemicals that match input strings bpa <- chemical_equal_batch(word_list = c('DTXSID7020182', 'DTXCID30182'))
Chemical starts with
chemical_starts_with( word = NULL, API_key = NULL, Server = chemical_api_server, verbose = FALSE, top = NULL )chemical_starts_with( word = NULL, API_key = NULL, Server = chemical_api_server, verbose = FALSE, top = NULL )
word |
A character string of a chemical identifier or portion of a chemical identifier. Identifiers can be a chemical name, dtxsid, dtxcid, casrn, or inchikey. |
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some “progress report” should be given. |
top |
The number of results to return if there are multiple results available |
A data.frame of chemicals and related values matching the query parameters
Paul Kruse, Kristin Issacs
# Pull chemicals that start with a fragment DTXSID dtxsid_fragment <- chemical_starts_with(word = 'DTXSID702018')# Pull chemicals that start with a fragment DTXSID dtxsid_fragment <- chemical_starts_with(word = 'DTXSID702018')
Chemical starts with batch search
chemical_starts_with_batch( word_list = NULL, API_key = NULL, rate_limit = 0L, verbose = FALSE, top = NULL )chemical_starts_with_batch( word_list = NULL, API_key = NULL, rate_limit = 0L, verbose = FALSE, top = NULL )
word_list |
A list of character strings of chemical names or portion of chemical names |
API_key |
User-specific API key |
rate_limit |
Number of seconds to wait between each request |
verbose |
A logical indicating if some “progress report” should be given. |
top |
The number of results to return if there are multiple results available |
A named list of data.frames of chemicals and related values matching the query parameters. The data.frames under the 'valid' entry contain chemical information for successful requests while the data.frames under the 'invalid' entry contain data.frames with chemical name suggestions based on the input search values.
Paul Kruse, Kristin Issacs
# Pull chemicals that start with given substrings bpa_substrings <- chemical_starts_with_batch(word_list = c('DTXSID702018', 'DTXCID3018'))# Pull chemicals that start with given substrings bpa_substrings <- chemical_starts_with_batch(word_list = c('DTXSID702018', 'DTXCID3018'))
ctxR stores options as a named list in R's global options, i.e.
getOption('ctxR'). It currently stores two such options, one for CCTE
credentialing and one to suppress private API information in the URLs printed
to the screen when web queries are placed. For both of those, see
register_ctx_api_key().
set_ctxR_option(...) has_ctxR_options() has_ctxR_option(option)set_ctxR_option(...) has_ctxR_options() has_ctxR_option(option)
... |
a named listing of options to set |
option |
a specific option to query, e.g. |
set_ctxR_option() does not have a return value but has the side effect
of setting options used by other functions.
has_ctxR_option() returns a Boolean.
has_ctxR_options() returns a Boolean.
# Set ctxR options set_ctxR_option('display_api_key' = FALSE) # Check if there are options registered to 'ctxR' has_ctxR_options() # Check if a specific option is registered for 'ctxR' has_ctxR_option('display_api_key')# Set ctxR options set_ctxR_option('display_api_key' = FALSE) # Check if there are options registered to 'ctxR' has_ctxR_options() # Check if a specific option is registered for 'ctxR' has_ctxR_option('display_api_key')
A section of url used in Exposure API Endpoints
exposure_api_serverexposure_api_server
An object of class character of length 1.
Get aggregate records by DTXSID
get_aggregate_records_by_dtxsid( DTXSID = NULL, API_key = NULL, Server = "https://comptox.epa.gov/ctx-api/exposure", verbose = FALSE )get_aggregate_records_by_dtxsid( DTXSID = NULL, API_key = NULL, Server = "https://comptox.epa.gov/ctx-api/exposure", verbose = FALSE )
DTXSID |
The chemical identifier DTXSID |
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some "progress report" should be given. |
A data.frame of aggregate record data by DTXSID.
#Pull aggregate records for BPA by DTXSID bpa_agg_records <- get_aggregate_records_by_dtxsid(DTXSID = 'DTXSID7020182')#Pull aggregate records for BPA by DTXSID bpa_agg_records <- get_aggregate_records_by_dtxsid(DTXSID = 'DTXSID7020182')
Get Aggregate Records by DTXSID via batch
get_aggregate_records_by_dtxsid_batch( DTXSID = NULL, API_key = NULL, rate_limit = 0L, Server = "https://comptox.epa.gov/ctx-api/exposure", verbose = FALSE )get_aggregate_records_by_dtxsid_batch( DTXSID = NULL, API_key = NULL, rate_limit = 0L, Server = "https://comptox.epa.gov/ctx-api/exposure", verbose = FALSE )
DTXSID |
Chemical identifier DTXSID |
API_key |
The user-specific API key |
rate_limit |
Number of seconds to wait between each request |
Server |
The root address for the API endpoint |
verbose |
A logicial indicating if some "progress report" should be given. |
A list of data.frames containing aggregate records data for each input DTXSID.
# Retrieve aggregate records data for BPA and Caffeine get_aggregate_records_by_dtxsid_batch(DTXSID = c('DTXSID0020232', 'DTXSID7020182'))# Retrieve aggregate records data for BPA and Caffeine get_aggregate_records_by_dtxsid_batch(DTXSID = c('DTXSID0020232', 'DTXSID7020182'))
Get aggregate records by medium
get_aggregate_records_by_medium( Medium = NULL, API_key = NULL, Server = "https://comptox.epa.gov/ctx-api/exposure", pageNumber = 1, verbose = FALSE )get_aggregate_records_by_medium( Medium = NULL, API_key = NULL, Server = "https://comptox.epa.gov/ctx-api/exposure", pageNumber = 1, verbose = FALSE )
Medium |
The mmdb medium of exposure. |
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
pageNumber |
Parameter for how to return data records. |
verbose |
A logical indicating if some "progress report" should be given. |
A list of search parameters and data of aggregate record data by medium.
#Pull aggregate records for BPA by medium bpa_agg_records <- get_aggregate_records_by_medium(Medium = 'surface water')#Pull aggregate records for BPA by medium bpa_agg_records <- get_aggregate_records_by_medium(Medium = 'surface water')
Get Aggregate Records by medium via batch
get_aggregate_records_by_medium_batch( Medium = NULL, API_key = NULL, rate_limit = 0L, Server = "https://comptox.epa.gov/ctx-api/exposure", verbose = FALSE )get_aggregate_records_by_medium_batch( Medium = NULL, API_key = NULL, rate_limit = 0L, Server = "https://comptox.epa.gov/ctx-api/exposure", verbose = FALSE )
Medium |
The MMDB medium of exposure |
API_key |
The user-specific API key |
rate_limit |
Number of seconds to wait between each request |
Server |
The root address for the API endpoint |
verbose |
A logicial indicating if some "progress report" should be given. |
A list of data.frames containing aggregate records data for each input medium.
# Retrieve aggregate records data for 'surface water' and 'soil' get_aggregate_records_by_medium_batch(Medium = c('surface water', 'soil'))# Retrieve aggregate records data for 'surface water' and 'soil' get_aggregate_records_by_medium_batch(Medium = c('surface water', 'soil'))
Retrieve all assays
get_all_assays( API_key = NULL, Server = bioactivity_api_server, verbose = FALSE )get_all_assays( API_key = NULL, Server = bioactivity_api_server, verbose = FALSE )
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some “progress report” should be given. |
A data.frame containing all the assays and associated information
# Retrieve all assays assays <- get_all_assays()# Retrieve all assays assays <- get_all_assays()
Get all list types
get_all_list_types( API_key = NULL, Server = chemical_api_server, verbose = FALSE )get_all_list_types( API_key = NULL, Server = chemical_api_server, verbose = FALSE )
API_key |
The user-specific API key. |
Server |
The root address for the API endpoint. |
verbose |
A logical indicating if some "progress report" should be given. |
A character list of types of lists.
get_all_list_types()get_all_list_types()
Get all public chemical lists
get_all_public_chemical_lists( Projection = "", API_key = NULL, Server = chemical_api_server, verbose = FALSE )get_all_public_chemical_lists( Projection = "", API_key = NULL, Server = chemical_api_server, verbose = FALSE )
Projection |
Optional parameter controlling return type. It takes values chemicallistall' and 'chemicallistname' with the former as the default value. |
API_key |
The user-specific api key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some “progress report” should be given. |
A data.frame containing information on all public chemical lists available from the CTX chemical api.
# Pull all chemical lists all_lists <- get_all_public_chemical_lists()# Pull all chemical lists all_lists <- get_all_public_chemical_lists()
Retrieve annotations for AEID
get_annotation_by_aeid( AEID = NULL, API_key = NULL, Server = bioactivity_api_server, verbose = FALSE )get_annotation_by_aeid( AEID = NULL, API_key = NULL, Server = bioactivity_api_server, verbose = FALSE )
AEID |
The assay endpoint identifier AEID |
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some “progress report” should be given. |
A data.frame containing the annotated assays corresponding to the input AEID parameter
# Retrieve annotation for an assay annotation <- get_annotation_by_aeid(AEID = 159)# Retrieve annotation for an assay annotation <- get_annotation_by_aeid(AEID = 159)
Retrieve annotations for AEID batch
get_annotation_by_aeid_batch( AEID = NULL, API_key = NULL, Server = NULL, rate_limit = 0L, verbose = FALSE )get_annotation_by_aeid_batch( AEID = NULL, API_key = NULL, Server = NULL, rate_limit = 0L, verbose = FALSE )
AEID |
A list of AEID identifiers |
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
rate_limit |
Number of seconds to wait between each request |
verbose |
A logical indicating if some “progress report” should be given. |
A named list of data.frames containing annotation information for the assays with AEID matching the input parameter.
# Get annotations for multiple aeids aeid_annotations <- get_annotation_by_aeid_batch(AEID = c(159, 160))# Get annotations for multiple aeids aeid_annotations <- get_annotation_by_aeid_batch(AEID = c(159, 160))
Retrieve bioactivity data from DTXSID, AEID, SPID, or m4id
get_bioactivity_details( DTXSID = NULL, AEID = NULL, SPID = NULL, m4id = NULL, API_key = NULL, Server = bioactivity_api_server, verbose = FALSE )get_bioactivity_details( DTXSID = NULL, AEID = NULL, SPID = NULL, m4id = NULL, API_key = NULL, Server = bioactivity_api_server, verbose = FALSE )
DTXSID |
The chemical identifier DTXSID |
AEID |
The assay endpoint identifier AEID |
SPID |
The ChemSpider chemical input |
m4id |
The chemical identifier m4id |
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some “progress report” should be given. |
A data.frame containing bioactivity information for the chemical or assay endpoint with identifier matching the input parameter.
# Pull BPA bioactivity details bpa <- get_bioactivity_details(DTXSID = 'DTXSID7020182') # Pull assay bioactivity details assay <- get_bioactivity_details(AEID = 159)# Pull BPA bioactivity details bpa <- get_bioactivity_details(DTXSID = 'DTXSID7020182') # Pull assay bioactivity details assay <- get_bioactivity_details(AEID = 159)
Retrieve bioactivity data from DTXSID or AEID batch
get_bioactivity_details_batch( DTXSID = NULL, AEID = NULL, SPID = NULL, m4id = NULL, API_key = NULL, Server = NULL, rate_limit = 0L, verbose = FALSE )get_bioactivity_details_batch( DTXSID = NULL, AEID = NULL, SPID = NULL, m4id = NULL, API_key = NULL, Server = NULL, rate_limit = 0L, verbose = FALSE )
DTXSID |
A list of chemical identifier DTXSIDs. |
AEID |
A list of assay endpoint identifiers AEIDs. |
SPID |
A list of ChemSpider chemical inputs |
m4id |
A list of chemical identifier m4ids |
API_key |
The user-specific API key. |
Server |
The root address for the API endpoint |
rate_limit |
Number of seconds to wait between each request |
verbose |
A logical indicating if some “progress report” should be given. |
A named list of data.frames containing bioactivity information for the chemicals with DTXSID or assays with AEID matching the input parameter.
# Pull bioactivity details for multiple chemicals dtxsid <- c('DTXSID7020182', 'DTXSID2021315') batch_bioactivity <- get_bioactivity_details_batch(DTXSID = dtxsid) # Pull bioactivity details for multiple assays batch_bioactivity <- get_bioactivity_details_batch(AEID = c(159, 160))# Pull bioactivity details for multiple chemicals dtxsid <- c('DTXSID7020182', 'DTXSID2021315') batch_bioactivity <- get_bioactivity_details_batch(DTXSID = dtxsid) # Pull bioactivity details for multiple assays batch_bioactivity <- get_bioactivity_details_batch(AEID = c(159, 160))
Bioactivity API Endpoint status
get_bioactivity_endpoint_status()get_bioactivity_endpoint_status()
Status of Bioactivity API Endpoints
status <- get_bioactivity_endpoint_status() print(status)status <- get_bioactivity_endpoint_status() print(status)
Retrieve bioactivity summary for AEID
get_bioactivity_summary( AEID = NULL, API_key = NULL, Server = bioactivity_api_server, verbose = FALSE )get_bioactivity_summary( AEID = NULL, API_key = NULL, Server = bioactivity_api_server, verbose = FALSE )
AEID |
The assay endpoint indentifier AEID |
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some “progress report” should be given. |
A data.frame containing summary information corresponding to the input AEID
# Pull an assay bioactivity summary aeid_1386 <- get_bioactivity_summary(AEID = 1386)# Pull an assay bioactivity summary aeid_1386 <- get_bioactivity_summary(AEID = 1386)
Retrieve bioactivity summary data from AEID batch
get_bioactivity_summary_batch( AEID = NULL, API_key = NULL, Server = NULL, rate_limit = 0L, verbose = FALSE )get_bioactivity_summary_batch( AEID = NULL, API_key = NULL, Server = NULL, rate_limit = 0L, verbose = FALSE )
AEID |
A list of AEID identifiers |
API_key |
The user-specific API key. |
Server |
The root address for the API endpoint |
rate_limit |
Number of seconds to wait between each request |
verbose |
A logical indicating if some “progress report” should be given. |
A named list of data.frames containing bioactivity summary information for the assays with AEID matching the input parameter.
# Get bioactivity summary for multiple aeids aeids <- get_bioactivity_summary_batch(AEID = c(159, 160))# Get bioactivity summary for multiple aeids aeids <- get_bioactivity_summary_batch(AEID = c(159, 160))
Get Biomonitoring data
get_biomonitoring_data( DTXSID = NULL, API_key = NULL, Projection = "", Server = "https://comptox.epa.gov/ctx-api/exposure", verbose = FALSE )get_biomonitoring_data( DTXSID = NULL, API_key = NULL, Projection = "", Server = "https://comptox.epa.gov/ctx-api/exposure", verbose = FALSE )
DTXSID |
The chemical identifier DTXSID |
API_key |
The user-specific API key |
Projection |
Optional parameter controlling return type. |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some "progress report" should be given. |
A data.frame containing general use keywords.
# Get biomonitoring data for Caffeine get_biomonitoring_data('DTXSID0020232')# Get biomonitoring data for Caffeine get_biomonitoring_data('DTXSID0020232')
Get biomonitoring data via batch
get_biomonitoring_data_batch( DTXSID = NULL, API_key = NULL, Projection = "", rate_limit = 0L, Server = "https://comptox.epa.gov/ctx-api/exposure", verbose = FALSE )get_biomonitoring_data_batch( DTXSID = NULL, API_key = NULL, Projection = "", rate_limit = 0L, Server = "https://comptox.epa.gov/ctx-api/exposure", verbose = FALSE )
DTXSID |
Chemical identifier DTXSID |
API_key |
The user-specific API key |
Projection |
Optional parameter controlling return type. |
rate_limit |
Number of seconds to wait between requests |
Server |
The root address for the API endpoint. |
verbose |
A logical indicating if some "progress report" should be given. |
A list of data.frames of biomonitoring data corresponding to the input DTXSIDs.
# Retrieve biomonitoring data for BPA and Caffeine get_biomonitoring_data_batch(DTXSID = c('DTXSID7020182', 'DTXSID0020232'))# Retrieve biomonitoring data for BPA and Caffeine get_biomonitoring_data_batch(DTXSID = c('DTXSID7020182', 'DTXSID0020232'))
Get cancer hazard
get_cancer_hazard( DTXSID = NULL, API_key = NULL, Server = hazard_api_server, verbose = FALSE )get_cancer_hazard( DTXSID = NULL, API_key = NULL, Server = hazard_api_server, verbose = FALSE )
DTXSID |
The chemical identifier DTXSID |
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some “progress report” should be given. |
A data.frame of cancer hazard data related to the input DTXSID.
# Pull cancer hazard data for BPA bpa_cancer <- get_cancer_hazard(DTXSID = 'DTXSID7020182')# Pull cancer hazard data for BPA bpa_cancer <- get_cancer_hazard(DTXSID = 'DTXSID7020182')
Get cancer hazard batch
get_cancer_hazard_batch( DTXSID = NULL, API_key = NULL, rate_limit = 0L, Server = hazard_api_server, verbose = FALSE )get_cancer_hazard_batch( DTXSID = NULL, API_key = NULL, rate_limit = 0L, Server = hazard_api_server, verbose = FALSE )
DTXSID |
The chemical identifier DTXSIDs |
API_key |
The user-specific API key. |
rate_limit |
Number of seconds to wait between requests |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some “progress report” should be given. |
A data.table containing cancer hazard and related data for each input DTXSID.
# Pull cancer hazard data for multiples chemicals dtxsid <- c('DTXSID7020182', 'DTXSID2021315') dtxsid_cancer_hazard <- get_cancer_hazard_batch(DTXSID = dtxsid)# Pull cancer hazard data for multiples chemicals dtxsid <- c('DTXSID7020182', 'DTXSID2021315') dtxsid_cancer_hazard <- get_cancer_hazard_batch(DTXSID = dtxsid)
Retrieve chemical information
get_chem_info( DTXSID = NULL, type = "", API_key = NULL, Server = chemical_api_server, verbose = FALSE )get_chem_info( DTXSID = NULL, type = "", API_key = NULL, Server = chemical_api_server, verbose = FALSE )
DTXSID |
The chemical identifier DTXSID |
type |
This specifies whether to only grab predicted or experimental results. If not specified, it will grab all details. The allowable input values are "predicted" or "experimental". |
API_key |
The user-specific API Key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some “progress report” should be given. |
A data.frame containing chemical information for the chemical with DTXSID matching the input parameter.
# Pull chemical information for BPA bpa <- get_chem_info(DTXSID = 'DTXSID7020182')# Pull chemical information for BPA bpa <- get_chem_info(DTXSID = 'DTXSID7020182')
Retrieve chemical information in batch search
get_chem_info_batch( DTXSID = NULL, type = "", API_key = NULL, rate_limit = 0L, Server = chemical_api_server, verbose = FALSE )get_chem_info_batch( DTXSID = NULL, type = "", API_key = NULL, rate_limit = 0L, Server = chemical_api_server, verbose = FALSE )
DTXSID |
A vector of chemical identifier DTXSIDs |
type |
A vector of type used in get_chem_info(). This specifies whether to only grab predicted or experimental results. If not specified, it will grab all details. The allowable input values are "", predicted", or "experimental". |
API_key |
The user-specific API key. |
rate_limit |
Number of seconds to wait between each request |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some “progress report” should be given. |
A data.table containing chemical information for the chemicals with DTXSID matching the input parameter.
# Pull chemical info for multiple chemicals chem_info <- get_chem_info_batch(DTXSID = c('DTXSID7020182', 'DTXSID2021315'))# Pull chemical info for multiple chemicals chem_info <- get_chem_info_batch(DTXSID = c('DTXSID7020182', 'DTXSID2021315'))
Get experimental physical-chemical property data
get_chem_props_exp( DTXSID = NULL, API_key = NULL, Server = chemical_api_server, verbose = FALSE )get_chem_props_exp( DTXSID = NULL, API_key = NULL, Server = chemical_api_server, verbose = FALSE )
DTXSID |
The chemical identifier DTXSID |
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some "progress report" should be given. |
A data.frame of experimental physchem property data
# Get experimental physchem properties for BPA bpa_exp_props <- get_chem_props_exp(DTXSID = 'DTXSID7020182')# Get experimental physchem properties for BPA bpa_exp_props <- get_chem_props_exp(DTXSID = 'DTXSID7020182')
Get experimental physical-chemical property data via batch
get_chem_props_exp_batch( DTXSID = NULL, API_key = NULL, rate_limit = 0L, Server = chemical_api_server, verbose = FALSE )get_chem_props_exp_batch( DTXSID = NULL, API_key = NULL, rate_limit = 0L, Server = chemical_api_server, verbose = FALSE )
DTXSID |
The chemical identifier DTXSID |
API_key |
The user-specific API key |
rate_limit |
Number of seconds to wait between each request |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some "progress report" should be given. |
A data.table of experimental physchem property data
# Get experimental physchem properties for BPA and Caffeine chem_props_exp <- get_chem_props_exp(DTXSID = c('DTXSID7020182', 'DTXSID0020232'))# Get experimental physchem properties for BPA and Caffeine chem_props_exp <- get_chem_props_exp(DTXSID = c('DTXSID7020182', 'DTXSID0020232'))
Get predicted physical-chemical property data
get_chem_props_pred( DTXSID = NULL, API_key = NULL, Server = chemical_api_server, verbose = FALSE )get_chem_props_pred( DTXSID = NULL, API_key = NULL, Server = chemical_api_server, verbose = FALSE )
DTXSID |
The chemical identifier DTXSID |
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some "progress report" should be given. |
A data.frame of predicted physchem property data
# Get predicted physchem properties for BPA bpa_pred_props <- get_chem_props_pred(DTXSID = 'DTXSID7020182')# Get predicted physchem properties for BPA bpa_pred_props <- get_chem_props_pred(DTXSID = 'DTXSID7020182')
Get predicted physical-chemical property data via batch
get_chem_props_pred_batch( DTXSID = NULL, API_key = NULL, rate_limit = 0L, Server = chemical_api_server, verbose = FALSE )get_chem_props_pred_batch( DTXSID = NULL, API_key = NULL, rate_limit = 0L, Server = chemical_api_server, verbose = FALSE )
DTXSID |
The chemical identifier DTXSID |
API_key |
The user-specific API key |
rate_limit |
Number of seconds to wait between each request |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some "progress report" should be given. |
A data.table of predicted physchem property data
# Get predicted physchem properties for BPA and Caffeine chem_props_pred <- get_chem_props_pred(DTXSID = c('DTXSID7020182', 'DTXSID0020232'))# Get predicted physchem properties for BPA and Caffeine chem_props_pred <- get_chem_props_pred(DTXSID = c('DTXSID7020182', 'DTXSID0020232'))
Get Summary information on chemical properties
get_chem_props_summary( DTXSID = NULL, API_key = NULL, Server = chemical_api_server, verbose = FALSE )get_chem_props_summary( DTXSID = NULL, API_key = NULL, Server = chemical_api_server, verbose = FALSE )
DTXSID |
The chemical identifier DTXSID. |
API_key |
The user-specific API key. |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some "progress report" should be given. |
A data.frame of summary data for chemical properties.
# Get summary data for BPA bpa_props_summary <- get_chem_props_summary(DTXSID = 'DTXSID7020182')# Get summary data for BPA bpa_props_summary <- get_chem_props_summary(DTXSID = 'DTXSID7020182')
Get chemicals by property and its value range
get_chemical_by_property_range( start = NULL, end = NULL, property = NULL, API_key = NULL, Server = chemical_api_server, verbose = FALSE )get_chemical_by_property_range( start = NULL, end = NULL, property = NULL, API_key = NULL, Server = chemical_api_server, verbose = FALSE )
start |
A numeric value, the beginning of the range |
end |
A numeric value, the end of the range |
property |
A string, the property in question |
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some “progress report” should be given. |
A data.frame containing chemical information for chemicals matching the search criteria.
# Pull chemicals with a given property in a set range density <- get_chemical_by_property_range(start = 1.311, end = 1.313, property = 'Density')# Pull chemicals with a given property in a set range density <- get_chemical_by_property_range(start = 1.311, end = 1.313, property = 'Density')
Retrieve chemicals by property and value range in batch search
get_chemical_by_property_range_batch( start_list = NULL, end_list = NULL, property_list = NULL, API_key = NULL, rate_limit = 0L, verbose = FALSE )get_chemical_by_property_range_batch( start_list = NULL, end_list = NULL, property_list = NULL, API_key = NULL, rate_limit = 0L, verbose = FALSE )
start_list |
Numeric values, the beginning of the range |
end_list |
Numeric values, the end of the range |
property_list |
Strings, the properties being queried |
API_key |
The user-specific API key |
rate_limit |
Number of seconds to wait between each request |
verbose |
A logical indicating if some “progress report” should be given. |
A named list of data.frames containing chemical information for the chemicals matching the search criteria.
# Pull chemicals by property ranges prop_ranges <- get_chemical_by_property_range_batch(start_list = c(1.311, 211.99), end_list = c(1.313, 212.01), property_list = c('Density', 'Boiling Point'))# Pull chemicals by property ranges prop_ranges <- get_chemical_by_property_range_batch(start_list = c(1.311, 211.99), end_list = c(1.313, 212.01), property_list = c('Density', 'Boiling Point'))
Retrieve chemical details from DTXSID of DTXCID
get_chemical_details( DTXSID = NULL, DTXCID = NULL, Projection = "chemicaldetailstandard", API_key = NULL, Server = chemical_api_server, verbose = FALSE )get_chemical_details( DTXSID = NULL, DTXCID = NULL, Projection = "chemicaldetailstandard", API_key = NULL, Server = chemical_api_server, verbose = FALSE )
DTXSID |
The chemical identifier DTXSID |
DTXCID |
The chemical identifier DTXCID |
Projection |
The format and chemical detail data returned. Allowed values are 'chemicaldetailall', 'chemicaldetailstandard', 'chemicalidentifier', 'chemicalstructure', 'ntatoolkit', 'ccdchemicaldetails', 'compact'. If left empty or there is a mismatch, the default format will be 'chemicaldetailstandard'. |
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some “progress report” should be given. |
A data.table containing chemical information for the chemical with DTXSID matching the input parameter.
# Pull chemical details for BPA bpa <- get_chemical_details(DTXSID = 'DTXSID7020182')# Pull chemical details for BPA bpa <- get_chemical_details(DTXSID = 'DTXSID7020182')
Retrieve chemical details from DTXSID of DTXCID in batch search
get_chemical_details_batch( DTXSID = NULL, DTXCID = NULL, Projection = "chemicaldetailstandard", API_key = NULL, rate_limit = 0L, verbose = FALSE )get_chemical_details_batch( DTXSID = NULL, DTXCID = NULL, Projection = "chemicaldetailstandard", API_key = NULL, rate_limit = 0L, verbose = FALSE )
DTXSID |
The chemical identifier DTXSID |
DTXCID |
The chemical identifier DTXCID |
Projection |
The format and chemical detail data returned. Allowed values are 'chemicaldetailall', 'chemicaldetailstandard', chemicalidentifier', 'chemicalstructure', 'ntatoolkit', ccdchemicaldetails', 'compact'. If left empty or there is a mismatch, the default format will be 'chemicaldetailstandard'. |
API_key |
The user-specific API key |
rate_limit |
Number of seconds to wait between each request |
verbose |
A logical indicating if some “progress report” should be given. |
A data.table (DTXSID) or a named list of data.tables (DTXCID) containing chemical information for the chemicals with DTXSID or DTXCID matching the input parameter.
# Pull chemical details for multiple chemicals by dtxsid dtxsids <- c('DTXSID7020182', 'DTXSID2021315') dtxsid_details <- get_chemical_details_batch(DTXSID = dtxsid) # Pull chemical details for multiple chemicals by dtxcid dtxcids <- c('DTXCID30182', 'DTXCID001315') dtxcid_details <- get_chemical_details_batch(DTXCID = dtxcids)# Pull chemical details for multiple chemicals by dtxsid dtxsids <- c('DTXSID7020182', 'DTXSID2021315') dtxsid_details <- get_chemical_details_batch(DTXSID = dtxsid) # Pull chemical details for multiple chemicals by dtxcid dtxcids <- c('DTXCID30182', 'DTXCID001315') dtxcid_details <- get_chemical_details_batch(DTXCID = dtxcids)
Chemical API Endpoint status
get_chemical_endpoint_status()get_chemical_endpoint_status()
Status of Chemical API Endpoints
status <- get_chemical_endpoint_status() print(status)status <- get_chemical_endpoint_status() print(status)
Get image file by DTXSID or DTXCID
get_chemical_image( DTXSID = NULL, DTXCID = NULL, gsid = NULL, SMILES = NULL, format = "", API_key = NULL, Server = chemical_api_server, verbose = FALSE )get_chemical_image( DTXSID = NULL, DTXCID = NULL, gsid = NULL, SMILES = NULL, format = "", API_key = NULL, Server = chemical_api_server, verbose = FALSE )
DTXSID |
Chemical identifier DTXSID |
DTXCID |
Chemical identifier DTXCID |
gsid |
DSSTox Generic Substance Identifier |
SMILES |
Chemical identifier SMILES |
format |
The image type, either "png" or "svg". If left blank, will default to "png". |
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some “progress report” should be given. |
A Large array of three dimensions representing an image. For
displaying this, one may use png::writePNG() or
countcolors::plotArrayAsImage() among many such functions.
# Pull chemical image for BPA by dtxsid bpa_image_matrix <- get_chemical_image(DTXSID = 'DTXSID7020182') if (requireNamespace("countcolors", quietly = TRUE)){ countcolors::plotArrayAsImage(bpa_image_matrix) } # Pull chemical image for BPA by dtxcid bpa_image_matrix <- get_chemical_image(DTXCID = 'DTXCID30182') if (requireNamespace("countcolors", quietly = TRUE)){ countcolors::plotArrayAsImage(bpa_image_matrix) }# Pull chemical image for BPA by dtxsid bpa_image_matrix <- get_chemical_image(DTXSID = 'DTXSID7020182') if (requireNamespace("countcolors", quietly = TRUE)){ countcolors::plotArrayAsImage(bpa_image_matrix) } # Pull chemical image for BPA by dtxcid bpa_image_matrix <- get_chemical_image(DTXCID = 'DTXCID30182') if (requireNamespace("countcolors", quietly = TRUE)){ countcolors::plotArrayAsImage(bpa_image_matrix) }
Get image file by DTXSID or DTXCID batch
get_chemical_image_batch( DTXSID = NULL, DTXCID = NULL, SMILES = NULL, format = "", API_key = NULL, rate_limit = 0L, verbose = FALSE )get_chemical_image_batch( DTXSID = NULL, DTXCID = NULL, SMILES = NULL, format = "", API_key = NULL, rate_limit = 0L, verbose = FALSE )
DTXSID |
A list of chemical identifier DTXSIDs. |
DTXCID |
A list of chemical identifier DTXCIDs. |
SMILES |
A list of chemical identifier SMILES. |
format |
The image type, either "png" or "svg". If left blank, will default to "png". |
API_key |
The user-specific API key. |
rate_limit |
Number of seconds to wait between each request |
verbose |
A logical indicating if some “progress report” should be given. |
A named list of Large arrays of three dimensions representing an image. For
displaying an image, one may use png::writePNG() or
countcolors::plotArrayAsImage() among many such functions.
# Pull images for multiple chemicals dtxsid <- c('DTXSID7020182', 'DTXSID2021315') images <- get_chemical_image_batch(DTXSID = dtxsid) if (requireNamespace("countcolors", quietly = TRUE)){ countcolors::plotArrayAsImage(images[[1]]) countcolors::plotArrayAsImage(images[[2]]) }# Pull images for multiple chemicals dtxsid <- c('DTXSID7020182', 'DTXSID2021315') images <- get_chemical_image_batch(DTXSID = dtxsid) if (requireNamespace("countcolors", quietly = TRUE)){ countcolors::plotArrayAsImage(images[[1]]) countcolors::plotArrayAsImage(images[[2]]) }
Get chemical lists by type
get_chemical_lists_by_type( type = NULL, Projection = "", API_key = NULL, Server = chemical_api_server, verbose = FALSE )get_chemical_lists_by_type( type = NULL, Projection = "", API_key = NULL, Server = chemical_api_server, verbose = FALSE )
type |
The type of list. This is a case sensitive parameter and returns lists only for values of "federal", "international", "state", and "other". |
Projection |
Optional parameter controlling return type. It takes values 'chemicallistall' and 'chemicallistname' with the former as the default value. |
API_key |
The user-specified API key. |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some “progress report” should be given. |
A data.frame containing information about lists that meet the search criteria.
# Pull chemical lists by type federal <- get_chemical_lists_by_type(type = 'Federal')# Pull chemical lists by type federal <- get_chemical_lists_by_type(type = 'Federal')
Get chemical lists by type batch search
get_chemical_lists_by_type_batch( type_list = NULL, Projection = "", API_key = NULL, rate_limit = 0L, verbose = FALSE )get_chemical_lists_by_type_batch( type_list = NULL, Projection = "", API_key = NULL, rate_limit = 0L, verbose = FALSE )
type_list |
A list of list types. This is a case sensitive parameter and returns lists only for values of "federal", "international", "state", and "other". |
Projection |
Optional parameter controlling return type. It takes values 'chemicallistall' and 'chemicallistname' with the former as the default value. |
API_key |
The user-specified API key. |
rate_limit |
Number of seconds to wait between each request |
verbose |
A logical indicating if some “progress report” should be given. |
A named list of data.frames containing information about lists that meet the search criteria.
# Pull chemical lists by type federal_state <- get_chemical_lists_by_type_batch(type_list = c('federal', 'state'))# Pull chemical lists by type federal_state <- get_chemical_lists_by_type_batch(type_list = c('federal', 'state'))
Get mol file by DTXSID or DTXCID
get_chemical_mol( DTXSID = NULL, DTXCID = NULL, API_key = NULL, Server = chemical_api_server, verbose = FALSE )get_chemical_mol( DTXSID = NULL, DTXCID = NULL, API_key = NULL, Server = chemical_api_server, verbose = FALSE )
DTXSID |
Chemical identifier DTXSID |
DTXCID |
Chemical identifier DTXCID |
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some “progress report” should be given. |
A character string giving a mol file representation
# Pull mol file for BPA by dtxsid bpa_mol <- get_chemical_mol(DTXSID = 'DTXSID7020182') # Pull mol file for BPA by dtxcid bpa_mol <- get_chemical_mol(DTXCID = 'DTXCID30182')# Pull mol file for BPA by dtxsid bpa_mol <- get_chemical_mol(DTXSID = 'DTXSID7020182') # Pull mol file for BPA by dtxcid bpa_mol <- get_chemical_mol(DTXCID = 'DTXCID30182')
Get mol file by DTXSID or DTXCID batch
get_chemical_mol_batch( DTXSID = NULL, DTXCID = NULL, API_key = NULL, rate_limit = 0L, verbose = FALSE )get_chemical_mol_batch( DTXSID = NULL, DTXCID = NULL, API_key = NULL, rate_limit = 0L, verbose = FALSE )
DTXSID |
A list of the chemical identifier DTXSIDs. |
DTXCID |
A list of the chemical identifier DTXCIDs. |
API_key |
The user-specific API key. |
rate_limit |
Number of seconds to wait between each request |
verbose |
A logical indicating if some “progress report” should be given. |
A named list of character strings giving a mol file representations of the given input chemicals.
# Pull mol files for multiple chemicals by DTXSID dtxsid <- c('DTXSID7020182', 'DTXSID2021315') mol_files <- get_chemical_mol_batch(DTXSID = dtxsid) # Pull mol files for multiple chemicals by DTXCID dtxcid <- c('DTXCID30182', 'DTXCID001315') mol_files <- get_chemical_mol_batch(DTXCID = dtxcid)# Pull mol files for multiple chemicals by DTXSID dtxsid <- c('DTXSID7020182', 'DTXSID2021315') mol_files <- get_chemical_mol_batch(DTXSID = dtxsid) # Pull mol files for multiple chemicals by DTXCID dtxcid <- c('DTXCID30182', 'DTXCID001315') mol_files <- get_chemical_mol_batch(DTXCID = dtxcid)
Get mrv file by DTXSID or DTXCID
get_chemical_mrv( DTXSID = NULL, DTXCID = NULL, API_key = NULL, Server = chemical_api_server, verbose = FALSE )get_chemical_mrv( DTXSID = NULL, DTXCID = NULL, API_key = NULL, Server = chemical_api_server, verbose = FALSE )
DTXSID |
The chemical identifier DTXSID |
DTXCID |
The chemical identifier DTXCID |
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some “progress report” should be given. |
XML file format for representing a mrv file.
# Pull mrv file for BPA by dtxsid bpa_mrv <- get_chemical_mrv(DTXSID = 'DTXSID7020182') # Pull mrv file for BPA by dtxcid bpa_mrv <- getchemical_mrv(DTXCID = 'DTXCID30182')# Pull mrv file for BPA by dtxsid bpa_mrv <- get_chemical_mrv(DTXSID = 'DTXSID7020182') # Pull mrv file for BPA by dtxcid bpa_mrv <- getchemical_mrv(DTXCID = 'DTXCID30182')
Ger mrv file by DTXSID or DTXCID batch
get_chemical_mrv_batch( DTXSID = NULL, DTXCID = NULL, API_key = NULL, rate_limit = 0L, verbose = FALSE )get_chemical_mrv_batch( DTXSID = NULL, DTXCID = NULL, API_key = NULL, rate_limit = 0L, verbose = FALSE )
DTXSID |
A list of the chemical identifier DTXSIDs. |
DTXCID |
A list of the chemical identifier DTXCIDs. |
API_key |
The user-specific API key. |
rate_limit |
Number of seconds to wait between each request |
verbose |
A logical indicating if some “progress report” should be given. |
A named list of XML file format for representing a mrv file for each chemicals.
# Pull mrv files for multiple chemicals by DTXSID dtxsid <- c('DTXSID7020182', 'DTXSID2021315') mrv_files <- get_chemical_mrv_batch(DTXSID = dtxsid) # Pull mrv files for multiple chemicals by DTXCID dtxcid <- c('DTXCID30182', 'DTXCID001315') mrv_files <- get_chemical_mrv_batch(DTXCID = dtxcid)# Pull mrv files for multiple chemicals by DTXSID dtxsid <- c('DTXSID7020182', 'DTXSID2021315') mrv_files <- get_chemical_mrv_batch(DTXSID = dtxsid) # Pull mrv files for multiple chemicals by DTXCID dtxcid <- c('DTXCID30182', 'DTXCID001315') mrv_files <- get_chemical_mrv_batch(DTXCID = dtxcid)
Get chemical synonym
get_chemical_synonym( DTXSID = NULL, API_key = NULL, Server = chemical_api_server, verbose = FALSE )get_chemical_synonym( DTXSID = NULL, API_key = NULL, Server = chemical_api_server, verbose = FALSE )
DTXSID |
The chemical identifier DTXSID |
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some “progress report” should be given. |
A named list of synonym information for the input DTXSID
# Pull synonyms for BPA bpa_synonym <- get_chemical_synonym(DTXSID = 'DTXSID7020182')# Pull synonyms for BPA bpa_synonym <- get_chemical_synonym(DTXSID = 'DTXSID7020182')
Get chemical synonym batch
get_chemical_synonym_batch( DTXSID = NULL, API_key = NULL, rate_limit = 0L, verbose = FALSE )get_chemical_synonym_batch( DTXSID = NULL, API_key = NULL, rate_limit = 0L, verbose = FALSE )
DTXSID |
A list of chemical identifier DTXSIDs |
API_key |
The user-specific API key. |
rate_limit |
The number of seconds to wait between requests. |
verbose |
A logical indicating if some “progress report” should be given. |
A named list of lists containing synonym information for each input DTXSID.
# Pull synonyms for multiple chemicals dtxsid <- c('DTXSID7020182', 'DTXSID2021315') batch_synonyms <- get_chemical_synonym_batch(DTXSID = dtxsid)# Pull synonyms for multiple chemicals dtxsid <- c('DTXSID7020182', 'DTXSID2021315') batch_synonyms <- get_chemical_synonym_batch(DTXSID = dtxsid)
Get Chemical Weight Fractions
get_chemical_weight_fraction( DTXSID = NULL, API_key = NULL, Server = "https://comptox.epa.gov/ctx-api/exposure", verbose = FALSE )get_chemical_weight_fraction( DTXSID = NULL, API_key = NULL, Server = "https://comptox.epa.gov/ctx-api/exposure", verbose = FALSE )
DTXSID |
The chemical identifier DTXSID |
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some "progress report" should be given. |
A data.frame containing chemical weight fraction data.
# Get chemical weight fraction data for Caffeine get_chemical_weight_fraction('DTXSID0020232')# Get chemical weight fraction data for Caffeine get_chemical_weight_fraction('DTXSID0020232')
Get chemical weight fraction via batch
get_chemical_weight_fraction_batch( DTXSID = NULL, API_key = NULL, rate_limit = 0L, Server = "https://comptox.epa.gov/ctx-api/exposure", verbose = FALSE )get_chemical_weight_fraction_batch( DTXSID = NULL, API_key = NULL, rate_limit = 0L, Server = "https://comptox.epa.gov/ctx-api/exposure", verbose = FALSE )
DTXSID |
Chemical identifier DTXSID |
API_key |
The user-specific API key |
rate_limit |
Number of seconds to wait between requests |
Server |
The root address for the API endpoint. |
verbose |
A logical indicating if some "progress report" should be given. |
A list of data.frames of hemical weight fraction data corresponding to the input DTXSIDs.
# Retrieve chemical weight fraction data for BPA and Caffeine get_chemical_weight_fraction_batch(DTXSID = c('DTXSID7020182', 'DTXSID0020232'))# Retrieve chemical weight fraction data for BPA and Caffeine get_chemical_weight_fraction_batch(DTXSID = c('DTXSID7020182', 'DTXSID0020232'))
Get chemicals in a given chemical list
get_chemicals_in_list( list_name = NULL, API_key = NULL, Server = chemical_api_server, verbose = FALSE )get_chemicals_in_list( list_name = NULL, API_key = NULL, Server = chemical_api_server, verbose = FALSE )
list_name |
The name of the list of chemicals |
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some “progress report” should be given. |
A data.frame of the chemical list
# Retrieve chemicals contained in chemical list 'CCL4' ccl4_chemicals <- get_chemicals_in_list(list_name = 'CCL4')# Retrieve chemicals contained in chemical list 'CCL4' ccl4_chemicals <- get_chemicals_in_list(list_name = 'CCL4')
Get chemicals in a given chemical list batch
get_chemicals_in_list_batch( list_names = NULL, API_key = NULL, rate_limit = 0L, verbose = FALSE )get_chemicals_in_list_batch( list_names = NULL, API_key = NULL, rate_limit = 0L, verbose = FALSE )
list_names |
A list of names of chemical lists. |
API_key |
The user-specific API key. |
rate_limit |
Number of seconds to wait between each request |
verbose |
A logical indicating if some “progress report” should be given. |
A named list of data.frames each containing chemicals in the corresponding chemical lists.
# Pull chemicals in lists for multiple lists chemicals_in_lists <- get_chemicals_in_list_batch(list_names = c('CCL4', 'NATADB'))# Pull chemicals in lists for multiple lists chemicals_in_lists <- get_chemicals_in_list_batch(list_names = c('CCL4', 'NATADB'))
Get chemicals in a list specified by contained characters
get_chemicals_in_list_contain( list_name = NULL, word = NULL, API_key = NULL, Server = chemical_api_server, verbose = FALSE )get_chemicals_in_list_contain( list_name = NULL, word = NULL, API_key = NULL, Server = chemical_api_server, verbose = FALSE )
list_name |
The name of the list to search |
word |
The contained characters to match chemicals in the given list |
API_key |
The user-specific api key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some "progress report" should be given. |
A list of DTXSIDs matching the list and search word criteria
bis_biosolids_2021 <- get_chemicals_in_list_contain(list_name = 'BIOSOLIDS2021', word = 'Bis')bis_biosolids_2021 <- get_chemicals_in_list_contain(list_name = 'BIOSOLIDS2021', word = 'Bis')
Get chemicals in a list specified by characters contained batch search
get_chemicals_in_list_contain_batch( list_names = NULL, words = NULL, API_key = NULL, rate_limit = 0L, verbose = FALSE )get_chemicals_in_list_contain_batch( list_names = NULL, words = NULL, API_key = NULL, rate_limit = 0L, verbose = FALSE )
list_names |
The names of the lists to search. |
words |
The search words, one for each list. |
API_key |
The user-specific API key. |
rate_limit |
Number of seconds to wait between each request. |
verbose |
A logical indicating if some "progress report" should be given. |
A named list of lists, with names corresponding to search terms and lists corresponding to DTXSIDs associated to the search terms
# Search `CCL4` for chemicals containing with 'Bis' and `BIOSOLIDS2021` for # chemicals containing with 'Zyle'. bis_and_zyle <- get_chemicals_in_list_contain_batch(list_names = c('CCL4', 'BIOSOLIDS2021'), words = c('Bis', 'Zyle'))# Search `CCL4` for chemicals containing with 'Bis' and `BIOSOLIDS2021` for # chemicals containing with 'Zyle'. bis_and_zyle <- get_chemicals_in_list_contain_batch(list_names = c('CCL4', 'BIOSOLIDS2021'), words = c('Bis', 'Zyle'))
Get chemicals in a list specified by exact characters
get_chemicals_in_list_exact( list_name = NULL, word = NULL, API_key = NULL, Server = chemical_api_server, verbose = FALSE )get_chemicals_in_list_exact( list_name = NULL, word = NULL, API_key = NULL, Server = chemical_api_server, verbose = FALSE )
list_name |
The name of the list to search |
word |
The exact characters to match chemicals in the given list |
API_key |
The user-specific api key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some "progress report" should be given. |
A list of DTXSIDs matching the list and search word criteria
bis_biosolids_2021 <- get_chemicals_in_list_exact(list_name = 'BIOSOLIDS2021', word = 'Bisphenol A')bis_biosolids_2021 <- get_chemicals_in_list_exact(list_name = 'BIOSOLIDS2021', word = 'Bisphenol A')
Get chemicals in a list specified by exact characters batch search
get_chemicals_in_list_exact_batch( list_names = NULL, words = NULL, API_key = NULL, rate_limit = 0L, verbose = FALSE )get_chemicals_in_list_exact_batch( list_names = NULL, words = NULL, API_key = NULL, rate_limit = 0L, verbose = FALSE )
list_names |
The names of the lists to search. |
words |
The search words, one for each list. |
API_key |
The user-specific API key. |
rate_limit |
Number of seconds to wait between each request. |
verbose |
A logical indicating if some "progress report" should be given. |
A named list of lists, with names corresponding to search terms and lists corresponding to DTXSIDs associated to the search terms
# Search `CCL4` for chemicals exactly matching with 'Bisphenol A' and # `BIOSOLIDS2021` for chemicals exactly matching with 'Bisphenol A'. bisphenol_a <- get_chemicals_in_list_exact_batch(list_names = c('CCL4', 'BIOSOLIDS2021'), words = rep('Bisphenol A', 2))# Search `CCL4` for chemicals exactly matching with 'Bisphenol A' and # `BIOSOLIDS2021` for chemicals exactly matching with 'Bisphenol A'. bisphenol_a <- get_chemicals_in_list_exact_batch(list_names = c('CCL4', 'BIOSOLIDS2021'), words = rep('Bisphenol A', 2))
Get chemicals in a list specified by starting characters
get_chemicals_in_list_start( list_name = NULL, word = NULL, API_key = NULL, Server = chemical_api_server, verbose = FALSE )get_chemicals_in_list_start( list_name = NULL, word = NULL, API_key = NULL, Server = chemical_api_server, verbose = FALSE )
list_name |
The name of the list to search |
word |
The starting characters to match chemicals in the given list |
API_key |
The user-specific api key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some "progress report" should be given. |
A list of DTXSIDs matching the list and search word criteria
bis_biosolids_2021 <- get_chemicals_in_list_start(list_name = 'BIOSOLIDS2021', word = 'Bi')bis_biosolids_2021 <- get_chemicals_in_list_start(list_name = 'BIOSOLIDS2021', word = 'Bi')
Get chemicals in a list specified by starting characters batch search
get_chemicals_in_list_start_batch( list_names = NULL, words = NULL, API_key = NULL, rate_limit = 0L, verbose = FALSE )get_chemicals_in_list_start_batch( list_names = NULL, words = NULL, API_key = NULL, rate_limit = 0L, verbose = FALSE )
list_names |
The names of the lists to search. |
words |
The search words, one for each list. |
API_key |
The user-specific API key. |
rate_limit |
Number of seconds to wait between each request. |
verbose |
A logical indicating if some "progress report" should be given. |
A named list of lists, with names corresponding to search terms and lists corresponding to DTXSIDs associated to the search terms
# Search `CCL4` for chemicals starting with 'Bis' and `BIOSOLIDS2021` for # chemicals starting with 'Tri'. bis_and_tri <- get_chemicals_in_list_start_batch(list_names = c('CCL4', 'BIOSOLIDS2021'), words = c('Bis', 'Tri'))# Search `CCL4` for chemicals starting with 'Bis' and `BIOSOLIDS2021` for # chemicals starting with 'Tri'. bis_and_tri <- get_chemicals_in_list_start_batch(list_names = c('CCL4', 'BIOSOLIDS2021'), words = c('Bis', 'Tri'))
Get demographic exposure prediction data
get_demographic_exposure_prediction( DTXSID = NULL, API_key = NULL, Server = exposure_api_server, verbose = FALSE )get_demographic_exposure_prediction( DTXSID = NULL, API_key = NULL, Server = exposure_api_server, verbose = FALSE )
DTXSID |
The chemical identifier DTXSID |
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some "progress report" should be given. |
A data.table of demographic exposure prediction data.
# Pull general exposure prediction data for BPA bpa <- get_demographic_exposure_prediction(DTXSID = 'DTXSID7020182')# Pull general exposure prediction data for BPA bpa <- get_demographic_exposure_prediction(DTXSID = 'DTXSID7020182')
Retrieve demographic exposure predictions for chemicals via batch
get_demographic_exposure_prediction_batch( DTXSID = NULL, API_key = NULL, rate_limit = 0L, Server = exposure_api_server, verbose = FALSE )get_demographic_exposure_prediction_batch( DTXSID = NULL, API_key = NULL, rate_limit = 0L, Server = exposure_api_server, verbose = FALSE )
DTXSID |
Chemical identifier DTXSID |
API_key |
The user-specific API key |
rate_limit |
Number of seconds to wait between each request |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some “progress report” should be given. |
A named list of data.frames, each containing demographic exposure prediction data for each input DTXSID.
# Pull demographic exposure prediction data for multiple chemicals dtxsid <- c('DTXSID7020182', 'DTXSID2021315') exp_demo <- get_demographic_exposure_prediction_batch(DTXSID = dtxsid)# Pull demographic exposure prediction data for multiple chemicals dtxsid <- c('DTXSID7020182', 'DTXSID2021315') exp_demo <- get_demographic_exposure_prediction_batch(DTXSID = dtxsid)
Exposure API Endpoint status
get_exposure_endpoint_status()get_exposure_endpoint_status()
Status of Exposure API Endpoints
status <- get_exposure_endpoint_status() print(status)status <- get_exposure_endpoint_status() print(status)
Retrieve exposure related functional use data
get_exposure_functional_use( DTXSID = NULL, API_key = NULL, Server = exposure_api_server, verbose = FALSE )get_exposure_functional_use( DTXSID = NULL, API_key = NULL, Server = exposure_api_server, verbose = FALSE )
DTXSID |
Chemical identifier DTXSID |
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some “progress report” should be given. |
A data.frame of functional use data.
# Pull functional use data for BPA bpa <- get_exposure_functional_use(DTXSID = 'DTXSID7020182')# Pull functional use data for BPA bpa <- get_exposure_functional_use(DTXSID = 'DTXSID7020182')
Retrieve exposure related functional use data batch
get_exposure_functional_use_batch( DTXSID = NULL, API_key = NULL, rate_limit = 0L, Server = exposure_api_server, verbose = FALSE )get_exposure_functional_use_batch( DTXSID = NULL, API_key = NULL, rate_limit = 0L, Server = exposure_api_server, verbose = FALSE )
DTXSID |
Chemical identifier DTXSID |
API_key |
The user-specific API key |
rate_limit |
Number of seconds to wait between each request |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some “progress report” should be given. |
A named list of data.frames, each containing exposure functional use data for each input DTXSID.
# Pull exposure functional use data for multiple chemicals dtxsid <- c('DTXSID7020182', 'DTXSID2021315') dtxsid_func_use <- get_exposure_functional_use_batch(DTXSID = dtxsid)# Pull exposure functional use data for multiple chemicals dtxsid <- c('DTXSID7020182', 'DTXSID2021315') dtxsid_func_use <- get_exposure_functional_use_batch(DTXSID = dtxsid)
Retrieve functional use categories
get_exposure_functional_use_category( API_key = NULL, Server = exposure_api_server, verbose = FALSE )get_exposure_functional_use_category( API_key = NULL, Server = exposure_api_server, verbose = FALSE )
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some “progress report” should be given. |
A data.frame of functional use categories.
# Pull functional use category data for BPA functional_use_categories <- get_exposure_functional_use_category()# Pull functional use category data for BPA functional_use_categories <- get_exposure_functional_use_category()
Retrieve probability of exposure for functional use category
get_exposure_functional_use_probability( DTXSID = NULL, API_key = NULL, Server = exposure_api_server, verbose = FALSE )get_exposure_functional_use_probability( DTXSID = NULL, API_key = NULL, Server = exposure_api_server, verbose = FALSE )
DTXSID |
The chemical identifier DTXSID |
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some “progress report” should be given. |
A data.frame with probabilities corresponding to various routes of exposure related to functional use.
# Pull functional use probability data for BPA bpa <- get_exposure_functional_use_probability(DTXSID = 'DTXSID7020182')# Pull functional use probability data for BPA bpa <- get_exposure_functional_use_probability(DTXSID = 'DTXSID7020182')
Retrieve exposure functional use probability data batch
get_exposure_functional_use_probability_batch( DTXSID = NULL, API_key = NULL, rate_limit = 0L, Server = exposure_api_server, verbose = FALSE )get_exposure_functional_use_probability_batch( DTXSID = NULL, API_key = NULL, rate_limit = 0L, Server = exposure_api_server, verbose = FALSE )
DTXSID |
Chemical identifier DTXSID |
API_key |
The user-specific API key |
rate_limit |
Number of seconds to wait between each request |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some “progress report” should be given. |
A data.table, with each row containing exposure functional use probability data for each input DTXSID. NA values are filled in for categories that have probability of 0
# Pull exposure functional use probability data for multiple chemicals dtxsid <- c('DTXSID7020182', 'DTXSID2021315') dtxsid_func_use_prob <- get_exposure_functional_use_batch(DTXSID = dtxsid)# Pull exposure functional use probability data for multiple chemicals dtxsid <- c('DTXSID7020182', 'DTXSID2021315') dtxsid_func_use_prob <- get_exposure_functional_use_batch(DTXSID = dtxsid)
Retrieve list presence tags
get_exposure_list_presence_tags( API_key = NULL, Server = exposure_api_server, verbose = FALSE )get_exposure_list_presence_tags( API_key = NULL, Server = exposure_api_server, verbose = FALSE )
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some “progress report” should be given. |
A data.frame with all the list presence tags and associated data.
# Pull list presence tags tags <- get_exposure_list_presence_tags()# Pull list presence tags tags <- get_exposure_list_presence_tags()
Retrieve document data and list presence tags for a chemical
get_exposure_list_presence_tags_by_dtxsid( DTXSID = NULL, API_key = NULL, Server = exposure_api_server, verbose = FALSE )get_exposure_list_presence_tags_by_dtxsid( DTXSID = NULL, API_key = NULL, Server = exposure_api_server, verbose = FALSE )
DTXSID |
The chemical identifier DTXSID |
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some “progress report” should be given. |
A data.frame of document information and list presence tags
# Pull list presence tags for BPA bpa <- get_exposure_list_presence_tags(DTXSID = 'DTXSID7020182')# Pull list presence tags for BPA bpa <- get_exposure_list_presence_tags(DTXSID = 'DTXSID7020182')
Retrieve document data and list presence tags for chemicals batch
get_exposure_list_presence_tags_by_dtxsid_batch( DTXSID = NULL, API_key = NULL, rate_limit = 0L, Server = exposure_api_server, verbose = FALSE )get_exposure_list_presence_tags_by_dtxsid_batch( DTXSID = NULL, API_key = NULL, rate_limit = 0L, Server = exposure_api_server, verbose = FALSE )
DTXSID |
Chemical identifier DTXSID |
API_key |
The user-specific API key |
rate_limit |
Number of seconds to wait between each request |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some “progress report” should be given. |
A named list of data.frames, each containing exposure list presence tags use data for each input DTXSID.
# Pull exposure functional use data for multiple chemicals dtxsid <- c('DTXSID7020182', 'DTXSID2021315') exp_list_tags <- get_exposure_list_presence_tags_by_dtxsid_batch(DTXSID = dtxsid)# Pull exposure functional use data for multiple chemicals dtxsid <- c('DTXSID7020182', 'DTXSID2021315') exp_list_tags <- get_exposure_list_presence_tags_by_dtxsid_batch(DTXSID = dtxsid)
Retrieve product data for exposure purposes
get_exposure_product_data( DTXSID = NULL, API_key = NULL, Server = exposure_api_server, verbose = FALSE )get_exposure_product_data( DTXSID = NULL, API_key = NULL, Server = exposure_api_server, verbose = FALSE )
DTXSID |
The chemical identifier DTXSID |
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some “progress report” should be given. |
A data.frame with product information relating to exposure to the given chemical
# Pull exposure product data for BPA bpa <- get_exposure_product_data(DTXSID = 'DTXSID7020182')# Pull exposure product data for BPA bpa <- get_exposure_product_data(DTXSID = 'DTXSID7020182')
Retrieve product data for exposure purposes batch
get_exposure_product_data_batch( DTXSID = NULL, API_key = NULL, rate_limit = 0L, Server = exposure_api_server, verbose = FALSE )get_exposure_product_data_batch( DTXSID = NULL, API_key = NULL, rate_limit = 0L, Server = exposure_api_server, verbose = FALSE )
DTXSID |
Chemical identifier DTXSID |
API_key |
The user-specific API key |
rate_limit |
Number of seconds to wait between each request |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some “progress report” should be given. |
A named list of data.frames, each containing exposure product data for each input DTXSID.
# Pull exposure functional use data for multiple chemicals dtxsid <- c('DTXSID7020182', 'DTXSID2021315') dtxsid_product_data <- get_exposure_product_data_batch(DTXSID = dtxsid)# Pull exposure functional use data for multiple chemicals dtxsid <- c('DTXSID7020182', 'DTXSID2021315') dtxsid_product_data <- get_exposure_product_data_batch(DTXSID = dtxsid)
Retrieve product use categories related to exposure
get_exposure_product_data_puc( API_key = NULL, Server = exposure_api_server, verbose = FALSE )get_exposure_product_data_puc( API_key = NULL, Server = exposure_api_server, verbose = FALSE )
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some “progress report” should be given. |
A data.frame consisting of all the product use categories
# Pull product data use categories for BPA puc_categories <- get_exposure_product_data_puc()# Pull product data use categories for BPA puc_categories <- get_exposure_product_data_puc()
Get fate by DTXSID
get_fate_by_dtxsid( DTXSID = NULL, API_key = NULL, Server = chemical_api_server, verbose = FALSE )get_fate_by_dtxsid( DTXSID = NULL, API_key = NULL, Server = chemical_api_server, verbose = FALSE )
DTXSID |
The chemical identifier DTXSID |
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some “progress report” should be given. |
A data.frame containing chemical information for the chemical with DTXSID matching the input parameter.
# Pull chemical fate data for BPA bpa <- get_fate_by_dtxsid(DTXSID = 'DTXSID7020182')# Pull chemical fate data for BPA bpa <- get_fate_by_dtxsid(DTXSID = 'DTXSID7020182')
Retrieve chemical fate data in batch search
get_fate_by_dtxsid_batch( DTXSID = NULL, API_key = NULL, rate_limit = 0L, Server = chemical_api_server, verbose = FALSE )get_fate_by_dtxsid_batch( DTXSID = NULL, API_key = NULL, rate_limit = 0L, Server = chemical_api_server, verbose = FALSE )
DTXSID |
A vector of chemicals identifier DTXSIDs |
API_key |
The user-specific API key |
rate_limit |
Number of seconds to wait between each request |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some “progress report” should be given. |
A data.table containing chemical fate information for the chemicals with DTXSID matching the input parameter.
# Pull chemical fate by dtxsids chemical_fates <- get_fate_by_dtxsid_batch(DTXSID = c('DTXSID7020182', 'DTXSID2021315'))# Pull chemical fate by dtxsids chemical_fates <- get_fate_by_dtxsid_batch(DTXSID = c('DTXSID7020182', 'DTXSID2021315'))
Get general exposure prediction data
get_general_exposure_prediction( DTXSID = NULL, API_key = NULL, Server = exposure_api_server, verbose = FALSE )get_general_exposure_prediction( DTXSID = NULL, API_key = NULL, Server = exposure_api_server, verbose = FALSE )
DTXSID |
The chemical identifier DTXSID |
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some "progress report" should be given. |
A data.table of general exposure prediction data or NULL if data is missing.
# Pull general exposure prediction data for BPA bpa <- get_general_exposure_prediction(DTXSID = 'DTXSID7020182')# Pull general exposure prediction data for BPA bpa <- get_general_exposure_prediction(DTXSID = 'DTXSID7020182')
Retrieve general exposure predictions for chemicals via batch
get_general_exposure_prediction_batch( DTXSID = NULL, API_key = NULL, rate_limit = 0L, Server = exposure_api_server, verbose = FALSE )get_general_exposure_prediction_batch( DTXSID = NULL, API_key = NULL, rate_limit = 0L, Server = exposure_api_server, verbose = FALSE )
DTXSID |
Chemical identifier DTXSID |
API_key |
The user-specific API key |
rate_limit |
Number of seconds to wait between each request |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some “progress report” should be given. |
A named list of data.frames, each containing general exposure prediction data for each input DTXSID.
# Pull general exposure prediction data for multiple chemicals dtxsid <- c('DTXSID7020182', 'DTXSID2021315') exp_pred <- get_general_exposure_prediction_batch(DTXSID = dtxsid)# Pull general exposure prediction data for multiple chemicals dtxsid <- c('DTXSID7020182', 'DTXSID2021315') exp_pred <- get_general_exposure_prediction_batch(DTXSID = dtxsid)
Get General Use Keywords
get_general_use_keywords( DTXSID = NULL, API_key = NULL, Server = "https://comptox.epa.gov/ctx-api/exposure", verbose = FALSE )get_general_use_keywords( DTXSID = NULL, API_key = NULL, Server = "https://comptox.epa.gov/ctx-api/exposure", verbose = FALSE )
DTXSID |
The chemical identifier DTXSID |
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some "progress report" should be given. |
A data.frame containing general use keywords.
# Get general use keywords for Caffeine get_general_use_keywords('DTXSID0020232')# Get general use keywords for Caffeine get_general_use_keywords('DTXSID0020232')
Get general use keywords via batch
get_general_use_keywords_batch( DTXSID = NULL, API_key = NULL, rate_limit = 0L, Server = "https://comptox.epa.gov/ctx-api/exposure", verbose = FALSE )get_general_use_keywords_batch( DTXSID = NULL, API_key = NULL, rate_limit = 0L, Server = "https://comptox.epa.gov/ctx-api/exposure", verbose = FALSE )
DTXSID |
Chemical identifier DTXSID |
API_key |
The user-specific API key |
rate_limit |
Number of seconds to wait between requests |
Server |
The root address for the API endpoint. |
verbose |
A logical indicating if some "progress report" should be given. |
A list of data.frames of general use keywords corresponding to the input DTXSIDs.
# Retrieve general use keywords for BPA and Caffeine get_general_use_keywords_batch(DTXSID = c('DTXSID7020182', 'DTXSID0020232'))# Retrieve general use keywords for BPA and Caffeine get_general_use_keywords_batch(DTXSID = c('DTXSID7020182', 'DTXSID0020232'))
Get genetox details
get_genetox_details( DTXSID = NULL, API_key = NULL, Server = hazard_api_server, verbose = FALSE )get_genetox_details( DTXSID = NULL, API_key = NULL, Server = hazard_api_server, verbose = FALSE )
DTXSID |
The chemical identifier DTXSID |
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some “progress report” should be given. |
A data.frame of genetox detail data related to the input DTXSID.
# Pull genetox details for BPA bpa_genetox_details <- get_genetox_details(DTXSID = 'DTXSID7020182')# Pull genetox details for BPA bpa_genetox_details <- get_genetox_details(DTXSID = 'DTXSID7020182')
Get genetox details batch
get_genetox_details_batch( DTXSID = NULL, API_key = NULL, rate_limit = 0L, Server = hazard_api_server, verbose = FALSE )get_genetox_details_batch( DTXSID = NULL, API_key = NULL, rate_limit = 0L, Server = hazard_api_server, verbose = FALSE )
DTXSID |
The chemical identifier DTXSIDs |
API_key |
The user-specific API key. |
rate_limit |
Number of seconds to wait between requests |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some “progress report” should be given. |
A data.table of genetox detail data for each input DTXSID.
# Pull genetox details data for multiples chemicals dtxsid <- c('DTXSID7020182', 'DTXSID2021315') dtxsid_genetox_details_hazard <- get_genetox_details_batch(DTXSID = dtxsid)# Pull genetox details data for multiples chemicals dtxsid <- c('DTXSID7020182', 'DTXSID2021315') dtxsid_genetox_details_hazard <- get_genetox_details_batch(DTXSID = dtxsid)
Get genetox summary
get_genetox_summary( DTXSID = NULL, API_key = NULL, Server = hazard_api_server, verbose = FALSE )get_genetox_summary( DTXSID = NULL, API_key = NULL, Server = hazard_api_server, verbose = FALSE )
DTXSID |
The chemical identifier DTXSID |
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some “progress report” should be given. |
A data.frame of genetox summary data related to the input DTXSID.
# Pull genetox summary for BPA bpa_genetox_summary <- get_genetox_summary(DTXSID = 'DTXSID7020182')# Pull genetox summary for BPA bpa_genetox_summary <- get_genetox_summary(DTXSID = 'DTXSID7020182')
Get genetox summary batch
get_genetox_summary_batch( DTXSID = NULL, API_key = NULL, rate_limit = 0L, Server = hazard_api_server, verbose = FALSE )get_genetox_summary_batch( DTXSID = NULL, API_key = NULL, rate_limit = 0L, Server = hazard_api_server, verbose = FALSE )
DTXSID |
The chemical identifier DTXSIDs |
API_key |
The user-specific API key. |
rate_limit |
Number of seconds to wait between requests |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some “progress report” should be given. |
A data.table of genetox summary data for each input DTXSID.
# Pull genetox summary data for multiples chemicals dtxsid <- c('DTXSID7020182', 'DTXSID2021315') dtxsid_genetox_summary_hazard <- get_genetox_summary_batch(DTXSID = dtxsid)# Pull genetox summary data for multiples chemicals dtxsid <- c('DTXSID7020182', 'DTXSID2021315') dtxsid_genetox_summary_hazard <- get_genetox_summary_batch(DTXSID = dtxsid)
The function was deprecated due to updates and restructing of the CTX APIs.
get_hazard_by_dtxsid( DTXSID = NULL, API_key = NULL, Server = hazard_api_server, verbose = FALSE )get_hazard_by_dtxsid( DTXSID = NULL, API_key = NULL, Server = hazard_api_server, verbose = FALSE )
DTXSID |
The chemical identifier DTXSID |
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some “progress report” should be given. |
A data.frame containing chemical (human and eco) hazard data
# Pull hazard data for BPA bpa <- get_hazard_by_dtxsid(DTXSID = 'DTXSID7020182')# Pull hazard data for BPA bpa <- get_hazard_by_dtxsid(DTXSID = 'DTXSID7020182')
The function was deprecated due to updates and restructing of the CTX APIs.
get_hazard_by_dtxsid_batch( DTXSID = NULL, API_key = NULL, rate_limit = 0L, Server = hazard_api_server, verbose = FALSE )get_hazard_by_dtxsid_batch( DTXSID = NULL, API_key = NULL, rate_limit = 0L, Server = hazard_api_server, verbose = FALSE )
DTXSID |
A list of chemical identifier DTXSIDs |
API_key |
The user-specific API key |
rate_limit |
Number of seconds to wait between each request |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some “progress report” should be given. |
A data.table containing chemical (human and eco) hazard data for each input chemical.
# Pull hazard data for multiple chemicals dtxsid <- c('DTXSID7020182', 'DTXSID2021315') batch_hazard <- get_hazard_by_dtxsid_batch(DTXSID = dtxsid)# Pull hazard data for multiple chemicals dtxsid <- c('DTXSID7020182', 'DTXSID2021315') batch_hazard <- get_hazard_by_dtxsid_batch(DTXSID = dtxsid)
Hazard API Endpoint status
get_hazard_endpoint_status()get_hazard_endpoint_status()
Status of Hazard API Endpoints
status <- get_hazard_endpoint_status() print(status)status <- get_hazard_endpoint_status() print(status)
Get httk data
get_httk_data( DTXSID = NULL, API_key = NULL, Server = exposure_api_server, verbose = FALSE )get_httk_data( DTXSID = NULL, API_key = NULL, Server = exposure_api_server, verbose = FALSE )
DTXSID |
The chemical identifier DTXSID |
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some "progress report" should be given. |
A data.table of httk data for the given input chemical.
# Pull httk data for BPA bpa_httk <- get_httk_data(DTXSID = 'DTXSID7020182')# Pull httk data for BPA bpa_httk <- get_httk_data(DTXSID = 'DTXSID7020182')
Retrieve httk data via batch search
get_httk_data_batch( DTXSID = NULL, API_key = NULL, rate_limit = 0L, Server = exposure_api_server, verbose = FALSE )get_httk_data_batch( DTXSID = NULL, API_key = NULL, rate_limit = 0L, Server = exposure_api_server, verbose = FALSE )
DTXSID |
The chemical identifier DTXSID |
API_key |
The user-specific API key |
rate_limit |
Number of seconds to wait between each request |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some "progress report" should be given. |
A named list of httk data corresponding to the input chemicals
# Retrieve information for BPA and Caffeine dtxsids <- c('DTXSID7020182', 'DTXSID0020232') httk_data <- get_httk_data_batch(DTXSID = dtxsids)# Retrieve information for BPA and Caffeine dtxsids <- c('DTXSID7020182', 'DTXSID0020232') httk_data <- get_httk_data_batch(DTXSID = dtxsids)
Get InChI
get_inchi( name = NULL, API_key = NULL, Server = chemical_api_server, verbose = FALSE )get_inchi( name = NULL, API_key = NULL, Server = chemical_api_server, verbose = FALSE )
name |
Chemical name |
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some “progress report” should be given. |
A string giving the associated inchi string.
bpa_inchi <- get_inchi(name = "Bisphenol A")bpa_inchi <- get_inchi(name = "Bisphenol A")
Get InChIKey
get_inchikey( name = NULL, API_key = NULL, Server = chemical_api_server, verbose = FALSE )get_inchikey( name = NULL, API_key = NULL, Server = chemical_api_server, verbose = FALSE )
name |
Chemical name |
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some “progress report” should be given. |
A string giving the associated InChIKey.
bpa_inchikey <- get_inchikey(name = "Bisphenol A")bpa_inchikey <- get_inchikey(name = "Bisphenol A")
Get chemical lists containing given chemical
get_lists_containing_chemical( DTXSID = NULL, API_key = NULL, Server = chemical_api_server, verbose = FALSE )get_lists_containing_chemical( DTXSID = NULL, API_key = NULL, Server = chemical_api_server, verbose = FALSE )
DTXSID |
The chemical identifier DTXSID |
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some “progress report” should be given. |
A list of names of chemical lists that contain the given chemical
# Pull chemical lists containing BPA bpa_lists <- get_lists_containing_chemical(DTXSID = 'DTXSID7020182')# Pull chemical lists containing BPA bpa_lists <- get_lists_containing_chemical(DTXSID = 'DTXSID7020182')
Get chemical lists containing given chemical batch
get_lists_containing_chemical_batch( chemical_list = NULL, API_key = NULL, rate_limit = 0L, verbose = FALSE )get_lists_containing_chemical_batch( chemical_list = NULL, API_key = NULL, rate_limit = 0L, verbose = FALSE )
chemical_list |
A list of the chemical identifier DTXSIDs. |
API_key |
The user-specific API key. |
rate_limit |
Number of seconds to wait between each request |
verbose |
A logical indicating if some “progress report” should be given. |
A named list of chemical lists that contain the given chemicals.
# Pull lists containing chemicals for multiple chemicals lists <- get_lists_containing_chemical_batch(chemical_list = c('DTXSID7020182', 'DTXSID2021315'))# Pull lists containing chemicals for multiple chemicals lists <- get_lists_containing_chemical_batch(chemical_list = c('DTXSID7020182', 'DTXSID2021315'))
Retrieve MMDB medium categories
get_medium_categories( API_key = NULL, Server = "https://comptox.epa.gov/ctx-api/exposure", verbose = FALSE )get_medium_categories( API_key = NULL, Server = "https://comptox.epa.gov/ctx-api/exposure", verbose = FALSE )
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some "progress report" should be given. |
A data.frame of harmonized medium categories from MMDB and relevant descriptions.
# Retrieve medium categories and descriptions get_medium_categories()# Retrieve medium categories and descriptions get_medium_categories()
Get msready by DTXCID
get_msready_by_dtxcid( DTXCID = NULL, API_key = NULL, Server = chemical_api_server, verbose = FALSE )get_msready_by_dtxcid( DTXCID = NULL, API_key = NULL, Server = chemical_api_server, verbose = FALSE )
DTXCID |
The chemical identifier DTXCID |
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some “progress report” should be given. |
A character list of DTXSIDs with DTXCIDs matching the search criteria
# Pull chemicals with matching DTXCID dtxcid_msready <- get_msready_by_dtxcid(DTXSID = 'DTXCID30182')# Pull chemicals with matching DTXCID dtxcid_msready <- get_msready_by_dtxcid(DTXSID = 'DTXCID30182')
Get msready by DTXCID batch search
get_msready_by_dtxcid_batch( DTXCID = NULL, API_key = NULL, rate_limit = 0L, verbose = FALSE )get_msready_by_dtxcid_batch( DTXCID = NULL, API_key = NULL, rate_limit = 0L, verbose = FALSE )
DTXCID |
A list of chemical identifier DTXCIDs |
API_key |
A user-specific API key |
rate_limit |
Number of seconds to wait between each request |
verbose |
A logical indicating if some “progress report” should be given. |
A named list of character lists of DTXSIDs with DTXCIDs matching the search criteria
# Pull msready chemicals matching specific DTXCID dtxcid_msready <- get_msready_by_dtxcid_batch(DTXCID = c('DTXCID30182', 'DTXCID001315'))# Pull msready chemicals matching specific DTXCID dtxcid_msready <- get_msready_by_dtxcid_batch(DTXCID = c('DTXCID30182', 'DTXCID001315'))
Get msready by formula
get_msready_by_formula( formula = NULL, API_key = NULL, Server = chemical_api_server, verbose = FALSE )get_msready_by_formula( formula = NULL, API_key = NULL, Server = chemical_api_server, verbose = FALSE )
formula |
A string denoting the input chemical formula |
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some “progress report” should be given. |
A character list of DTXSIDs with chemical formulas matching the search criteria
# Pull chemicals that match input formula mass_formula <- get_msready_by_formula(formula = 'C16H24N2O5S')# Pull chemicals that match input formula mass_formula <- get_msready_by_formula(formula = 'C16H24N2O5S')
Get msready by formula batch search
get_msready_by_formula_batch( formula_list = NULL, API_key = NULL, rate_limit = 0L, verbose = FALSE )get_msready_by_formula_batch( formula_list = NULL, API_key = NULL, rate_limit = 0L, verbose = FALSE )
formula_list |
A list of strings denoting the input chemicals formulas |
API_key |
The user-specific API key |
rate_limit |
Number of seconds to wait between each request |
verbose |
A logical indicating if some “progress report” should be given. |
A named list of character lists of DTXSIDs with chemical formulas matching the search criteria
# Pull msready data for several chemical formulas msready_data <- get_msready_by_formula_batch(formula_list = c('C16H24N2O5S', 'C15H16O2'))# Pull msready data for several chemical formulas msready_data <- get_msready_by_formula_batch(formula_list = c('C16H24N2O5S', 'C15H16O2'))
Get msready by mass
get_msready_by_mass( start = NULL, end = NULL, API_key = NULL, Server = chemical_api_server, verbose = FALSE )get_msready_by_mass( start = NULL, end = NULL, API_key = NULL, Server = chemical_api_server, verbose = FALSE )
start |
The starting value for mass range |
end |
The ending value for mass range |
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some “progress report” should be given. |
A list of DTXSIDs with msready mass falling within the given range.
# Pull chemicals with msready mass in given range mass_range <- get_msready_by_mass(start = 200.9, end = 200.95)# Pull chemicals with msready mass in given range mass_range <- get_msready_by_mass(start = 200.9, end = 200.95)
Get ms ready by mass batch search
get_msready_by_mass_batch( start_list = NULL, end_list = NULL, API_key = NULL, rate_limit = 0L, verbose = FALSE )get_msready_by_mass_batch( start_list = NULL, end_list = NULL, API_key = NULL, rate_limit = 0L, verbose = FALSE )
start_list |
A numeric list of starting values for mass range |
end_list |
A numeric list of ending values for mass range |
API_key |
The user-specific API key |
rate_limit |
Number of seconds to wait between each request |
verbose |
A logical indicating if some “progress report” should be given. |
A named list of character lists with DTXSIDs with msready masses falling within the given ranges.
# Pull msready chemicals by mass ranges msready_data <- get_msready_by_mass_batch(start_list = c(200.9, 200.95), end_list = c(200.95, 201.00))# Pull msready chemicals by mass ranges msready_data <- get_msready_by_mass_batch(start_list = c(200.9, 200.95), end_list = c(200.95, 201.00))
Get msready by mass and error offset
get_msready_by_mass_with_error_batch( masses = NULL, error = NULL, API_key = NULL, rate_limit = 0, verbose = FALSE )get_msready_by_mass_with_error_batch( masses = NULL, error = NULL, API_key = NULL, rate_limit = 0, verbose = FALSE )
masses |
A numeric list of masses. |
error |
The mass offset value. |
API_key |
The user-specific API key. |
rate_limit |
Number of seconds to wait between each request |
verbose |
A logical indicating if some "progress report" should be given. |
A list (of lists) of DTXSIDs, with a list returned for each input mass value.
#Pull chemicals by msready mass and error offset msready_data <- get_msready_by_mass_with_error_batch(masses = c(226, 228), error = 4)#Pull chemicals by msready mass and error offset msready_data <- get_msready_by_mass_with_error_batch(masses = c(226, 228), error = 4)
Get Product Use categories via batch
get_product_use_categories_batch( DTXSID = NULL, API_key = NULL, rate_limit = 0L, Server = "https://comptox.epa.gov/ctx-api/exposure", verbose = FALSE )get_product_use_categories_batch( DTXSID = NULL, API_key = NULL, rate_limit = 0L, Server = "https://comptox.epa.gov/ctx-api/exposure", verbose = FALSE )
DTXSID |
Chemical identifier DTXSID |
API_key |
The user-specific API key |
rate_limit |
Number of seconds to wait between requests |
Server |
The root address for the API endpoint. |
verbose |
A logical indicating if some "progress report" should be given. |
A list of data.frames of product use categories data corresponding to the input DTXSIDs.
# Retrieve product use categories for BPA and Caffeine get_product_use_categories_batch(DTXSID = c('DTXSID7020182', 'DTXSID0020232'))# Retrieve product use categories for BPA and Caffeine get_product_use_categories_batch(DTXSID = c('DTXSID7020182', 'DTXSID0020232'))
Get Product Use Categories
get_product_use_category( DTXSID = NULL, API_key = NULL, Server = "https://comptox.epa.gov/ctx-api/exposure", verbose = FALSE )get_product_use_category( DTXSID = NULL, API_key = NULL, Server = "https://comptox.epa.gov/ctx-api/exposure", verbose = FALSE )
DTXSID |
The chemical identifier DTXSID |
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some "progress report" should be given. |
A data.frame containing product use categories.
# Get product use categories for Caffeine get_product_use_category('DTXSID0020232')# Get product use categories for Caffeine get_product_use_category('DTXSID0020232')
Get Production Volume
get_production_volume( DTXSID = NULL, API_key = NULL, Server = "https://comptox.epa.gov/ctx-api/exposure", verbose = FALSE )get_production_volume( DTXSID = NULL, API_key = NULL, Server = "https://comptox.epa.gov/ctx-api/exposure", verbose = FALSE )
DTXSID |
The chemical identifier DTXSID |
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some "progress report" should be given. |
A data.frame containing production volume data.
# Get production volume data for Caffeine get_production_volume('DTXSID0020232')# Get production volume data for Caffeine get_production_volume('DTXSID0020232')
Get Production Volume data via batch
get_production_volume_batch( DTXSID = NULL, API_key = NULL, rate_limit = 0L, Server = "https://comptox.epa.gov/ctx-api/exposure", verbose = FALSE )get_production_volume_batch( DTXSID = NULL, API_key = NULL, rate_limit = 0L, Server = "https://comptox.epa.gov/ctx-api/exposure", verbose = FALSE )
DTXSID |
Chemical identifier DTXSID |
API_key |
The user-specific API key |
rate_limit |
Number of seconds to wait between requests |
Server |
The root address for the API endpoint. |
verbose |
A logical indicating if some "progress report" should be given. |
A list of data.frames of production volume data corresponding to the input DTXSIDs.
# Retrieve production volume data for BPA and Caffeine get_production_volume_batch(DTXSID = c('DTXSID7020182', 'DTXSID0020232'))# Retrieve production volume data for BPA and Caffeine get_production_volume_batch(DTXSID = c('DTXSID7020182', 'DTXSID0020232'))
Get chemical list by name
get_public_chemical_list_by_name( list_name = NULL, Projection = "", API_key = NULL, Server = chemical_api_server, verbose = FALSE )get_public_chemical_list_by_name( list_name = NULL, Projection = "", API_key = NULL, Server = chemical_api_server, verbose = FALSE )
list_name |
The name of the list of chemicals |
Projection |
Optional parameter controlling return type. It takes values chemicallistall' and 'chemicallistname' with the former as the default value. |
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some “progress report” should be given. |
A data.frame containing information about the chemical list. Note,
this is not the chemical list itself. To access the chemicals in the list,
use get_chemicals_in_list.
# Pull chemical list by list name ccl4 <- get_public_chemical_list_by_name(list_name = 'CCL4')# Pull chemical list by list name ccl4 <- get_public_chemical_list_by_name(list_name = 'CCL4')
Get chemical list by name batch
get_public_chemical_list_by_name_batch( name_list = NULL, Projection = "", API_key = NULL, rate_limit = 0L, verbose = FALSE )get_public_chemical_list_by_name_batch( name_list = NULL, Projection = "", API_key = NULL, rate_limit = 0L, verbose = FALSE )
name_list |
A list of chemical list names. |
Projection |
Optional parameter controlling return type. It takes values 'chemicallistall' and 'chemicallistname' with the former as the default value. |
API_key |
The user-specific API key. |
rate_limit |
Number of seconds to wait between each request |
verbose |
A logical indicating if some “progress report” should be given. |
A named list of data.frames containing information about the chemical
lists. Note, these are not the chemical lists themselves. To access the
chemicals in a given list, use get_chemicals_in_list.
# Pull chemical list information by list names list_info <- get_public_chemical_list_by_name_batch(name_list = c('CCL4', 'NATADB'))# Pull chemical list information by list names list_info <- get_public_chemical_list_by_name_batch(name_list = c('CCL4', 'NATADB'))
Get Reported Functional Use
get_reported_functional_use( DTXSID = NULL, API_key = NULL, Server = "https://comptox.epa.gov/ctx-api/exposure", verbose = FALSE )get_reported_functional_use( DTXSID = NULL, API_key = NULL, Server = "https://comptox.epa.gov/ctx-api/exposure", verbose = FALSE )
DTXSID |
The chemical identifier DTXSID |
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some "progress report" should be given. |
A data.frame containing reported functional use data.
# Get reported functional use data for Caffeine get_reported_functional_use('DTXSID0020232')# Get reported functional use data for Caffeine get_reported_functional_use('DTXSID0020232')
Get reported functional use via batch
get_reported_functional_use_batch( DTXSID = NULL, API_key = NULL, rate_limit = 0L, Server = "https://comptox.epa.gov/ctx-api/exposure", verbose = FALSE )get_reported_functional_use_batch( DTXSID = NULL, API_key = NULL, rate_limit = 0L, Server = "https://comptox.epa.gov/ctx-api/exposure", verbose = FALSE )
DTXSID |
Chemical identifier DTXSID |
API_key |
The user-specific API key |
rate_limit |
Number of seconds to wait between requests |
Server |
The root address for the API endpoint. |
verbose |
A logical indicating if some "progress report" should be given. |
A list of data.frames of reported functional use corresponding to the input DTXSIDs.
# Retrieve reported functional use for BPA and Caffeine get_reported_functional_use_batch(DTXSID = c('DTXSID7020182', 'DTXSID0020232'))# Retrieve reported functional use for BPA and Caffeine get_reported_functional_use_batch(DTXSID = c('DTXSID7020182', 'DTXSID0020232'))
Get single sample records by DTXSID
get_single_sample_records_by_dtxsid( DTXSID = NULL, API_key = NULL, Server = "https://comptox.epa.gov/ctx-api/exposure", verbose = FALSE )get_single_sample_records_by_dtxsid( DTXSID = NULL, API_key = NULL, Server = "https://comptox.epa.gov/ctx-api/exposure", verbose = FALSE )
DTXSID |
The chemical identifier DTXSID |
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some "progress report" should be given. |
A data.frame of single sample record data by DTXSID.
#Pull single sample records for BPA by DTXSID bpa_sample_records <- get_single_sample_records_by_dtxsid(DTXSID = 'DTXSID7020182')#Pull single sample records for BPA by DTXSID bpa_sample_records <- get_single_sample_records_by_dtxsid(DTXSID = 'DTXSID7020182')
Get Single Sample Records by DTXSID via batch
get_single_sample_records_by_dtxsid_batch( DTXSID = NULL, API_key = NULL, rate_limit = 0L, Server = "https://comptox.epa.gov/ctx-api/exposure", verbose = FALSE )get_single_sample_records_by_dtxsid_batch( DTXSID = NULL, API_key = NULL, rate_limit = 0L, Server = "https://comptox.epa.gov/ctx-api/exposure", verbose = FALSE )
DTXSID |
Chemical identifier DTXSID |
API_key |
The user-specific API key |
rate_limit |
Number of seconds to wait between each request |
Server |
The root address for the API endpoint |
verbose |
A logicial indicating if some "progress report" should be given. |
A list of data.frames containing single sample records data for each input DTXSID.
# Retrieve single sample records data for BPA and Caffeine get_single_sample_records_by_dtxsid_batch(DTXSID = c('DTXSID0020232', 'DTXSID7020182'))# Retrieve single sample records data for BPA and Caffeine get_single_sample_records_by_dtxsid_batch(DTXSID = c('DTXSID0020232', 'DTXSID7020182'))
Get single sample records by medium
get_single_sample_records_by_medium( Medium = NULL, API_key = NULL, Server = "https://comptox.epa.gov/ctx-api/exposure", pageNumber = 1, verbose = FALSE )get_single_sample_records_by_medium( Medium = NULL, API_key = NULL, Server = "https://comptox.epa.gov/ctx-api/exposure", pageNumber = 1, verbose = FALSE )
Medium |
The mmdb medium of exposure. |
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
pageNumber |
Parameter for how to return data records. |
verbose |
A logical indicating if some "progress report" should be given. |
A list of search parameters and data of single sample record data by medium.
#Pull single records for BPA by medium bpa_sample_records <- get_single_sample_records_by_medium(Medium = 'surface water')#Pull single records for BPA by medium bpa_sample_records <- get_single_sample_records_by_medium(Medium = 'surface water')
Get Single Sample Records by medium via batch
get_single_sample_records_by_medium_batch( Medium = NULL, API_key = NULL, rate_limit = 0L, Server = "https://comptox.epa.gov/ctx-api/exposure", verbose = FALSE )get_single_sample_records_by_medium_batch( Medium = NULL, API_key = NULL, rate_limit = 0L, Server = "https://comptox.epa.gov/ctx-api/exposure", verbose = FALSE )
Medium |
The MMDB medium of exposure |
API_key |
The user-specific API key |
rate_limit |
Number of seconds to wait between each request |
Server |
The root address for the API endpoint |
verbose |
A logicial indicating if some "progress report" should be given. |
A list of data.frames containing single sample records data for each input medium.
# Retrieve single sample records data for 'surface water' and 'soil' get_single_sample_records_by_medium_batch(Medium = c('surface water', 'soil'))# Retrieve single sample records data for 'surface water' and 'soil' get_single_sample_records_by_medium_batch(Medium = c('surface water', 'soil'))
Get skin and eye hazard
get_skin_eye_hazard( DTXSID = NULL, API_key = NULL, Server = hazard_api_server, verbose = FALSE )get_skin_eye_hazard( DTXSID = NULL, API_key = NULL, Server = hazard_api_server, verbose = FALSE )
DTXSID |
The chemical identifier DTXSID |
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some “progress report” should be given. |
A data.frame containing skin and eye hazard data.
# Pull skin and eye hazard data for BPA bpa_skin_eye <- get_skin_eye_hazard_batch(DTXSID = 'DTXSID7020182')# Pull skin and eye hazard data for BPA bpa_skin_eye <- get_skin_eye_hazard_batch(DTXSID = 'DTXSID7020182')
Get skin and eye hazard batch
get_skin_eye_hazard_batch( DTXSID = NULL, API_key = NULL, rate_limit = 0L, Server = hazard_api_server, verbose = FALSE )get_skin_eye_hazard_batch( DTXSID = NULL, API_key = NULL, rate_limit = 0L, Server = hazard_api_server, verbose = FALSE )
DTXSID |
The chemical identifier DTXSIDs |
API_key |
The user-specific API key. |
rate_limit |
Number of seconds to wait between each request |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some “progress report” should be given. |
A named list of data.frames containing skin and eye hazard data for each input DTXSID.
# Pull skin eye hazard data for multiples chemicals dtxsid <- c('DTXSID7020182', 'DTXSID2021315') dtxsid_skin_eye_hazard <- get_skin_eye_hazard_batch(DTXSID = dtxsid)# Pull skin eye hazard data for multiples chemicals dtxsid <- c('DTXSID7020182', 'DTXSID2021315') dtxsid_skin_eye_hazard <- get_skin_eye_hazard_batch(DTXSID = dtxsid)
Get Smiles
get_smiles( name = NULL, API_key = NULL, Server = chemical_api_server, verbose = FALSE )get_smiles( name = NULL, API_key = NULL, Server = chemical_api_server, verbose = FALSE )
name |
Chemical name |
API_key |
The user-specific API key |
Server |
The root address for the API endpoint |
verbose |
A logical indicating if some “progress report” should be given. |
A string giving a SMILES string for the input chemical.
bpa_smiles <- get_smiles(name = "Bisphenol A")bpa_smiles <- get_smiles(name = "Bisphenol A")
A section of url used in Hazard API Endpoints
hazard_api_serverhazard_api_server
An object of class character of length 1.
This page contains documentation tools related to enabling CTX API services in R.
showing_key() ctxR_show_api_key() ctxR_hide_api_key() register_ctx_api_key(key, write = FALSE) ## S3 method for class 'ctx_credentials' print(...) ctx_key() has_ctx_key()showing_key() ctxR_show_api_key() ctxR_hide_api_key() register_ctx_api_key(key, write = FALSE) ## S3 method for class 'ctx_credentials' print(...) ctx_key() has_ctx_key()
key |
an API key |
write |
if TRUE, stores the secrets provided in the .Renviron file |
... |
a dumped formal argument to the generic print method |
To obtain an API key and enable services, go to https://www.epa.gov/comptox-tools/computational-toxicology-and-exposure-apis. This documentation shows you how to obtain an API key to allow access to the CTX APIs.
To tell ctxR about your API key, use register_ctx_api_key(), e.g.
register_ctx_api_key(key = 'grbwigbwoginrowgbwibgdibdvinrginiwgo') (that's a fake
key). This will set your API key for the current session, but if you restart
R, you'll need to do it again. You can set it permanently by setting write = TRUEm see the examples. If you set it permanently it will be stored in a
local file, and that will be accessed by ctxR persistently across
sessions.
Users should be aware that the API key, a string of garbled characters/numbers/symbols, is a PRIVATE key - it uniquely identifies and authenticates you to CTX's services. If anyone gets your API key, they can use it to masquerade as you to CTX. To mitigate against users inadvertently sharing their keys, by default ctxR never displays a user's key in messages displayed to the console.
Users should be aware that ctxR has no mechanism with which to safeguard the private key once registered with R. That is to say, once you register your API key, any R function will have access to it. As a consequence, ctxR will not know if another function, potentially from a compromised package, accesses the key and uploads it to a third party. For this reason, when using ctxR we recommend a heightened sense of security and self-awareness: only use trusted packages, do not save the API keys in script files, etc.
showing_key returns a Boolean.
ctxR_show_api_key() has no return value but has the side effect of
changing the display settings of the API key.
ctxR_hide_api_key() has no return value but has the side effect of
changing the display settings of the API key.
register_ctx_api_key() has no return value but has the side effect of
storing the API key.
print.ctx_credentials() has no return value and is an S3 method for
printing the ctx_credentials class.
ctx_key() returns a string, either the stored API key or
NA_character_.
has_ctx_key() returns a Boolean.
# Check if API key is showing showing_key() # Toggle API key to display ctxR_show_api_key() # Toggle API key to be hidden ctxR_hide_api_key() # Register key for this session register_ctx_api_key(key = 'YOUR API KEY') # Register key over sessions register_ctx_api_key(key = 'YOUR API KEY', write = TRUE) # Print function for ctx_credentials class print.ctx_credentials() # Display ctx API key ctx_key() # Check whether API key is registered has_ctx_key()# Check if API key is showing showing_key() # Toggle API key to display ctxR_show_api_key() # Toggle API key to be hidden ctxR_hide_api_key() # Register key for this session register_ctx_api_key(key = 'YOUR API KEY') # Register key over sessions register_ctx_api_key(key = 'YOUR API KEY', write = TRUE) # Print function for ctx_credentials class print.ctx_credentials() # Display ctx API key ctx_key() # Check whether API key is registered has_ctx_key()