eigengene {tmod}R Documentation

Calculate the eigengene of a module from a data set

Description

Calculate the eigengene of a module from a data set

Usage

eigengene(x, g, mset = NULL, k = 1)

Arguments

x

data; genes in rows, samples in columns

g

genes – a vector gene IDs corresponding to annotation in modules

mset

– a module set; eigengenes will be calculated for each module in the set

k

which component defines the eigengene (default: 1)

Details

The eigengene of a module is here defined as the first principal component of a PCA on the gene expression of all genes from a module.

Value

A numeric matrix with rows corresponding to modules. If there was not a sufficient number of genes in a module corresponding to the data set, the row will contain only NA's.

Examples

data(Egambia)
data(tmod)
x <- Egambia[ , -c(1:3) ]
ifns <- tmod[ grep("[Ii]nterferon", tmod$gs$Title) ]
eigv <- eigengene(x, Egambia$GENE_SYMBOL, ifns)
plot(eigv["LI.M127", ], eigv["DC.M1.2",])

# which interferon modules are correlated
cor(eigv) 

[Package tmod version 0.50.13 Index]