rzs {slinky} | R Documentation |
Convert each sample in treat
to robust zscore.
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, ...)
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. |
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 |
verbose |
Do you want to know how things are going? Default is FALSE. |
... |
Additional arguments for |
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.
#' # 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)