runIndTest {EMA}R Documentation

Computing Differential Analysis for each gene

Description

This function computes test statistics, e.g., two-sample Welch t-statistics, t-statistics, or wilcoxon, independently for each row of a data frame.

Usage

runIndTest(data, labels, gene.names = NULL, plot = TRUE, dirname= NULL,
grp.name=c("Group1","Group2")) 

Arguments

data

a matrix, a data frame, or an ExpressionSet object. Each row of 'data' (or 'exprs(data)', respectively) must correspond to a gene, and each column to a sample.

labels

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

gene.names

A vector of description or name for each gene.

plot

A logical value specifying if drawing plots or not.

dirname

If specified, the .png plots are created in the directory.

grp.name

Vector with the name of the two groups

Details

For each gene independently, the function tests for the normality (Shapiro test) and the variance equality (F test) of each groups. According to the results, a welch test, a student test or a wilcoxon test is performed.

Value

A matrix with the gene names, the statistics, and the p-values.

Author(s)

EMA group

See Also

shapiro.test, var.test,t.test,wilcox.test

Examples

## load data
data(marty)

##random choice of genes - in practice genes of interest
geneOfInterest<-sample(1:ncol(marty),5)

##Class label 0/1
marty.type.num <- ifelse(marty.type.cl=="Her2+",0,1)

## run differential analysis
out <- runIndTest(marty[geneOfInterest,], labels=marty.type.num)

[Package EMA version 1.3.2 Index]