Learn R Programming

permGPU (version 0.15)

permgpu: Conduct permutation resampling analysis using permGPU

Description

This function can be used to carry our permutation resampling inference with GPUs. Currently the function supports six test statistics: the t and Wilcoxon tests, for two-sample problems, the Pearson and Spearman statistics, for non-censored continuous outcomes, and the Cox score and rank score tests (Jung et al, 2005), for right-censored time-to-event outcomes.

Usage

permgpu(datobj, y, event = NULL, test, B, diag = FALSE, scale = FALSE)

Arguments

datobj

an ExpressionSet object containing the expression and phenotype data.

y

The name of the outcome variable. Note that y must be an element of names(pData(datobj)). See example.

event

In the case of survival analysis, event is the name of the event indicator. Note that event must be an element of names(pData(datobj)). See example.

test

specifies the test to be performed. Possible options are ttest (two-sample t-test), wilcoxon (two-sample Wilcoxon test), pearson (Pearson correlation test), spearman (Spearman rank correlation test), cox (Cox score test) and npcox (Cox rank score test).

B

specifies the number of random permutations to be performed.

diag

This flag can be set to TRUE if specifies the type of object returned.

scale

If TRUE, markers are centered.

Value

This function returns a data frame. The first column contains the gene names. The second, thrid and fourth columns contain the marginal test statistics, marginal unadjusted permutation P-values and FWER adjusted P-values respectively. If diag=TRUE, this function returns a list consisting of the following elements:

RESULTS

The results data frame as described above

EXPR

The gene expression data

y

The outcome data

event

event indicator(s) for survival analysis

n

The number of patients

K

The number of genes

B

The number of permutations

test

The test used in the permutation analysis

References

Jung, S.-H., Owzar K., George, S.L. (2005) A multiple testing procedure to associate gene expression levels with survival.Statistics in Medicine. 24, 20, 3077--88.

Shterev, I.D., Jung, S.-H., George S.L., Owzar K. permGPU: Using graphics processing units in RNA microarray association studies. BMC Bioinformatics 2010, 11:329.

For the Director's Challenge Consortium for the Molecular Classification of Lung Adenocarcinoma, Shedden K., Taylor J.M.G., Enkemann S.A., Tsao M.S., Yeatman T.J., Gerald W.L., Eschrich S., Jurisica I., Giordano T.J., Misek D.E., Chang A.C., Zhu C.Q., Strumpf D., Hanash S., Shepherd F.A., Ding K., Seymour L., Naoki K., Pennell N., Weir B., Verhaak R., Ladd-Acosta C., Golub T., Gruidl M., Sharma A., Szoke J., Zakowski M., Rusch V., Kris M., Viale A., Motoi N., Travis W., Conley B., Seshan V.E., Meyerson M., Kuick R., Dobbin K.K., Lively T., Jacobson J.W., Beer D.G. (2008) Gene expression-based survival prediction in lung adenocarcinoma: a multi-site, blinded validation study. Nat Med. 14, 8, 822--827.

Examples

Run this code
# NOT RUN {
library(Biobase)
set.seed(123)

## Generate toy phenotype and expression data sets
## This example consists of 4 markers and 100 patients
## grp is a binary trait (e.g., case vs control)
## bp is a continuous trait (e.g., blood pressure)
## ostime is a right-censored time-to-event trait (e.g., observed
## time of death)
## event is the event indicator (1=dead or 0=censored) for ostime

n<-100
K<-4
grp=rep(1:0,each=n/2)
bp=rnorm(n)
atime=rexp(n)
ctime=runif(n,0,1)
otime=pmin(atime,ctime)
event=as.integer(atime<=ctime)
pdat=data.frame(grp,bp,otime,event)
rm(grp,atime,ctime,otime,event)
expdat=matrix(rnorm(K*n),K,n)

## Assign marker names g1,...,gK to the expression data set and
## patient ids id1,...,idn to the expression and phenotype data
rownames(expdat)=paste("g",1:K,sep="")
patid=paste("id",1:n,sep="")
rownames(pdat)=patid
colnames(expdat)=patid

## Create the ExprSet object
testdat=makeExprSet(expdat,pdat)
class(testdat)

## Carry out permutation analysis with grp as the outcome
## using the two-sample t-test with B=100 random permutations
permgpu(testdat,"grp",B=100,test="ttest")

## Carry out permutation analysis with grp as the outcome
## using the two-sample Wilcoxon with B=100 random permutations
permgpu(testdat,"grp",B=100,test="wilcoxon")

## Carry out permutation analysis with bp as the outcome
## using the Pearson test with B=100 random permutations
permgpu(testdat,"bp",B=100,test="pearson")

## Carry out permutation analysis with bp as the outcome
## using the Spearman test with B=100 random permutations
permgpu(testdat,"bp",B=100,test="spearman")

## Carry out permutation analysis with ostime as the outcome
## using the covariance test (Jung et al, 2005) with B=100 
## random permutations.
permgpu(testdat,"otime",event="event",B=100,test="cox")

## Carry out permutation analysis with ostime as the outcome
## using the rank-covariance test (Jung et al, 2005) with B=100 
## random permutations.
permgpu(testdat,"otime",event="event",B=100,test="npcox")

## To carry out the analyses for the Director's Challenge
## Consortium Lung Cancer data, download the RMA pre-processed
## expressionSet object from the project webpage
## http://code.google.com/p/permgpu/
## After attaching it, check the md5sum signature
## attach("RMADAT-DCHALL.RData")
## md5sum("RMADAT-DCHALL.RData")
## 404fc27fe0c6d11c844e06139912f7ca
## A Sweave file outlining the steps carried out to pre-process
## the data is available from the project page.
##
## To carry out association testing using the Cox score test
## permgpu(RMADAT,"ostime",event="event",B=10000,test="cox")
## To carry out association testing using the Cox rank score test
## permgpu(RMADAT,"ostime",event="event",B=10000,test="npcox")
# }

Run the code above in your browser using DataLab