comp.FC: Computing Fold Change for Differential Expression

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

View source: R/DEDS.R

Description

comp.FC returns a function of one argument with bindings for L, is.log and FUN. This function accepts a microarray data matrix as its single argument, when evaluated, computes fold change for each row of the matrix.

Usage

1
comp.FC(L = NULL, is.log = TRUE, FUN = mean)

Arguments

L

A vector of integers corresponding to observation (column) class labels. For k classes, the labels must be integers between 0 and k-1.

is.log

A logical variable indicating whether the data has been logged.

FUN

The summary statistics function used to calculate fold change, the default is set as mean, the user can also use median

.

Details

The function returned by comp.FC calculates fold change for each row of the matrix, given specific class labels. If is.log=TRUE, fold change is calculated by subtraction; if is.log=FALSE, fold change is calculated by division.

Value

comp.FC returns a function with bindings for L, is.log and FUN, which calculates and returns a vector of fold changes for each row in the data matrix.

Author(s)

Yuanyuan Xiao, yxiao@itsa.ucsf.edu,
Jean Yee Hwa Yang, jean@biostat.ucsf.edu.

See Also

comp.t,comp.F

Examples

1
2
3
4
5
6
7
8
X <- matrix(rnorm(1000,0,0.5), nc=10)
L <- rep(0:1,c(5,5))

# genes 1-10 are differentially expressed
X[1:10,6:10]<-X[1:10,6:10]+1

f <- comp.FC(L=L)
f.X <- f(X)

Example output



DEDS documentation built on Oct. 31, 2019, 3:15 a.m.

Related to comp.FC in DEDS...