| Title: | Interface with the 'ClinicalOmicsDB' API, Allowing for Easy Data Downloading and Importing |
| Version: | 1.0.5 |
| Description: | Provides an interface to the 'ClinicalOmicsDB' API, allowing for easy data downloading and importing. 'ClinicalOmicsDB' is a database of clinical and 'omics' data from cancer patients. The database is accessible at http://trials.linkedomics.org. |
| License: | MIT + file LICENSE |
| Encoding: | UTF-8 |
| RoxygenNote: | 7.3.1 |
| Imports: | httr2, R6, dplyr, utils, jsonlite |
| BugReports: | https://github.com/bzhanglab/clinicalomicsdbR/issues |
| URL: | https://github.com/bzhanglab/clinicalomicsdbR |
| NeedsCompilation: | no |
| Packaged: | 2024-06-25 14:56:04 UTC; zhanglab |
| Author: | John Elizarraras [aut, cre, ctb] |
| Maintainer: | John Elizarraras <john.elizarraras@bcm.edu> |
| Repository: | CRAN |
| Date/Publication: | 2024-06-26 12:50:05 UTC |
clinicalomicsdbR object
Description
clinicalomicsdbR object
clinicalomicsdbR object
Value
Returns a new clinicalomicsdbR object
Public fields
hostnameThe url of the API to connect to. Only change if you are using a custom service.
study_listThe list of all the studies that are a result of filtering.
verbosityThe level of messages wanted for downloads (defaults to 0: No Output). Follows httr2 documentatation for
req_perform
Methods
Public methods
Method filter()
filter objects according to the specified drugs and cancers
Usage
clinicalomicsdbR$filter(drugs = c(), cancers = c())
Arguments
drugslist or vector containing drugs that studies need to contain at least one of
cancerslist of vector of cancer types to consider. Leave empty to consider all cancer types
Returns
new clinicalomicsdbR object with the filtered results in $study_list
Method get_download_url()
Get download url for a study at specified study_id
Usage
clinicalomicsdbR$get_download_url(study_id)
Arguments
study_idString of the ID of the study to get the download url of
Returns
String of the download url
Method download()
Download all files of the studies in self$study_list. Use filter function first
Usage
clinicalomicsdbR$download(output_dir)
Arguments
output_dirDirectory to download files to.
Returns
unmodifed clinicalomicsdbR object
Method download_from_id()
Download all file from study_id into output_dir directory
Usage
clinicalomicsdbR$download_from_id(study_id)
Arguments
study_idString containing the ID of the study to download
output_dirDirectory to download files to.
Returns
unmodifed clinicalomicsdbR object
Method dataframe()
Get all files of the studies in self$study_list and load into data frame. Use filter function first.
Usage
clinicalomicsdbR$dataframe()
Returns
list with study_list element to display all studies and list df with each dataframe in the list
Method dataframe_from_id()
Get file from study_id and convert into dataframe.
Usage
clinicalomicsdbR$dataframe_from_id(study_id)
Arguments
study_idString containing the ID of the study to get dataframe of
Returns
data frame containing data of study
Method clone()
The objects of this class are cloneable with this method.
Usage
clinicalomicsdbR$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
Examples
clinicalomicsdbR$new()$filter(drugs = c("ipilimumab", "rituximab"))$study_list # downloads all files