globaltest {globaltest}R Documentation

Global Test

Description

In microarray data, tests a (list of) group(s) of genes for significant association with a given clinical variable.

Usage

globaltest(X, Y, test.genes = NULL, model = NULL, 
    levels = NULL, adjust = NULL, permutation = FALSE, nperm = NULL, 
    sampling = FALSE, ndraws = NULL, verbose = TRUE) 

Arguments

X Either a matrix of gene expression data, where columns correspond to samples and rows to genes or a Bioconductor exprSet. The data should be properly normalized beforehand (and log- or otherwise transformed), but missing values are allowed (coded as NA). Gene and sample names can be included as the row and column names of X.
Y A vector with the clinical outcome of interest, having one value for each sample. If X is an exprSet it can also be the name of a covariate in the phenoData slot of the exprSet
test.genes Either a vector or a list of vectors. Indicates the group(s) of genes to be tested. Each vector in test.genes can be given in three formats. Either it can be a vector with 1 (TRUE) or 0 (FALSE) for each gene in X, with 1 indicating that the gene belongs to the group. Or it can be a vector containing the column numbers (in X) of the genes belonging to the group. Or it can be a subset of the rownames or geneNames for X.
model Indicates the model the test uses: Use model = "logistic" for a two-valued outcome Y (the default) or model = "linear" for a continuous outcome. If model is not supplied, globaltest will try to determine the model from Y.
levels If Y is a factor (or a category in the PhenoData slot of X) and contains more than 2 levels: levels is a vector of levels of Y to test. If levels is length 2: test these 2 groups against each other. If levels is length 1: test that level against the others.
adjust Confounders or risk factors for which the test must be adjusted. Must be either a data frame or the names of covariates in the phenoData slot of the exprSet X
permutation A logical flag. If TRUE nperm permutations are used to calculate the p-value instead of the asymptotic formulas. Recommended for small sample size. Not possible if an adjusted globaltest is used.
nperm The number permutations used. The default is 10,000. If a number is specified for nperm, permutation is automatically set to TRUE.
sampling A logical flag. If TRUE ndraws random sets of genes are drawn with the same number of genes as the tested group. Using this draws, an extra column of output comparative.p is generated, reporting how many of these random sets have a lower p-value than the tested group.
ndraws The number of random groups of genes to be drawn. The default is 1,000. If a number is specified for ndraws, sampling is automatically set to TRUE.
verbose Prints some progress information if set to TRUE

.

Details

The Global Test tests whether a group of genes (of any size from one single gene to all genes on the array) is significantly associated with a clinical outcome. The group could be for example a known pathway, an area on the genome or the set of all genes. The test investigates whether samples with similar clinical outcomes tend to have similar gene expression patterns. For a significant result it is not necessary that the genes in the group have similar expression patterns, only that many of them are correlated with the outcome.

Value

The function returns an object of class gt.result-class.

Note

If the number of rows of a matrix X does not match the length of the vector Y, but the number of columns does, the matrix X given is tacitly replaced by t(X) to make X and Y match. A warning is printed if X is square.

Author(s)

Jelle Goeman: j.j.goeman@lumc.nl; Jan Oosting

References

J. J. Goeman, S. A. van de Geer, F. de Kort and J. C. van Houwelingen, 2004, A global test for groups of genes: testing association with a clinical outcome, Bioinformatics 20 (1) 93–99. See also the vignette Globaltest.pdf included with this package.

See Also

geneplot, sampleplot, permutations, checkerboard, regressionplot.

Examples

    data(exampleX)      # Expression data (40 samples; 1000 genes)
    data(exampleY)      # Clinical outcome for the 40 samples
    pathway1 <- 1:25    # A pathway contains genes 1 to 25
    pathway2 <- 26:50   # another pathway
    gt <- globaltest(exampleX, exampleY, list(pathway1,pathway2))
    gt

[Package globaltest version 2.1.6 Index]