Learn R Programming

gCMAP (version 1.16.0)

connectivity_score: Broad CMAP gene set enrichment metrics

Description

A method for computing Broad CMAP connectivity scores, as described in the reference below. Supporting functions used for computation are also described.

Usage

"connectivity_score"(experiment, query, element="z", keep.scores=FALSE)
"connectivity_score"(experiment, query, ...)
"connectivity_score"(experiment, query, ...)
"connectivity_score"(experiment, query, ...)
"connectivity_score"(experiment, query, ...)
"connectivity_score"(experiment, query,...)
"connectivity_score"(experiment, query, ...)

Arguments

experiment
An eSet or matrix object to query.
query
A CMAPCollection, SignedGeneSet, or GeneSetCollection object containing signed gene sets with which to query the experiment object.
element
Character string specifying which element of a multi-channel eSet to access for determining tag rank?
keep.scores
Logical: keep gene-level scores for all gene sets (Default: TRUE) ? The size of the generated CMAPResults object increases with the number of contained gene sets. For very large collections, consider setting this parameter to 'FALSE' to conserve memory.
...
Additional arguments passed on to downstream functions.

Value

connectivity_score
For the SignedGeneSet method, a vector of s scores, one per instance in experiment. For the GeneSetCollection method, a matrix, with one row per instance in experiment and one column per query set.
ks
A signed Kolmogorov-Smirnov type statistic based on the position of the ranks V in the vector 1:n.
s
A difference of ks values for V_up vs. V_down, or 0 if both yield the same sign.
S
A vector of signed, rescaled scores. After rescaling, 1 corresponds to the maximum positive s score, and -1, to the minimum negative s score. S is typically used to produce the red-grey-green instance heat maps from the reference below.

References

Lamb, J. et al. (2006). The Connectivity Map: using gene-expression signatures to connect small molecules, genes, and disease. Science 313:1929. Notation for ks, s, and S closely follows the Supporting Online Material there.

Examples

Run this code
data(gCMAPData)

  ## induce CMAPCollection from z-scores
  sets <- induceCMAPCollection(gCMAPData, "z", lower=-3, higher=3)

  ## Broad CMAP KS scoring: one z-score column
  connectivity_score(gCMAPData[,1], sets, element="z")

  ## multiple z-score columns, results are returned as a list
  connectivity_score(gCMAPData, sets)

Run the code above in your browser using DataLab