Getting Started with omicidxClientR

Install the dependencies

install.packages("jsonlite")
install.packages("httr")
install.packages("base64enc")

To install directly from Github, use devtools:

install.packages("devtools")
library(devtools)
install_github("sdgamboa/omicidxClientR")
library(dplyr)

Create a client object (api):

basePath <- "https://api.omicidx.cancerdatasci.org"
client <-  ApiClient$new(basePath = basePath)
api <-  SRAApi$new(apiClient = client)

Example 1:

result1 <- api$RunsForStudySraStudiesAccessionRunsGet(accession = "SRP114847", size = 10)
df1 <- result1$hits

Example 2:

result2 <- api$StudiesSraStudiesGet()
hit_list <- result2$toJSON()$hits
df2 <- bind_rows(hit_list)


sdgamboa/omicidxClientR documentation built on Dec. 22, 2021, 11:12 p.m.