connectivity_score-methods: Broad CMAP gene set enrichment metrics

Description Usage Arguments Value Note References Examples

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## S4 method for signature 'eSet,CMAPCollection'
connectivity_score(experiment, query, element="z", keep.scores=FALSE)

## S4 method for signature 'matrix,CMAPCollection'
connectivity_score(experiment, query, ...)

## S4 method for signature 'eSet,SignedGeneSet'
connectivity_score(experiment, query, ...)

## S4 method for signature 'matrix,SignedGeneSet'
connectivity_score(experiment, query, ...)

## S4 method for signature 'eSet,GeneSetCollection'
connectivity_score(experiment, query,
...)

## S4 method for signature 'matrix,GeneSetCollection'
connectivity_score(experiment, query,...)

## S4 method for signature 'ANY,GeneSet'
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.

Note

Note that as defined by Lamb et al., ks is not symmetric. For n = 100, for example, ks(1,100) is .99 while ks(100,100 is -1. A further consequence of the Lamb et al. definitions is that the maximum possible score for a perfect positive match depends on query set size. See the example below. Although these properties are not desirable, the intention here is to exactly reproduce the Lamb et al. statistic.

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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)

gCMAP documentation built on April 29, 2020, 3:54 a.m.