ga4gh_client: GA4GH Client

Description Usage Arguments Value Examples

Description

'ga4gh_client' creates an object with class ga4gh_client that you can use to call the API specified by the arguments in the function. This is so you can query an API multiple times without having to worry about where it is every time. You can also set some defaults for the client to determine how responses from the client typically behave. Creating these objects also makes it easier to query multiple servers with similar requests.

Usage

1
2
ga4gh_client(server, port = NULL, api_location = "/ga4gh", log_level = 0,
  authentication_key = "", page_size = 10)

Arguments

server

The URL of the GA4GH server

port

The port number the GA4GH server is running on

api_location

A string to suffix to the server giving the location of the API on the server. By default this is "/ga4gh" i.e. the API is at http(s)://IP_ADDRESS/ga4gh

log_level

The amount of debugging information to log

authentication_key

The authentication key provided by the server after logging in

page_size

The default number of results for the client to return for paged responses

Value

An object with class ga4ghClient

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Create a client for the reference server at http://1kgenomes.ga4gh.org
ref_client <- ga4gh_client("http://1kgenomes.ga4gh.org", api_location = "")

## Not run: 
## Use this client as the first argument in the high-level API functions

## Search for datasets in this server
library(magrittr)
datasets <- ref_client %>% search_datasets() %>% content()

## or specify the api location in the search function
search_datasets("http://1kgenomes.ga4gh.org")

## End(Not run)

Rga4gh documentation built on May 1, 2019, 6:35 p.m.