MetaboLights is a database for metabolomics experiments and associated information. The database allows users to deposit raw data, sample information, analysis protocols and metabolite annotation data.
metabolighteR provides easy access to publicly available MetaboLights
studies via the MetaboLights RESTful API. Only API methods
which retrieve data (GET) are supported by
metabolighteR.
metabolighteR can be installed from CRAN or, for the latest
development version, directly from GitHub using the remotes
package.
install.packages('metabolighteR')
remotes::install_github('aberHRML/metabolighteR')
library(metabolighteR)The repository queries below are shown for reference and are not executed when the vignette is built.
A list of all public study identification codes can be easily retrieved.
Generate a summary table containing; Study ID, Study Title and Study Technology, for publicly available studies.
# For the first five studies
study_titles <- purrr::map(studies[1:5], get_study_title)
names(study_titles) <- studies[1:5]
study_titles <- tibble::as_tibble(study_titles) %>% tidyr::gather()
names(study_titles) <- c('STUDY', 'Title')
study_tech <- get_study_tech()
study_tech_filter <- study_tech %>% dplyr::filter(STUDY %in% studies[1:5])
StudyInfoTable <-
dplyr::left_join(study_titles, study_tech_filter, by = 'STUDY')A list of all available files can be generated using the
get_study_files function.
The contents of these files can then be downloaded using the
download_file function.