featureIds: Returns the relevant featureIds for a given geneset.

Description Usage Arguments Value Examples

Description

Gene sets are defined by the unique compound key consisting of their collection and name. To fetch the featureIds associated with a specific geneset, you must provide values for i and j. If these are missing, then a character vector of all the unique feature ids within x are returned.

If the GeneSetDb x has been conformed to an expression object this will default to return only the feature_id's that are matched to the target expression object, and they will be returned using the same identifiers that the target expression object uses. To change this behavior, tweak the values for the active.only and value parameters, respectively.

x can be either a GeneSetDb or a MultiGSEAResult. If its the latter, then this call simply delegates to the internal GeneSetDb.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
featureIds(
  x,
  i,
  j,
  value = c("feature_id", "x.id", "x.idx"),
  active.only = is.conformed(x),
  ...
)

## S4 method for signature 'GeneSetDb'
featureIds(
  x,
  i,
  j,
  value = c("feature_id", "x.id", "x.idx"),
  active.only = is.conformed(x),
  ...
)

## S4 method for signature 'MultiGSEAResult'
featureIds(
  x,
  i,
  j,
  value = c("feature_id", "x.id", "x.idx"),
  active.only = TRUE,
  ...
)

Arguments

x

Object to retrieve the gene set from, either a GeneSetDb or a MultiGSEAResult.

i, j

The collection,name compound key identifier of the gene set

value

What form do you want the id's in?

  • "feature_id": the IDs used in the original geneset definitions

  • "x.id": the ids of the features as they are used in the expression object.

  • "x.idx": The integer index into the expresion object x that the 'GeneSetDb“ has been conformed to.

active.only

only look for gene sets that are "active"? Defaults to TRUE if x is conformed to a target expression object, else FALSE. conform() for further details.

Value

A vector of identifiers (or indexes into an expression object, depending on the value argument) for the features in the specified geneset. NA is returned if the geneset is not "active" (ie. listed in geneSets())

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
gdb <- exampleGeneSetDb()
fids.gs <- featureIds(gdb, 'c2', 'BIOCARTA_AGPCR_PATHWAY')
fids.c2 <- featureIds(gdb, 'c2')
fids.all <- featureIds(gdb)

vm <- exampleExpressionSet(do.voom=TRUE)
gdb <- conform(gdb, vm)
## fewer than before
fids.gs2 <- featureIds(gdb, 'c2', 'BIOCARTA_AGPCR_PATHWAY')
## same as before
fids.gs3 <- featureIds(gdb, 'c2', 'BIOCARTA_AGPCR_PATHWAY', active.only=FALSE)
## returned as row indices into vm
fids.idxs <- featureIds(gdb, 'c2', value='x.idx')

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