clue: clue

Description Usage Arguments Value Examples

Description

Wrapper for clue.io REST calls

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
clue(x, endpoint = c("sigs", "cells", "genes", "perts", "plates",
  "profiles", "rep_drugs", "rep_drug_indications", "pcls"), fields = "",
  where_clause = NULL, ids = NULL, limit = 0, count = FALSE,
  unpack_sigs = TRUE, poscon = c("omit", "keep"), cl = NULL,
  verbose = FALSE)

## S4 method for signature 'Slinky'
clue(x, endpoint = c("sigs", "cells", "genes",
  "perts", "plates", "profiles", "rep_drugs", "rep_drug_indications",
  "pcls"), fields = "", where_clause = NULL, ids = NULL, limit = 0,
  count = FALSE, unpack_sigs = TRUE, poscon = c("omit", "keep"),
  cl = NULL, verbose = FALSE)

Arguments

x

a Slinky Object

endpoint

The endpoint to query. Default is 'sigs'.

fields

Optional vector of fields to return.

where_clause

Optional where_clause clause. Must be named list (e.g. list(field='value')

ids

Optional vector of ids to fetch for sigs or profiles endpoints. Should not be used together with where_clause or count.

limit

Optional limit to number of instances (samples to return

count

Should we just return the count of intances satisfying the query rather than the data? Default is FALSE.

unpack_sigs

The sigs endpoint returns multiple distil_ids per row. Should we unpack these to one per row?

poscon

Instances of type trt_poscon are recoded as trt_cp in clue.io's sigs endpoint. This can lead to unexpected results downstream. To keep these instances, specify poscon='keep'

cl

Optional cluster object to parallelize this operation. If verbose is TRUE, use this pattern in order for progress bar to update: cl <- parallel::makeCluster(4, outfile=\"\")

verbose

Do you want to know how things are going? Default is false.

Value

Data returned by Slinky.api as a data.frame

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# for build/demo only.  You MUST use your own key when using the slinky
# package.
user_key <- httr::content(httr::GET('https://api.clue.io/temp_api_key'),
                          as='parsed')$user_key
sl <- Slinky(user_key,
                 system.file('extdata', 'demo.gctx',
                      package='slinky'),
                 system.file('extdata', 'demo_inst_info.txt',
                     package = 'slinky'))
amox <- clue(sl, where_clause = list("pert_iname" = "amoxicillin", 
                                    "cell_id" = "MCF7",
                                    "is_gold" = TRUE))

VanAndelInstitute/slinky documentation built on Aug. 20, 2021, 1:05 p.m.