Description Usage Arguments Value Examples
Convert data from gctx file to SummarizedExperiment, pulling metadata
from various sources. Specifying the subset of data you want can be
done is various ways. The simplest example is
with explicit subsetting
(e.g. data <- loadL1K(sl[1:978, 1:10])
, which is equivalent to
data <- as(sl[1:978, 1:10], "SummarizedExperiment")
). However,
more sophisticated data loading can be achieved, for example by
specifing a specific perturbagen (pert
), or even an explicit
where_clause
which will be passed directly to the clue.io API.
Thus, this function supports users with varying degrees of familiarity
with the structure and content of the L1000 metadata. All arguments
are optional.
1 2 3 4 5 6 7 8 9 10 | loadL1K(x, ids = character(), pert = character(),
cell_line = character(), type = NULL, where_clause = character(),
gold = TRUE, inferred = TRUE, fields = character(),
controls = FALSE, cl = NULL, verbose = FALSE)
## S4 method for signature 'Slinky'
loadL1K(x, ids = character(), pert = character(),
cell_line = character(), type = NULL, where_clause = character(),
gold = FALSE, inferred = TRUE, fields = character(),
controls = FALSE, cl = NULL, verbose = FALSE)
|
x |
A slinky object |
ids |
distil_ids to include in the Expression Set. |
pert |
name (pert_iname) of perturbation for which data is desired.
Supercedes value for |
cell_line |
name (cell_id) of cell line for which data is desired.
Supercedes value for |
type |
Optional type (pert_type) of perturbation for which data is desired,
should be one of |
where_clause |
Rather than specifying above terms, an explicit where_clause may be provided to identify the data to be loaded from the gctx file. This will be passed directly the the /pert endpoint of the clue.io API, and full documentation of the query options can be reviewed at the above link. |
gold |
Should we limit to instances classified as "gold" by the L1000
project (by virtue of their low inter-replicate variability)? Default
is |
inferred |
Should the inferred (non-landmark) genes be included in the analysis? Default is TRUE. Ignored if index is specified. |
fields |
Fields to include in the expression set's phenodata. Default is all available. |
controls |
Should same-plate controls be identified and included? Default is FALSE. |
cl |
Optional cluster object to speed up data retrieval from clue.io. Please use caution...a large cluster might produce requests to the API at an obnoxious rate. |
verbose |
Do you want to know how things are going? Default is FALSE |
Object of type
SummarizedExperiment
containing
expression and meta data.
#' @name loadL1K
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # 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")
ids.ctrl <- controls(sl, ids = amox_gold)$distil_id
amox_and_control <- loadL1K(sl, ids = c(amox_gold,
ids.ctrl))
str(SummarizedExperiment::assays(amox_and_control)[[1]])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.