https://github.com/statgen/encore-client-r
An R package to interact with the Encore analysis server
https://github.com/statgen/encore-client-r
Last synced: 5 months ago
JSON representation
An R package to interact with the Encore analysis server
- Host: GitHub
- URL: https://github.com/statgen/encore-client-r
- Owner: statgen
- Created: 2021-03-13T04:24:25.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-02-28T18:47:31.000Z (over 2 years ago)
- Last Synced: 2025-01-13T00:47:19.321Z (over 1 year ago)
- Language: R
- Size: 36.1 KB
- Stars: 2
- Watchers: 8
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Encore-client-R
[](https://www.tidyverse.org/lifecycle/#experimental)
This is an R package that allows you to programmatically interact with the [Encore analysis server](https://encore.sph.umich.edu/).
Note that this is a preliminary release. Functions
may change overtime and you should not write too much
code that depends on these behaviors just yet.
Currently most functions focus on interacting with existing jobs
rather than creating new ones.
## Installation
You can install the development version of this package with:
``` r
remotes::install_github("statgen/encore-client-r")
```
## Example
In order to interact with Encore, you will need to
supply an Encore API access token. You can create
one of those at https://encore.sph.umich.edu/me/api-token
``` r
library(encore)
# First, set your access token
# If you are using RStudio, run this and enter your token in the popup
set_access_token()
# Another option is to set an ENCORE_API_TOKEN environment variable.
# This can be done at the command line before launching R or you
# can set this value in a .Renviron file.
#
# Finally you can also choose to pass your token as a string
# (but make sure not to share your token with others if you share
# your scripts).
#
# Note your actual token will be much longer; this it not a valid token
set_access_token("eyJhbGciOi9.eyJuYW1lIjoiRW5.e30XBiuDHBYDxSLT")
# After you set your token, you can interact with your job data
my_jobs <- get_jobs()
last_job <- head(my_jobs, 1)
plot_manhattan(last_job)
download_job_output(last_job)
```