Check if a collection exists in the GeneSetDb

hasGeneSetCollection(x, collection, as.error = FALSE)

Arguments

x

A GeneSetDb()

collection

character vector of name(s) of the collections to query

as.error

logical if TRUE, this will error instead of returning FALSE

Value

logical indicating if this collection exists

Examples

gdb <- exampleGeneSetDb()
hasGeneSetCollection(gdb, "c2")
#> [1] TRUE
hasGeneSetCollection(gdb, "unknown collection")
#> [1] FALSE