Learn R Programming

PAA (version 1.7.1)

diffAnalysis: Differential analysis.

Description

Performs a univariate differential analysis.

Usage

diffAnalysis(input=NULL, label1=NULL, label2=NULL, class1=NULL, class2=NULL, output.path=NULL, mMs.matrix1=NULL, mMs.matrix2=NULL, above=1500, between=400, features=NULL, feature.names=NULL)

Arguments

input
EList$E- or EListRaw$E-matrix extended by row names comprising BRC-IDs of the corresponding features (mandatory; note: it is expected that this matrix is in original scale and not in log2 scale).
label1
vector of column names for group 1 (mandatory).
label2
vector of column names for group 2 (mandatory).
class1
label of group 1 (mandatory).
class2
label of group 2 (mandatory).
output.path
string indicating a path for saving the results (optionally).
mMs.matrix1
precomputed mMs reference matrix (see mMsMatrix()) for group 1 (mandatory).
mMs.matrix2
precomputed mMs reference matrix (see mMsMatrix()) for group 2 (mandatory).
above
mMs above parameter (integer). Default is "1500".
between
mMs between parameter (integer). Default is "400".
features
vector of row indices (optional).
feature.names
vector of corresponding feature names (additionally to features).

Value

A matrix containing the analysis results is returned.

Details

This function takes an EList$E- or EListRaw$E-matrix (e.g., temp <- elist$E) extended by row names comprising BRC-IDs of the corresponding features. The BRC-IDs can be created via: brc <- paste(elist$genes[,1], elist$genes[,3], elist.$genes[,2]). The BRC-row names can be defined as follows: rownames(temp) <- brc. Furthermore, the corresponding column name vectors, group labels and mMs-parameters are needed to perform the univariate differential analysis. This analysis covers inter alia p-value computation, p-value adjustment (method: Benjamini & Hochberg, 1995), and fold change computation. Since the results table is usually large, a path for saving the results can be defined via output.path. Optionally, a vector of row indices (features) and additionally (not mandatory for subset analysis) a vector of corresponding feature names (feature.names) can be forwarded to perform the analysis for a feature subset.

Examples

Run this code
cwd <- system.file(package="PAA")
load(paste(cwd, "/extdata/Alzheimer.RData", sep=""))
elist <- elist[elist$genes$Block < 10,]
c1 <- paste(rep("AD",20), 1:20, sep="")
c2 <- paste(rep("NDC",20), 1:20, sep="")
mMs.matrix1 <- mMs.matrix2 <- mMsMatrix(x=20, y=20)
temp <- elist$E
rownames(temp) <- paste(elist$genes[,1], elist$genes[,3], elist$genes[,2])
diffAnalysis(input=temp, label1=c1, label2=c2, class1="AD", class2="NDC",
 mMs.matrix1=mMs.matrix1, mMs.matrix2=mMs.matrix2, above=1500,
 between=400)

Run the code above in your browser using DataLab