Description Usage Arguments Details Value Author(s) Examples
This function performs GSEA computations and returns p-values for each gene set based on repeated permutation of the phenotype labels.
1 | gseattperm(eset, fac, mat, nperm)
|
eset |
An |
fac |
A |
mat |
A 0/1 incidence matrix with each row representing a gene set and each column representing a gene. A 1 indicates membership of a gene in a gene set. |
nperm |
Number of permutations to test to build the reference distribution. |
The t-statistic is used (via rowttests
) to test for a
difference in means between the phenotypes determined by fac
within each gene set (given as a row of mat
).
A reference distribution for these statistics is established by
permuting fac
and repeating the test B
times.
A matrix with the same number of rows as mat
and two columns,
"Lower"
and "Upper"
. The "Lower"
("Upper"
) column gives the probability of seeing a t-statistic
smaller (larger) than the observed.
Seth Falcon
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | ## This example uses a random sample of probesets and a randomly
## generated category matrix. The results, therefore, are not
## meaningful, but the code demonstrates how to use gseattperm without
## requiring any expensive computations.
## Obtain an ExpressionSet with two types of samples (mol.biol)
haveALL <- require("ALL")
if (haveALL) {
data(ALL)
set.seed(0xabcd)
rndIdx <- sample(1:nrow(ALL), 500)
Bcell <- grep("^B", as.character(ALL$BT))
typeNames <- c("NEG", "BCR/ABL")
bcrAblOrNegIdx <- which(as.character(ALL$mol.biol) %in% typeNames)
s <- ALL[rndIdx, intersect(Bcell, bcrAblOrNegIdx)]
s$mol.biol <- factor(s$mol.biol)
## Generate a random category matrix
nCats <- 100
set.seed(0xdcba)
rndCatMat <- matrix(sample(c(0L, 1L), replace=TRUE),
nrow=nCats, ncol=nrow(s),
dimnames=list(
paste("c", 1:nCats, sep=""),
featureNames(s)))
## Demonstrate use of gseattperm
N <- 10
pvals <- gseattperm(s, s$mol.biol, rndCatMat, N)
pvals[1:5, ]
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.