Vector of gene names for gene in expression dataset
negfirst
Should negative genes be listed first? Default FALSE
Details
Compute individual gene scores from a gene set analysis.
Useful for
looking “inside” a gene set that has been called significant by GSA.
Value
A list with components
res
Matrix of gene names and gene scores (eg t-statistics) for each gene in the gene set
,
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 random 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)
# look at 10th gene set
GSA.genescores(10, genesets, GSA.obj, genenames)
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.genescores.Rd_%03d_medium.png", width=480, height=480)
> ### Name: GSA.genescores
> ### Title: Individual gene scores from a gene set analysis
> ### Aliases: GSA.genescores
> ### 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 random 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
>
> # look at 10th gene set
>
> GSA.genescores(10, genesets, GSA.obj, genenames)
Gene Score
[1,] "g53" "1.112"
[2,] "g916" "0.845"
[3,] "g10" "0.714"
[4,] "g598" "0.584"
[5,] "g944" "0.493"
[6,] "g367" "0.46"
[7,] "g577" "0.414"
[8,] "g629" "0.33"
[9,] "g422" "0.228"
[10,] "g950" "0.181"
[11,] "g498" "0.175"
[12,] "g226" "0.149"
[13,] "g821" "0.076"
[14,] "g604" "0.069"
[15,] "g255" "-0.005"
[16,] "g903" "-0.01"
[17,] "g842" "-0.047"
[18,] "g60" "-0.047"
[19,] "g1" "-0.081"
[20,] "g696" "-0.185"
[21,] "g48" "-0.242"
[22,] "g499" "-0.243"
[23,] "g261" "-0.289"
[24,] "g562" "-0.292"
[25,] "g306" "-0.314"
[26,] "g811" "-0.462"
[27,] "g578" "-0.53"
[28,] "g679" "-0.584"
[29,] "g831" "-0.61"
[30,] "g739" "-0.714"
>
>
>
>
>
>
>
> dev.off()
null device
1
>