addGeneSetMetadata {sparrow} | R Documentation

## Add metadata at the geneset level.

### Description

This function adds/updates columns entries in the `geneSets(gdb)` table. If there already are defined meta values for the columns of `meta` in `x`, these will be updated with the values in `meta`.

### Usage

    addGeneSetMetadata(x, meta, ...)

### Arguments

`x` | a `GeneSetDb` object
`meta` | a `data.frame`-like object with `"collection"`, `"name"`, and an arbitrary amount of columns to add as metadata for the genesets.
`...` | not used yet

### Details

TODO: should this be a setReplaceMethod, Issue #13 (?) https://github.com/lianos/multiGSEA/issues/13

### Value

the updated `GeneSetDb` object `x`.

### Examples

    gdb <- exampleGeneSetDb()
    meta.info <- transform(
      geneSets(gdb)[, c("collection", "name")],
      someinfo = sample(c("one", "two"), nrow(gdb), replace = TRUE))
    gdb <- addGeneSetMetadata(gdb, meta.info)

[Package sparrow version 1.0.3 Index]