conversion {sparrow}R Documentation

Convert a GeneSetDb to other formats.

Description

As awesome as a GeneSetDb is, you might find a time when you'll need your gene set information in an other format. To do that, we provide the following functions:

Usage

## S3 method for class 'GeneSetDb'
as.data.table(
  x,
  keep.rownames = FALSE,
  value = c("feature_id", "x.id", "x.idx"),
  active.only = is.conformed(x),
  ...
)

## S3 method for class 'GeneSetDb'
as.data.frame(
  x,
  row.names = NULL,
  optional = NULL,
  value = c("feature_id", "x.id", "x.idx"),
  active.only = is.conformed(x),
  ...
)

Arguments

x

A GeneSetDb object

keep.rownames

included here just for consistency with data.table::as.data.table, but it is not used

value

The value type to export for the feature ids, defaults to "feature_id".

active.only

If the GeneSetDb is conformed, do you want to only return the features and genests that match target and are "active"?

...

pass through arguments (not used)

row.names, optional

included here for consistency with as.data.frame generic function definition, but these are not used.

Details

The as.* functions accept a value parameter which indicates the type of IDs you want to export in the conversion:

Value

a converted GeneSetDb

Functions

Examples

es <- exampleExpressionSet()
gdb <- conform(exampleGeneSetDb(), es)
bs <- as(gdb, "BiocSet")
gdf <- as.data.frame(gdb)
gdb <- conform(gdb, es)
gdfi <- as.data.frame(gdb, value = 'x.idx')
gdl <- as.list(gdb)

[Package sparrow version 0.99.6 Index]