This repository has been archived by the owner on Jun 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME.rmd
87 lines (59 loc) · 2.83 KB
/
README.rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
---
output: github_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(dplyr)
devtools::load_all()
```
# Gemma API <img src="gemmaAPI.png" align="right" height="100px"/>
Table of Contents
=================
* [Installation](#installation)
* [Documentation](#documentation)
* [Examples](#examples)
* [Changelog](#changelog)
*
Deprecated in favour of [gemma.R](https://github.com/PavlidisLab/gemma.R)
This is an R wrapper for [Gemma](http://www.chibi.ubc.ca/Gemma/home.html)'s restful [API](http://www.chibi.ubc.ca/Gemma/resources/restapidocs/).
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.](http://dx.doi.org/doi:10.1093/bioinformatics/bts430)
# Installation
```
devtools::install_github('PavlidisLab/gemmaAPI.R')
```
# Documentation
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.
# Examples
Download data for a dataset
```{r}
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.
```{r}
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
```{r,eval=FALSE}
studyIDs %>% sapply(function(x){datasetInfo(x,request= 'data',return= FALSE, file = paste0('data/',x))})
```
# Changelog
**17 September 2018:**
* Start writing changelog...
* `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.
* endpoint functions are fine if their naming variable is NULL. For most cases this shouldn't happen but names are for interactive usage and should not be relied on.
* Started using proper semantic versioning
* TOC added to readme