getIncidenceMatrix | R Documentation |
An incidence matrix summarizes membership of gene identifiers in gene sets.
getIncidenceMatrix(x, features)
x |
An object of class |
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. |
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.
Jason A. Hackney
incidence
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.