annotateGeneSetMembership {sparrow} | R Documentation

## Annotates rows of a data.frame with geneset membership from a GeneSetDb

### Description

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`.

### Usage

    annotateGeneSetMembership(x, gdb, x.ids = NULL, ...)

### Arguments

`x` | A data.frame with genes/features in rows
`gdb` | A `GeneSetDb()` object with geneset membership
`x.ids` | 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()`

### Value

Returns the original `x` with additional columns: each is a logical vector that indicates membership for genesets defined in `gdb`.

### Examples

    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`)

[Package sparrow version 1.0.3 Index]