conform: (Re)-map geneset IDs to the rows in an expression object.

Description Usage Arguments Value Related Functions Examples

Description

conform-ing, a GeneSetDb to a target expression object is an important step required prior to perform any type of GSEA. This function maps the featureIds used in the GeneSetDb to the elements of a target expression object (ie. the rows of an expression matrix, or the elements of a vector of gene-level statistics).

After conform-ation, each geneset in the GeneSetDb is flagged as active (or inactive) given the number of its features that are successfully mapped to target and the minimum and maximum number of genes per geneset required as specified by the min.gs.size and max.gs.size parameters, respectively.

Only genesets that are marked with active = TRUE will be used in any downstream gene set operations.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
conform(x, ...)

unconform(x, ...)

## S4 method for signature 'GeneSetDb'
conform(
  x,
  target,
  unique.by = c("none", "mean", "var"),
  min.gs.size = 2L,
  max.gs.size = Inf,
  match.tolerance = 0.25,
  ...
)

## S4 method for signature 'GeneSetDb'
unconform(x, ...)

is.conformed(x, to)

Arguments

x

The GeneSetDb

...

moar args

target

The expression object/matrix to conform to. This could also just be a character vector of IDs.

unique.by

If there are multiple rows that map to the identifiers used in the genesets, this is a means to pick the single row for that ID

min.gs.size

Ensure that the genesets that make their way to the GeneSetDb@table are of a minimum size

max.gs.size

Ensure that the genesets that make their way to the GeneSetDb@table are smaller than this size

match.tolerance

Numeric value between [0,1]. If the fraction of feature_ids used in x that match rownames(y) is below this number, a warning will be fired.

Value

A GeneSetDb() that has been matched/conformed to an expression object target y.

Related Functions

Examples

1
2
3
4
5
6
7
es <- exampleExpressionSet()
gdb <- exampleGeneSetDb()
head(geneSets(gdb))
gdb <- conform(gdb, es)
## Note the updated values `active` flag, and n (the number of features
## mapped per gene set)
head(geneSets(gdb))

lianos/multiGSEA documentation built on Nov. 17, 2020, 1:26 p.m.