incidence-methods: Methods for Constructing Incidence Matricies Between GeneSets

incidence-methodsR Documentation

Methods for Constructing Incidence Matricies Between GeneSets

Description

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

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

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]

Bioconductor/GSEABase documentation built on Nov. 2, 2024, 6:35 a.m.