renameCollections {sparrow}R Documentation

Rename the collections in a GeneSetDb

Description

This function remaps names of collections in the database from their current names to ones specified by the user.

Usage

renameCollections(x, rename = NULL, ...)

Arguments

x

A GeneSetDb object

rename

a named character vector. names(rename) are the names of the collection you want to rename, and their values are the new names.

...

pass it along

Value

GeneSetDb x with renamed geneSets(x)$collection values.

Examples

gdb <- exampleGeneSetDb()
ngdb <- renameCollections(gdb, c("c2" = "MSigDB C2", "c7" = "ImmuneSigDb"))
all.equal(
  unname(geneSetURL(gdb, "c7", "GSE3982_BCELL_VS_TH2_DN")),
  unname(geneSetURL(ngdb, "ImmuneSigDb", "GSE3982_BCELL_VS_TH2_DN")))

[Package sparrow version 0.99.6 Index]