R/GeneSetDb-methods.R
annotateGeneSetMembership.Rd
This is helpful when you don't have a monsterly sized GeneSetDb. There will
be as many new columns added to x
as there are active genesets in gdb
.
annotateGeneSetMembership(x, gdb, x.ids = NULL, ...)
A data.frame with genes/features in rows
A GeneSetDb()
object with geneset membership
The name of the column in x
that holds the feautre
id's in x
that match the feature_id's in gdb
, or a vector
of id's to use for each row in x
that represent these.
parameters passed down into incidenceMatrix()
Returns the original x
with additional columns: each is a
logical vector that indicates membership for genesets defined in
gdb
.
vm <- exampleExpressionSet()
gdb <- exampleGeneSetDb()
mg <- seas(vm, gdb, design = vm$design, contrast = 'tumor')
lfc <- logFC(mg)
annotated <- annotateGeneSetMembership(lfc, gdb, 'feature_id')
## Show only genes that are part of 'HALLMARK_ANGIOGENESIS' geneset
angio <- subset(annotated, `c2;;BIOCARTA_AGPCR_PATHWAY`)