subset.GeneSetDb: Subset GeneSetDb to only include specified genesets.

View source: R/GeneSetDb-methods.R

subset.GeneSetDbR Documentation

Subset GeneSetDb to only include specified genesets.

Description

This is a utility function that is called by [.GeneSetDb and is not exported because it is not meant for external use.

Usage

## S3 method for class 'GeneSetDb'
subset(x, keep)

Arguments

x

a GeneSetDb()

keep

logical vector as long as ⁠nrow(geneSets(x, active.only=FALSE)⁠

Details

DEBUG: If keep is all FALSE, this will explode. What does an empty GeneSetDb look like, anyway? Something ...

We want to support a better, more fluent subsetting of GeneSetDb objects. See Issue #12 (https://github.com/lianos/multiGSEA/issues/12)

Value

a GeneSetDb that has only the results for the specified genesets.

Examples

gdb.all <- exampleGeneSetDb()
gs <- geneSets(gdb.all)
gdb <- gdb.all[gs$collection %in% c("c2", "c7")]

lianos/sparrow documentation built on Nov. 18, 2024, 7:14 a.m.