avg.abs.genestat: Function to Compute Gene Set Statistics

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

Description

A function to calculate the mean of absolute values of statistics based on a gene set definition

Usage

1
avg.abs.genestat(gene.res, probes, GS.data)

Arguments

gene.res

a data frame. Each row gives test statistics for a genomic variable. Each column corresponds to an endpoint variable.

probes

a vector that links the gene.res to GS.data.

GS.data

a data frame with first column for probe set identifier and second column for gene set identifier. Each row assigns a probe set to a gene set. Each probe set may be assigned to multiple gene sets or no gene set at all.

Value

Return a matrix of statistics. Each row gives the mean absolute value of test statistics of genes belonging to a gene set. The columns are same as in gene.res.

Note

A function internally called by PROMISE.

Author(s)

Stan Pounds stanley.pounds@stjude.org; Xueyuan Cao xueyuan.cao@stjude.org

References

Goeman JJ and Buhlmann P (2007) Analyzing gene expression data in terms of gene sets: methodological issues. Bioinformatics 23: 980-987.

See Also

PROMISE

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
## load sampExprSet sampGeneSet.
data(sampExprSet)
data(sampGeneSet)

## extract expression matrix from sampExprSet
Y <- exprs(sampExprSet)
probes <- rownames(Y)

## convert sampGeneSet to a data frame
GS.data <- NULL
for (i in 1:length(sampGeneSet)){
    tt <- sampGeneSet[i][[1]]
    this.name <- unlist(geneIds(tt))
    this.set <- setName(tt)
    GS.data <- rbind.data.frame(GS.data,
                cbind.data.frame(featureID=as.character(this.name),
                                 setID=rep(as.character(this.set),
                                 length(this.name))))
}

## Calculate the mean of absolute values of statistics
## This is only a demo, probe expression values are used 
##in stead of statistics 
test <- avg.abs.genestat(Y, probes, GS.data)

PROMISE documentation built on Nov. 8, 2020, 5:15 p.m.