incidenceMatrix: Creates a 1/0 matrix to indicate geneset membership to target...

View source: R/GeneSetDb-methods.R

incidenceMatrixR Documentation

Creates a 1/0 matrix to indicate geneset membership to target object.

Description

Generates an inidcator matrix to indicate membership of genes (columns) to gene sets (rows). If y is provided, then the incidence is mapped across the entire feature-space of y.

Usage

incidenceMatrix(x, y, ...)

Arguments

x

A GeneSetDb()

y

(optional) A target (expression) object x is (or can be) conformed to

...

parameters passed down into conform().

Value

incidence matrix with nrows = number of genesets and columns are featureIDs. If y is passed in, the columns of the returned value match the rows of y.

Examples

vm <- exampleExpressionSet()
gdb <- exampleGeneSetDb()
im <- incidenceMatrix(gdb)
imv <- incidenceMatrix(gdb, vm)

lianos/sparrow documentation built on Nov. 22, 2024, 11:23 p.m.