sliding.quantile(Ringo)
sliding.quantile()所属R语言包:Ringo
Compute quantile of scores in a sliding window
在滑动窗口计算分数位数
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This functions is used to slide a window of specified size over scores at given positions. Computed is the quantile over the scores in the window.
这个功能是用来指定分数在给定的位置,大小的滑动窗口。计算出的位数以上的分数在窗口。
用法----------Usage----------
sliding.quantile(positions, scores, half.width, prob = 0.5,
return.counts = TRUE)
参数----------Arguments----------
参数:positions
numeric; sorted vector of (genomic) positions of scores
数字;排序向量(基因组)分数的位置
参数:scores
numeric; scores to be smoothed associated to the positions
平滑的数字;分数positions
参数:half.width
numeric, half the window size of the sliding window
数字,滑动窗口的窗口大小的一半
参数:prob
numeric specifying which quantile is to be computed over the scores in the window; default 0.5 means compute the median over the scores.
数字指定位数是要计算超过窗口中的成绩;默认0.5意味着在分数的中位数计算。
参数:return.counts
logical; should the number of points, e.g. probes, that were used for computing the median in each sliding window also returned?
逻辑;点的数量,例如:探针,在每个滑动窗口计算中位数也回来了吗?
值----------Value----------
Matrix with two columns:
两列矩阵:
参数:quantile
medians over running window centered at the positions that were specified in argument positions.
位数以上参数positions在指定位置为中心的运行窗口。
参数:count
number of points that were considered for computing the median at each position
计算中位数在每个位置点的数量
These positions are given as row.names of the resulting vector. If argument return.counts is FALSE, only a vector of the medians is returned, with the positions as names.
这些职位给出作为row.names产生的向量。如果参数return.counts是FALSE,只有一个中位数向量返回与names的位置,。
作者(S)----------Author(s)----------
Oleg Sklyar and Joern Toedling
参见----------See Also----------
quantile
quantile
举例----------Examples----------
sampleSize <- 1000
ap <- cumsum(1+round(runif(sampleSize)*10))
as <- c(rnorm(floor(sampleSize/3)),
rnorm(ceiling(sampleSize/3),mean=1.5),
rnorm(floor(sampleSize/3)))
arm <- sliding.quantile(ap, as, 20)
arq <- sliding.quantile(ap, as, 20, prob=0.25)
plot(ap, as, pch=20, xlab="position",ylab="level")
points(ap, arm[,1], type="l", col="red", lwd=2)
points(ap, arq[,1], type="l", col="green", lwd=2)
legend(x="topleft", legend=c("median","1st quartile"),
col=c("red","green"), lty=1, lwd=2)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|