clueInstances: clueInstances

Description Usage Arguments Value Examples

Description

Convenience wrapper to query function to retrieve instance ids meeting specified criteria.

Usage

1
2
3
4
5
6
clueInstances(x, where_clause = NULL, verbose = FALSE,
  poscon = c("omit", "keep"))

## S4 method for signature 'Slinky'
clueInstances(x, where_clause = NULL,
  verbose = FALSE, poscon = c("omit", "keep"))

Arguments

x

a Slinky Object

where_clause

Filter terms, as a list of terms, e.g. list(pert_type='trt_cp', 'is_gold'=TRUE). Terms will be joined by AND logic.

verbose

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

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'

Value

Vector of ids matching criteria. This is a convenience wrapper to the signature API which queries clue.io and unwraps response.

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_ids <- clueInstances(sl, where_clause = list("pert_iname" = "amoxicillin", 
                                    "cell_id" = "MCF7",
                                    "is_gold" = TRUE))

slinky documentation built on Nov. 8, 2020, 10:58 p.m.