stat.gnames: Sort Genes According to the Value of a Statistic

Description Usage Arguments Value Author(s) See Also Examples

Description

Lists genes and corresponding statistics in decreasing order of the statistics. This function applies to any type of statistic, including log ratios, one and two-sample t-statistics, and F-statistics. Missing values are ignored, as in sort(..., na.last=NA).

Usage

1
stat.gnames(x, gnames, crit=0.05)

Arguments

x

a numeric vector containing the statistics for each gene. Missing values (NAs) are allowed.

gnames

a character vector containing the gene names.

crit

specifies the number of genes to be returned. If crit < 1, the crit*100% genes with the largest x values are listed. If crit >= 1, the crit genes with the largest x values are listed.

Value

List containing the following components

gnames

gene names sorted in decreasing order of the statistics in x.

t

statistics sorted in decreasing order.

Author(s)

Yee Hwa Yang, yeehwa@stat.berkeley.edu
Sandrine Dudoit, sandrine@stat.berkeley.edu

See Also

stat.t2, order, sort.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Calculating log ratio and performing a t test.
data(MouseArray)
## mouse.setup <- init.grid()
## mouse.data <- init.data() ## see \emph{init.data}
mouse.lratio <- stat.ma(mouse.data, mouse.setup)
cl <- c(rep(1,3), rep(2,3))
mouse.t2 <- stat.t2(mouse.lratio, cl)

## Looking at gene names
## Finding the top 10 t-statistics
stat.gnames(abs(mouse.t2$t), mouse.gnames, crit=10)

## Finding the top 1% of t-statistics
stat.gnames(abs(mouse.t2$t), mouse.gnames, crit=0.01)

## Finding the 10 extreme M values in the first slide
stat.gnames(abs(mouse.lratio$M[, 1]), mouse.gnames, crit=10)

gnyamundanda/sma documentation built on May 3, 2019, 5:17 p.m.