R/Genesets.R

#' @importClassesFrom GSEABase GeneSetCollection
#' @importFrom GSEABase setName
setGeneric(name = "asList", def = function(object) {
  standardGeneric("asList")
})

setMethod(
  f = "asList",
  signature = c("GeneSetCollection"),
  definition = function(object) {
    # translate a Genesets object to a list. Why? mGSZ uses lists.
    to <- lapply(object, geneIds)
    names(to) <- lapply(object, setName)

    return(to)
  }
)

Try the MIGSA package in your browser

Any scripts or data that you put into this service are public.

MIGSA documentation built on Nov. 8, 2020, 8:26 p.m.