test-functions: Statistical test functions

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

Description

Assess the differential effect in gene expression between groups of microarray replicates.

Usage

1
2
3
rowt(exprs, groups, id, index, testArgs)
rowF(exprs, groups, id, index, testArgs=list(var.equal=TRUE))
limmat(exprs, groups, id, index, testArgs)

Arguments

exprs

A matrix of expression values of size n x m, with rows representing the genes and columns representing the samples. The structure is the same as for the exprs argument of the gsri method.

groups

A factor with the length m, specifying the groups of the corresponding samples in exprs. The structure is the same as for the exprs argument of the gsri method.

id

Index vector for the rows of exprs which are part of the current gene set.

index

Index for the columns of exprs, such that exprs[ ,index] yields the bootstrapped expression matrix. Similar to the index arguments for boot of the boot package.

testArgs

Optional list with arguments passed to the test function. If ‘NULL’ or missing it is not passed to test and any exisiting default value of the function is used instead.

var.equal:

For the rowF function a logical indicating whether equal variances in the groups are assumed for the F-test (default: TRUE). For details, please see rowFtests in the genefilter package.

Details

With the t-test and the F-test, two widely used statistical tests are available in this package. To allow a fast computation the implementations from the genefilter package is used.

It is also possible to use custom test statistics for assessing the differential effect between groups for each gene. In this case the function is passed as the test argument to the gsri method, while additional parameters for the function can be passed as a list via the testArgs argument. The defined function is required to be called as

function(exprs, groups, id, index, testArgs),

with exprs the matrix of expression intensities of the microarray and groups the factor of group labels, with the same structure as those passed initially to the gsri method. The vector id contains the indices of the genes part of the current gene set and is used to subset the expression intensities if necessary. The function has to return one p-value for each gene in the gene set indicating its differential effect. The vector index contains the indicies of the samples for the bootstrapping. Applying index on the expression matrix in the form of exprs[ ,index] generates the bootstrapped data set.

For details on how to define and use your custom test functions, please refer to the ‘examples’ section or the vignette of this package.

Value

A vector of p-values, indicating the significance of the differential effect between groups for each gene.

Author(s)

Julian Gehring

Maintainer: Julian Gehring <julian.gehring@fdm.uni-freiburg.de>

See Also

Package: GSRI-package

Class: Gsri

Methods: gsri getGsri getCdf getParms export sortGsri plot show summary readCls readGct

Statistical tests from the genefilter package: rowFtests

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Not run: 
## A simple example for a custom test function using a linear model.
## Note that for two groups this is equivalent to a t-test with equal variances.
testFcn <- function(exprs, groups, id, index, testArgs) {

  stat <- function(e, g, f) {
  m <- lm(f)
  pval <- summary(m)$coefficients[2,4]
  }

pvals <- apply(exprs[id,index], 1, stat, groups, testArgs$f)
return(pvals)
}

## Pass the definition of the linear model through 'testArgs'
f <- formula(e ~ g)

res <- gsri(exprs, groups, test=testFcn, testArgs=list(f=f))

## End(Not run)

GSRI documentation built on Nov. 8, 2020, 7:46 p.m.