This function remaps names of collections in the database from their current names to ones specified by the user, folows the dplyr::rename convenction where names() of the rename vector are the new names you want, and its values are the old names it came from.

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("MSigDB C2" = "c2", "ImmuneSigDb" = "c7"))
all.equal(
  unname(geneSetURL(gdb, "c7", "GSE3982_BCELL_VS_TH2_DN")),
  unname(geneSetURL(ngdb, "ImmuneSigDb", "GSE3982_BCELL_VS_TH2_DN")))
#> [1] TRUE