Description Usage Arguments Details Value Author(s) See Also Examples
Test whether a set of genes is highly ranked relative to other genes in terms of a given statistic, for example a ranking based on univariate Cox coefficients. Genes are assumed to be independent.
1 2 3 4 5 6 7 | ## S4 method for signature 'gsagenesets,missing,missing,character,numeric'
gsaWilcoxSurv(
gmt, genenames, statistics, p.value=0.1, cluster=FALSE,
cluster.threshold=0.3,...)
## S4 method for signature 'gsagenesets,ExpressionSet,Surv,missing,missing'
gsaWilcoxSurv(gmt,
X, y, genenames, statistics, ...)
|
gmt |
An object of class |
X |
An object of class |
y |
An object of class |
genenames |
Alternatively to |
statistics |
|
p.value |
Only report gene sets with p-value lower than this cutoff. |
cluster |
If true, then significant gene sets are clustered and ranked together. |
cluster.threshold |
Minimum overlap of gene set clustering. |
... |
Additional arguments passed from alternative S4 signatures or to the wilcoxGST function. |
A convenient wrapper around the wilcoxGST
function from the limma
package. See the limma package documentation for details.
This method makes it a little bit easier to test gene sets from a GMT file
with the wilcoxGST
function. It further adds a clustering of
gene sets that passed the p.value
threshold. The cluster parameter
cluster.threshold
specifies the minimum overlap of genes (default
is 0.3 or 30 percent) in the clustering.
An object of class gsaresults
.
Markus Riester markus@jimmy.harvard.edu, Levi Waldron lwaldron@hsph.harvard.edu, Christoph Bernau bernau@ibe.med.uni-muenchen.de
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | library(survHD)
library(survHDExtra)
set.seed(100)
# create some random data
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<-Surv(c(rnorm(10)+1,rnorm(10)+2), rep(TRUE, 20))
genenames=paste("g",1:1000,sep="")
rownames(x) = genenames
# 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="")
gmt <- new("gsagenesets", genesets=genesets, geneset.names=geneset.names)
gsa.res <- gsaWilcoxSurv(gmt, X=x,y=y,cluster=FALSE,p.value=0.3 )
# show the similarity of significant gene sets
plot(gsa.res)
# display a barcode of up to two gene sets.
plot(gsa.res, type="barcode",geneset.id1="set22", geneset.id2="set33")
library(genefilter)
# use a pre-ranking of genes
genes.ttest = rowttests(x, as.factor(c(rep(1,10),rep(2,10))))
gsa.res.tt <- gsaWilcoxSurv(gmt, genenames=rownames(x),
statistics=genes.ttest[,1])
# now test some gene signatures on our Affymetrix example data (Beer et. al
# 2002)
data(beer.exprs)
data(beer.survival)
library(hu6800.db)
library(annotate)
gmt <- gsaReadGmt(system.file("extdata/ovarian_gene_signatures.gmt", package = "survHD"))
# the Gmt file contains gene symbols, so we translate it to Affymetrix
genes <- getSYMBOL(rownames(beer.exprs), "hu6800")
gmt.affy <- gsaTranslateGmt(gmt, beer.exprs, genes)
gsa.res <- gsaWilcoxSurv(gmt.affy, beer.exprs, Surv(beer.survival[,2], beer.survival[,1]))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.