compute.pigengene: Computes the eigengenes

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/compute.pigengene.R

Description

This function takes as input the expression data and module assignments, and computes an eigengene for each module using PCA.

Usage

1
2
3
compute.pigengene(Data, Labels, modules, saveFile = "pigengene.RData", 
    selectedModules = "All", amplification = 5, doPlot = TRUE,
    verbose = 0, dOrderByW = TRUE, naTolerance=0.05)

Arguments

Data

A matrix or data frame containing the training expression data, with genes corresponding to columns and rows corresponding to samples. Rows and columns must be named.

Labels

A (preferably named) vector containing the Labels (condition types) for the training Data. Names must agree with rows of Data.

modules

A numeric vector, named by genes, that reports the module (clustering) assignments.

saveFile

The file to save the results. NULL will disable saving, and thus requires doPlot to be FALSE.

selectedModules

A numeric vector determining which modules to use, or set to "All" (default) to include every module.

amplification

An integer that controls the number of repeats for each condition. The number of all samples roughly will be multiplied by this factor after oversampling. See balance.

doPlot

Boolean determining whether heatmaps of expression of eigengenes should be ploted and saved.

verbose

The integer level of verbosity. 0 means silent and higher values produce more details of computation.

dOrderByW

If TRUE, the genes will be ordered in the csv file based on their absolute weight in the corresponding module.

naTolerance

Upper threshold on the fraction of entries per gene that can be missing. Genes with a larger fraction of missing entries are ignored. For genes with smaller fraction of NA entries, the missing values are imputed from their average expression in the other samples. See check.pigengene.input.

Details

Rows of Data are oversampled using balance so that each condition has roughly the same number of samples. moduleEigengenes computes an eigengene for each module using PCA.

Value

An object of pigengene-class.

Author(s)

Habil Zare and Amir Foroushani

References

Large-scale gene network analysis reveals the significance of extracellular matrix pathway and homeobox genes in acute myeloid leukemia, Foroushani A, Agrahari R, Docking R, Karsan A, and Zare H. In preparation.

See Also

Pigengene-package, one.step.pigengene, wgcna.one.step, make.decision.tree, moduleEigengenes

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Data:
data(aml)
data(mds)
data(eigengenes33)
d1 <- rbind(aml,mds)
Labels <- c(rep("AML",nrow(aml)),rep("MDS",nrow(mds)))
names(Labels) <- rownames(d1)
modules33 <- eigengenes33$modules[colnames(d1)]
## Computing:
pigengene <- compute.pigengene(Data=d1, Labels=Labels, modules=modules33,
   saveFile="pigengene.RData", doPlot=TRUE, verbose=3)
class(pigengene)
plot(pigengene, fontsize=12)

Pigengene documentation built on Nov. 8, 2020, 6:47 p.m.