testOneGraph(DEGraph)
testOneGraph()所属R语言包:DEGraph
Applies a serie of two-sample tests to each connected component
适用于两样本测试意甲每个连接组件
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Applies a serie of two-sample tests to each connected component of a graph using various statistics.
两样本测试系列适用于使用各种统计图的每一个连接的组件。
用法----------Usage----------
testOneGraph(graph, data, classes, useInteractionSigns=TRUE, ..., verbose=FALSE)
参数----------Arguments----------
参数:graph
A graph object.
一个graph对象。
参数:data
A 'matrix' (size: number 'p' of genes x number 'n' of samples) of gene expression.
一个“矩阵”(大小:基因数目的p样品的数量xN)的基因表达。
参数:classes
A 'vector' (length: 'n') of class assignments.
一个“向量”(长度:N)的课堂作业。
参数:useInteractionSigns
A logical value indicating whether the sign of interaction should be taken into account.
一个logical值,该值指示是否应考虑采取互动的迹象。
参数:...
Further arguments to be passed to testOneConnectedComponent.
被传递到testOneConnectedComponent的进一步论据。
参数:verbose
If TRUE, extra information is output.
如果TRUE,输出额外的信息。
值----------Value----------
A structured list containing the p-values of the tests, the graph object of the connected component and the number of retained Fourier dimensions.
一个结构性的list包含测试的p值,graph连接组件对象和保留傅立叶尺寸的数量。
作者(S)----------Author(s)----------
Laurent Jacob, Pierre Neuvial and Sandrine Dudoit
参见----------See Also----------
testOneConnectedComponent()
testOneConnectedComponent()
举例----------Examples----------
library("Rgraphviz")
library("KEGGgraph")
## library("NCIgraph")[#库(“NCIgraph”)]
data("Loi2008_DEGraphVignette")
exprData <- exprLoi2008
classData <- classLoi2008
annData <- annLoi2008
rn <- rownames(exprData)
## Retrieve expression levels data for genes from one KEGG pathway[#从一个KEGG通路的基因表达水平的数据检索]
graph <- grListKEGG[[1]]
pname <- attr(graph, "label")
print(pname)
## DEGraph T2 test[#DEGraph T2检验]
resList <- testOneGraph(graph, exprData, classData, verbose=TRUE, prop=0.2)
## Largest connected component[#最大的连接组件]
res <- resList[[1]]
gr <- res$graph
## individual t statistics[#个人的t统计量]
shift <- apply(exprData, 1, FUN=function(x) {
tt <- t.test(x[classData==0], x[classData==1])
tt$statistic
})
names(shift) <- translateGeneID2KEGGID(names(shift))
## color palette[#调色板]
if (require(marray)) {
pal <- maPalette(low="red", high="green", mid="black", k=100)
} else {
pal <- heat.colors(100)
}
## plot results[#积结果]
dn <- getDisplayName(gr, shortLabel=TRUE)
mm <- match(translateKEGGID2GeneID(nodes(gr)), rownames(annData))
dn <- annData[mm, "NCBI.gene.symbol"]
pvg <- plotValuedGraph(gr, values=shift, nodeLabels=dn, qMax=0.95, colorPalette=pal, height=40, lwd=1, verbose=TRUE, cex=0.5)
title(pname)
txt1 <- sprintf("p(T2)=%s", signif(res$p.value[1], 2))
txt2 <- sprintf("p(T2F[%s])=%s", res$k, signif(res$p.value[2]))
txt <- paste(txt1, txt2, sep="\n")
stext(side=3, pos=1, txt)
if (require(fields)) {
image.plot(legend.only=TRUE, zlim=range(pvg$breaks), col=pal, legend.shrink=0.3, legend.width=0.8, legend.lab="t-scores", legend.mar=3.3)
}
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|