False discovery rate cutpoint for listed sets. A value of 1
will cause all sets to be listed
.
Details
This function list the sigificant gene sets, based on a
call to the GSA (Gene set analysis) function.
Value
A list with components
FDRcut
The false discovery rate threshold used.
negative
A table of the negative gene sets. "Negative" means that
lower expression of most genes in the gene set correlates with
higher values of the phenotype y. Eg for two classes coded 1,2,
lower expression correlates with class 2. For survival data,
lower expression correlates with higher risk, i.e shorter survival
(Be careful, this can be confusing!)
positive
A table of the positive gene sets.
"Positive" means that
higher expression of most genes in the gene set correlates with
higher values of the phenotype y. See "negative" above for more info.
nsets.neg
Number of negative gene sets
nsets.pos
Number of positive gene sets
Author(s)
Robert Tibshirani
References
Efron, B. and Tibshirani, R.
On testing the significance of sets of genes. Stanford tech report rep 2006.
http://www-stat.stanford.edu/~tibs/ftp/GSA.pdf
Examples
######### two class unpaired comparison
# y must take values 1,2
set.seed(100)
x<-matrix(rnorm(1000*20),ncol=20)
dd<-sample(1:1000,size=100)
u<-matrix(2*rnorm(100),ncol=10,nrow=100)
x[dd,11:20]<-x[dd,11:20]+u
y<-c(rep(1,10),rep(2,10))
genenames=paste("g",1:1000,sep="")
#create some radnom gene sets
genesets=vector("list",50)
for(i in 1:50){
genesets[[i]]=paste("g",sample(1:1000,size=30),sep="")
}
geneset.names=paste("set",as.character(1:50),sep="")
GSA.obj<-GSA(x,y, genenames=genenames, genesets=genesets, resp.type="Two class unpaired", nperms=100)
GSA.listsets(GSA.obj, geneset.names=geneset.names,FDRcut=.5)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(GSA)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/GSA/GSA.listsets.Rd_%03d_medium.png", width=480, height=480)
> ### Name: GSA.listsets
> ### Title: List the results from a Gene set analysis
> ### Aliases: GSA.listsets
> ### Keywords: univar survival ts nonparametric
>
> ### ** Examples
>
>
> ######### two class unpaired comparison
> # y must take values 1,2
>
> set.seed(100)
> x<-matrix(rnorm(1000*20),ncol=20)
> dd<-sample(1:1000,size=100)
>
> u<-matrix(2*rnorm(100),ncol=10,nrow=100)
> x[dd,11:20]<-x[dd,11:20]+u
> y<-c(rep(1,10),rep(2,10))
>
>
> genenames=paste("g",1:1000,sep="")
>
> #create some radnom gene sets
> genesets=vector("list",50)
> for(i in 1:50){
+ genesets[[i]]=paste("g",sample(1:1000,size=30),sep="")
+ }
> geneset.names=paste("set",as.character(1:50),sep="")
>
> GSA.obj<-GSA(x,y, genenames=genenames, genesets=genesets, resp.type="Two class unpaired", nperms=100)
perm= 10 / 100
perm= 20 / 100
perm= 30 / 100
perm= 40 / 100
perm= 50 / 100
perm= 60 / 100
perm= 70 / 100
perm= 80 / 100
perm= 90 / 100
perm= 100 / 100
>
>
> GSA.listsets(GSA.obj, geneset.names=geneset.names,FDRcut=.5)
$FDRcut
[1] 0.5
$negative
Gene_set Gene_set_name Score p-value FDR
[1,] "11" "set11" "-0.3151" "0" "0"
[2,] "15" "set15" "-0.6354" "0" "0"
[3,] "50" "set50" "-0.3587" "0.02" "0.3333"
$positive
Gene_set Gene_set_name Score p-value FDR
[1,] "6" "set6" "0.5037" "0" "0"
[2,] "17" "set17" "0.7162" "0" "0"
[3,] "31" "set31" "0.4192" "0" "0"
$nsets.neg
[1] 3
$nsets.pos
[1] 3
>
>
>
>
>
>
>
> dev.off()
null device
1
>