compute.pigengene {Pigengene} | R Documentation

## Computes the eigengenes

### Description

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

### Usage

    compute.pigengene(Data, Labels, modules, saveFile = "pigengene.RData",
        selectedModules = "All", amplification = 5, doPlot = TRUE, verbose = 0)

### 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.
`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.

### 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`, `WGCNA-package`

### Examples

    ## 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)

[Package Pigengene version 1.6.0 Index]