tspsig: Significance calculation for top scoring pairs

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

View source: R/tsp.R

Description

This function calculates the significance of a top-scoring pair. It can be run after tspcalc() to calculate how strong a TSP is.

Usage

1
  tspsig(dat,grp,B=50,seed=NULL)

Arguments

dat

Can take two values: (a) an m genes by n arrays matrix of expression data or (b) an eSet object

grp

Can take one of two values: (a) A group indicator incharacter or numeric form, (b) an integer indicating the column of pData(dat) to use as the group indicator

B

The number of permutations to perform in calculation of the p-value, default is 50.

seed

If this is a numeric argument, the seed will be set for reproducible p-values.

Details

tspsig() only works for two group classification. The computation time grows rapidly in the number of genes, so for large gene expression matrices one should be prepared to wait or do a pre-filtering step. A progress bar is shown which gives some indication of the time until the calculation is complete. The top scoring pairs methodology was originally described in Geman et al. (2004).

Value

p

A p-value for testing the null hypothesis that there is no TSP for the data set dat.

nullscores

The null TSP scores from the permutation test.

Author(s)

Jeffrey T. Leek jtleek@jhu.edu

References

D. Geman, C. d'Avignon, D. Naiman and R. Winslow, "Classifying gene expression profiles from pairwise mRNA comparisons," Statist. Appl. in Genetics and Molecular Biology, 3, 2004.

See Also

tspplot, ts.pair, tspcalc,predict.tsp, summary.tsp

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
  ## Not run: 
  ## Load data
  data(tspdata) 

  ## Run tspcalc() on a data matrix and grp vector
  tsp1 <- tspcalc(dat,grp)

  ## Run tspsig() to get a p-value
  p <- tspsig(dat,grp)
  p
 
## End(Not run)

Example output

Loading required package: Biobase
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colMeans, colSums, colnames, do.call,
    duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
    lapply, lengths, mapply, match, mget, order, paste, pmax, pmax.int,
    pmin, pmin.int, rank, rbind, rowMeans, rowSums, rownames, sapply,
    setdiff, sort, table, tapply, union, unique, unsplit, which,
    which.max, which.min

Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

================================================================================$p
[1] 0.372549

$nullscores
 [1] 0.68 0.64 0.60 0.64 0.64 0.64 0.64 0.68 0.64 0.72 0.68 0.64 0.68 0.68 0.68
[16] 0.68 0.64 0.68 0.60 0.60 0.60 0.60 0.64 0.64 0.64 0.64 0.68 0.64 0.64 0.68
[31] 0.68 0.64 0.68 0.72 0.64 0.64 0.64 0.64 0.64 0.68 0.68 0.64 0.64 0.64 0.60
[46] 0.68 0.64 0.68 0.60 0.60

tspair documentation built on Nov. 8, 2020, 6:51 p.m.