gor_query: Run a GOR query

View source: R/gor_query.R

gor_queryR Documentation

Run a GOR query

Description

Run a GOR query

Usage

gor_query(
  query,
  conn,
  timeout = 0,
  page_size = 1e+05,
  parse = T,
  relations = NULL,
  persist = NULL,
  query.service = "queryserver"
)

Arguments

query

gor query string

conn

gor connection structure, create it using platform_connect

timeout

timeout in seconds, default to 0 (none), uses setTimeLimit to interrupt, note that setting any limit has a small overhead – well under 1% on the systems measured.

page_size

large results are returned in paged responses, this parameter controls the page size (e.g. 1000 lines at a time), default is 100k. A value of 0 means everything is fetched in one request

parse

should the TSV output be parsed into a dataframe? False will make the function return the results as text object

relations

list of tables to upload and make available in the query, e.g. list(cars = cars, letters = data.frame(letter = letters)), refer to them in the query using [] around their names, e.g. nor -h [cars]

persist

remote path to file for saving results of the query into. Query results will not be fetched if this parameter is set.

query.service

query service to use - either 'queryservice' (old) or 'queryserver' (new). Default: queryservice

Value

data.frame of gor results, i.e. gor results are passed to read_tsv

Examples

## Not run: 
api_key <- Sys.getenv("GOR_API_KEY")
project <- Sys.getenv("GOR_PROJECT")
conn <- platform_connect(api_key, project)
"gor #dbsnp# | top 100" %>%
    gor_query(conn)

## End(Not run)

wuxi-nextcode/gorr documentation built on Jan. 1, 2023, 7:54 a.m.