knitr::opts_chunk$set(echo = TRUE) library(dplyr) devtools::load_all()
This is an R wrapper for Gemma's restful API.
To cite Gemma, please use: Zoubarev, A., et al., Gemma: A resource for the re-use, sharing and meta-analysis of expression profiling data. Bioinformatics, 2012.
devtools::install_github('PavlidisLab/gemmaAPI.R')
For basic api calls see ?endpointFunctions
. These functions return mostly unaltered data from a given API endpoint.
For high level functions see ?highLevelFunctions
. These functions return data compiled from multiple api calls.
Download data for a dataset
data = datasetInfo('GSE107999', request='data', # we want this endpoint to return data. see documentation filter = FALSE, # data request accepts filter argument we want non filtered data return = TRUE, # TRUE by default, all functions have this. if false there'll be no return file = NULL # NULL by default, all functions have this. If specificed, output will be saved. ) head(data) %>% knitr::kable(format ='markdown')
Get metadata for first 10 mouse studies.
mouseStudies = taxonInfo('mouse',request = 'datasets',limit = 0) studyIDs = mouseStudies %>% purrr::map_int('id') mouseMetadata = studyIDs[1:10] %>% lapply(compileMetadata,outputType = 'list') # default outputType is data.frame, which returns a single data frame with study and sample data all together. mouseMetadata[[1]]$sampleData %>% head %>% knitr::kable(format ='markdown')
Download expression data a study
studyIDs %>% sapply(function(x){datasetInfo(x,request= 'data',return= FALSE, file = paste0('data/',x))})
17 September 2018:
compileMetadata
function now returns all quality information in geeq. Existing columnames for batch effect information has been altered to better explain what they are.compileMetadata
now returns a list instead of a data frame for experiment specific information if the desired output is a list.Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.