rzs: rzs

Description Usage Arguments Value Examples

Description

Convert each sample in treat to robust zscore.

Usage

1
2
3
4
5
6
7
rzs(x, treat, control = "auto", where_clause = list(), gold = TRUE,
  inferred = TRUE, byplate = TRUE, verbose = FALSE, ...)

## S4 method for signature 'Slinky'
rzs(x, treat, control = "auto",
  where_clause = list(), gold = TRUE, inferred = TRUE,
  byplate = TRUE, verbose = FALSE, ...)

Arguments

x

An object of class Slinky

treat

A SummarizedExperiment containing the treated samples, or the pert_iname of desired perturbagen. See details.

control

An SummarizedExperiment containing the control samples, or the pert_iname of desired controls. Default is 'auto'. See details.

where_clause

If treat is a pert_iname, further query terms may be specified here (e.g. pert_type=\"trt_sh\").

gold

Restrict analysis to gold instances as defined by LINCS. Ignored if treat and control are SummarizedExperiments.

inferred

Should the inferred (non-landmark) genes be included in the analysis? Default is TRUE.

byplate

Do you want to split the scores by plate? This is usually wise, unless you have already subsetted treat and control samples in such a way that plate can safely be ignored, or if treat and control must come from different plates for some reason. Default is TRUE.

verbose

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

...

Additional arguments for method.

Value

Matrix of zscore of same dimension as treat (or the expression matrix resulting from querying for treat if a pert_iname is specified). This function identifes same-plate controls for each treated sample, then converts each treated sample to robust z-score by subtracting the median control values and dividing by the (scaled) median absolute deviations.

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'))
scores <- rzs(sl, "amoxicillin")
head(scores)

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