This function queries the Comparative Toxicogenomics Database API to retrieve tetramer data based on chemicals, diseases, genes, or other categories.
Usage
extr_tetramer(
chem,
disease = "",
gene = "",
go = "",
input_term_search_type = "directAssociations",
qt_match_type = "equals",
verify_ssl = FALSE,
...
)
Arguments
- chem
A string indicating the chemical identifiers such as CAS number or IUPAC name of the chemical.
- disease
A string indicating a disease term. Default is an empty string.
- gene
A string indicating a gene symbol. Default is an empty string.
- go
A string indicating a Gene Ontology term. Default is an empty string.
- input_term_search_type
A string specifying the search method to use. Options are "hierarchicalAssociations" or "directAssociations". Default is "directAssociations".
- qt_match_type
A string specifying the query type match method. Options are "equals" or "contains". Default is "equals".
- verify_ssl
Boolean to control if SSL should be verified or not. Default is FALSE.
- ...
Any other arguments to be supplied to
req_option
and thus tolibcurl
.
References
Comparative Toxicogenomics Database: http://ctdbase.org
Davis, A. P., Grondin, C. J., Johnson, R. J., Sciaky, D., McMorran, R., Wiegers, T. C., & Mattingly, C. J. (2019). The Comparative Toxicogenomics Database: update 2019. Nucleic acids research, 47(D1), D948–D954. doi:10.1093/nar/gky868
Davis, A. P., Wiegers, T. C., Wiegers, J., Wyatt, B., Johnson, R. J., Sciaky, D., Barkalow, F., Strong, M., Planchart, A., & Mattingly, C. J. (2023). CTD tetramers: A new online tool that computationally links curated chemicals, genes, phenotypes, and diseases to inform molecular mechanisms for environmental health. Toxicological Sciences, 195(2), 155–168. doi:10.1093/toxsci/kfad069
Examples
# \donttest{
tetramer_data <- extr_tetramer(
chem = c("50-00-0", "ethanol"),
disease = "",
gene = "",
go = "",
input_term_search_type = "directAssociations",
qt_match_type = "equals"
)
#> Sending request to CTD database for tetramer data for 50-00-0...
#> Request succeeded with status code: 200
#> Sending request to CTD database for tetramer data for ethanol...
#> Request succeeded with status code: 200
str(tetramer_data)
#> 'data.frame': 50073 obs. of 9 variables:
#> $ query : chr "50-00-0" "50-00-0" "50-00-0" "50-00-0" ...
#> $ chemical : chr "Formaldehyde" "Formaldehyde" "Formaldehyde" "Formaldehyde" ...
#> $ chemical_id : chr "D005557" "D005557" "D005557" "D005557" ...
#> $ gene : chr "PTEN" "PTEN" "NLGN4X" "PTEN" ...
#> $ gene_id : int 5728 5728 57502 5728 5728 7846 1813 23657 5728 1813 ...
#> $ phenotype : chr "adult behavior" "adult behavior" "adult behavior" "adult behavior" ...
#> $ phenotype_id: chr "GO:0030534" "GO:0030534" "GO:0030534" "GO:0030534" ...
#> $ disease : chr "Adenocarcinoma" "Asthma" "Autistic Disorder" "Autistic Disorder" ...
#> $ disease_id : chr "D000230" "D001249" "D001321" "D001321" ...
# }