getIncidenceMatrix: Making an incidence matrix for a gene set

Description Usage Arguments Value Author(s) See Also Examples

Description

An incidence matrix summarizes membership of gene identifiers in gene sets.

Usage

1
2
3
  
  getIncidenceMatrix(x, features)
  

Arguments

x

An object of class GeneSetCollection, DeconGeneSetCollection, or list, for which an incidence matrix will be produced.

features

A optional character vector providing set of features for which the incidence matrix will be produced. By default, the matrix will include one column for every gene in the collection.

Value

A matrix with as many rows as gene sets in the GeneSetCollection, and columns for genes. Each value will be 1 where a gene is in set, otherwise 0. By default, there will be as many columns as there are unique genes across all sets in the collection. The user may specify a set of features for which an incidence matrix will be made. In that case, there will be as many columns as there are provided features.

Author(s)

Jason A. Hackney

See Also

incidence

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
    gsc <- DeconGeneSetCollection()
    
    ### Make an incidence matrix for the gene sets
    incMat <- getIncidenceMatrix(gsc)
    
    ### Make an incidence matrix for the gene sets,
    ### explicitly calling out which features to use.
    ### This is identical to the previous incidence matrix.
    allGenes <- unlist(unique(geneIds(gsc)))
    incMat <- getIncidenceMatrix(gsc, features = allGenes)

JasonHackney/GSDecon documentation built on Dec. 2, 2018, 1:12 p.m.