GSEABase (version 1.34.0)

incidence-methods: Methods for Constructing Incidence Matricies Between GeneSets

Description

An incidence matrix summarizes shared membership of gene identifiers across (pairs of) gene sets.

Arguments

Methods

The return value is a matrix with rows representing gene sets and columns genes.
signature(x="GeneSet", ...) signature(x="GeneColorSet", ...)
All additional arguments ... are of the same class as x. The incidence matrix contains elements 0 (genes not present) or 1 (genes present).
signature(x = "GeneSetCollection", ...)
Additional arguments ... can be of class GeneSetCollection or GeneSet. The incidence matrix contains elements 0 (genes not present) or 1 (genes present).

Examples

Run this code
fl <- system.file("extdata", "Broad.xml", package="GSEABase")
gss <- getBroadSets(fl) # GeneSetCollection of 2 sets
## From one or more GeneSetCollections...
imat <- incidence(gss)
dim(imat)
imat[,c(1:3,ncol(imat)-3+1:3)]

## .. or GeneSets
imat1 <- incidence(gss[[1]], gss[[2]], gss[[1]])
imat1[,1:5]

Run the code above in your browser using DataCamp Workspace