Slinky-class {slinky}R Documentation

An S4 class for working with LINCS data

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

The Slinky() constructor returns a slinky object with defaults set where required. To access the clue.io API, you must either provide your key as the value for the arguemtn user_key, or set the CLUE_API_KEY environment variable prior to starting your R session. If no clue.io API access is required, simply specify user_key = "". If info is not specified, it will be assumed that the file GSE92742_Broad_LINCS_inst_info.txt.gz is present in the working directory.

Usage

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


# 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)


[Package slinky version 1.2.0 Index]