hyper.test(DEGraph)
hyper.test()所属R语言包:DEGraph
Performs an hypergeometric test of enrichment of a set of
执行一套浓缩的超几何测试
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Performs an hypergeometric test of enrichment of a set of hypotheses in significant elements.
执行一个显着元素的一组假说富集超几何测试。
用法----------Usage----------
hyper.test(p.values, testSet, thr=0.001, universe=length(p.values), verbose=FALSE)
参数----------Arguments----------
参数:p.values
A named numeric vector giving the p-values of all tested elements.
一个名为numeric向量给所有测试元素的p值。
参数:testSet
A character vector giving the ids of the elements in the tested set. Elements of 'testSet' must have a match in 'names(p.values)'.
一个character向量,使在测试集的元素的ID。 “testSet元素必须有一场比赛,在”名称(p.values)。
参数:thr
A numeric value between 0 and 1 giving the threshold on p-values at which an element is declared to be significant.
一个numeric值介于0和1给一个元素被宣布为显著的p值的阈值。
参数:universe
An integer value giving the number of elelments in the considered universe. Defaults to 'length(p.values)'.
integer价值给予的认为宇宙elelments数。默认为长度(p.values)的“。
参数:verbose
If TRUE, extra information is output.
如果TRUE,输出额外的信息。
值----------Value----------
A list with class "htest" containing the following components:
一个list类“htest”包含以下组件:
statistic A numeric value, the test statistic.
统计一个numeric值,检验统计量。
p.value A numeric value, the corresponding p-value.
p.value一个numeric值,相应的p值。
作者(S)----------Author(s)----------
Laurent Jacob, Pierre Neuvial and Sandrine Dudoit
参见----------See Also----------
AN.test() BS.test() graph.T2.test()
AN.test()BS.test()graph.T2.test()
举例----------Examples----------
library("KEGGgraph")
## library("NCIgraph")[#库(“NCIgraph”)]
library("rrcov")
data("Loi2008_DEGraphVignette")
exprData <- exprLoi2008
classData <- classLoi2008
rn <- rownames(exprData)
## Retrieve expression levels data for genes from one KEGG pathway[#从一个KEGG通路的基因表达水平的数据检索]
gr <- grListKEGG[[1]]
gids <- translateKEGGID2GeneID(nodes(gr))
mm <- match(gids, rownames(exprData))
## Keep genes from the graph that are present in the expression data set[#远离基因图,是在表达数据集]
idxs <- which(!is.na(mm))
gr <- subGraph(nodes(gr)[idxs], gr)
idxs <- which(is.na(mm))
if(length(idxs)) {
print("Gene ID not found in expression data: ")
str(gids[idxs])
}
dat <- exprData[na.omit(mm), ]
str(dat)
X1 <- t(dat[, classData==0])
X2 <- t(dat[, classData==1])
## DEGraph T2 test[#DEGraph T2检验]
res <- testOneGraph(gr, exprData, classData, verbose=TRUE, prop=0.2)
## T2 test (Hotelling)[#T2检验(霍特林)]
rT2 <- T2.test(X1, X2)
str(rT2)
## Adaptive Neyman test[#自适应奈曼测试]
rAN <- AN.test(X1, X2, na.rm=TRUE)
str(rAN)
## Adaptive Neyman test from Fan and Lin (1998)[#自适应奈曼测试范和林(1998)]
rAN <- AN.test(X1, X2, na.rm=TRUE)
str(rAN)
## Test from Bai and Saranadasa (1996)[#测试从白和Saranadasa(1996)]
rBS <- BS.test(X1, X2, na.rm=TRUE)
str(rBS)
## Hypergeometric test[#超几何测试]
pValues <- apply(exprData, 1, FUN=function(x) {
tt <- t.test(x[classData==0], x[classData==1])
tt$p.value
})
str(pValues)
names(pValues) <- rownames(exprData)
rHyper <- hyper.test(pValues, gids, thr=0.01)
str(rHyper)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|