Slinky-class: An S4 class for working with LINCS data

Description Usage Arguments Value Slots Examples

Description

The Slinky class encapsulates details about location of the LINCS L1000 data files as well as access credentials for the clue.io API (if desired). It provides methods for querying and loading data from these resources. The helper function Slinky is a simpler way to construct an object of this class

Usage

1
2
Slinky(user_key = character(), gctx = character(),
  info = character())

Arguments

user_key

clue.io API key

gctx

gctx containing expression data (optional)

info

info file containing metadata (optional)

Value

A Slinky object.

Slots

.index

internal slot for mapping object to file data

base

Base url for clue.io API.

gctx

gctx containing expression data (optional)

info

info file containing metadata (optional)

metadata

internal slot for storing metadata from info file, mapped to gctx file and current index.

user_key

clue.io API key (required unless CLUE_API_KEY env variable is set)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# 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_gold <- clueInstances(sl, where_clause = list('pert_type' = 'trt_cp',
                 'pert_iname' = 'amoxicillin',
                 'cell_id' = 'MCF7',
                 'is_gold' = TRUE), poscon = 'omit')
amox_gold_sumexp <- loadL1K(sl, ids = amox_gold)

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