movbin(reb)
movbin()所属R语言包:reb
movbin
movbin
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This function analyzes ordered data series to identify regional biases using an moving (running) approximated binomial test.
此功能分析排列的一系列数据,使用移动(运行)近似二项式测试,以确定区域的偏见。
用法----------Usage----------
movbin(v,span=NULL,summarize=mean)
参数----------Arguments----------
参数:v
data vector
数据向量
参数:span
numeric vector. Each element is used to define the number of points to include when the approximated binomial test is applied to v. While mixed for the defaults, the span can be specified as fraction of the observation or actual sizes, but not a mixture - defaults to: seq(25,length(v)*.3,by=5)
数字向量。每个元素用于定义点的数量,包括时逼近二项式测试v。虽然混为默认值,跨度可以被指定为观察或实际大小的一小部分,但不是一种混合物 - 默认:SEQ(25(V),长度* .3 = 5)
参数:summarize
function that is used to summarize the results from multiple spans. if NULL, a matrix with length(span) rows and length(v) columns is returned.
函数,用于从多个跨度的总结结果。如果为NULL,则返回一个length(span)行length(v)列的矩阵。
Details
详情----------Details----------
movbin applies a moving binomial test to sequential windows of elements of v. Within each span a z-score from an approximated binomial is computed such that z=(2*r - n)/sqrt(n) where r is the number of positive relative gene expression values and n is the number of non-zero values within each window.
movbinv的元素的顺序窗口应用移动二项式测试。在每个跨度从近似二项式Z-得分计算z=(2*r - n)/sqrt(n)其中r是正相关基因的表达值的数量和n是非零值内每个窗口。
For convenience, this function allows for the specification of multiple window sizes using the span argument. The result of a movbin call will generate a matrix with length(span) rows and length(v) columns. Each row of the matrix represents the data generated from each span. This matrix can be returned or the matrix from can be condensed to a single vector of length v by applying a summary function summarize to the matrix columns.
为方便起见,此功能允许多个窗口使用span参数尺寸规格。 movbin调用的结果将产生一个length(span)行length(v)列的矩阵。矩阵的每一行代表每个跨度所产生的数据。这个矩阵可以利用汇总函数summarize矩阵的列返回,或从矩阵可以浓缩到单个矢量的长度至五。
值----------Value----------
Either a matrix or a vector containing the summarized z-scores from the applied binomial test.
无论是矩阵或矢量包含从二项式测试汇总Z-分数。
作者(S)----------Author(s)----------
Kyle A. Furge, Ph.D., <a href="mailto:kyle.furge@vai.org">kyle.furge@vai.org</a> and Karl J. Dykema, <a href="mailto:karl.dykema@vai.org">karl.dykema@vai.org</a>
举例----------Examples----------
x <- c(rnorm(50,mean=1),rnorm(50,mean=-1),rnorm(100))
layout(1:2)
plot(x,type="h",ylim=c(-5,5))
## apply the approximated binomial with a single span[#适用于与单跨近似二项式]
mb <- movbin(x,span=25,summarize=NULL)
lines(mb[1,])
## try a few different span ranges[#尝试几个不同的跨度范围]
mb <- movbin(x,span=c(10,25,50),summarize=NULL)
lines(mb[1,]) ## span of 10[#10跨度]
lines(mb[2,]) ## span of 25[#25跨度]
lines(mb[3,]) ## span of 50[#50跨度]
## average the results from the different spans[#平均结果从不同的跨度]
plot(x,type="h",ylim=c(-5,5))
mb <- movbin(x,span=c(10,25,50),summarize=mean)
lines(mb,col="blue")
mb <- movbin(x,span=c(10,25,50),summarize=median)
lines(mb,col="red")
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|