The genesysr
R package provides functions for
authentication with Genesys and functions to fetch accession data from
https://www.genesys-pgr.org database.
Note: See NEWS.md
::install_git('https://gitlab.croptrust.org/genesys-pgr/genesysr') devtools
genesysr
library('genesysr')
# www.genesys-pgr.org
::setup_production()
genesysr
# or sandbox.genesys-pgr.org
::setup_sandbox()
genesysr
# or custom
::setup(server = "http://localhost:8080",
genesysrclient_id = "...", client_secret = "...")
The package is configured with default Genesys R client credentials that require user authentication:
# Setup
::setup_production()
genesysr
# Open Genesys web page in browser and get verifier code
::user_login() genesysr
Accessing Genesys without user interaction requires that a client is registered on Genesys with client credentials grant. Contact helpdesk@genesys-pgr.org for assistance.
# Setup
library('genesysr')
::setup(server = "https://api.genesys-pgr.org",
genesysrclient_id = "someId.....@www.genesys-pgr.org",
client_secret = "your-private-secret")
# Obtain access tokens
::client_login() genesysr
<- mcpd_filter(ORIGCTY = c("DEU", "SVN"))
filters <- genesysr::get_accessions(filters)
accessions
# Sort columns, hand-pick first few columns
require(data.table)
setcolorder(accessions, unique(c("id", "instituteCode", "accessionNumber", "taxonomy.genus", sort(names(accessions)))))