windowCounts(ChIPseqR)
windowCounts()所属R语言包:ChIPseqR
Summarize read counts in a sliding window
总结在一个滑动窗口的阅读计数
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Read counts are summarized in a sliding window of variable size with variable overlap between windows.
读取计数总结在与窗口之间的变量重叠可变大小的滑动窗口。
用法----------Usage----------
windowCounts(reads, window = 1000, shift = 500, method = sum)
参数----------Arguments----------
参数:reads
Numeric vector of read counts.
读取计数的数值向量。
参数:window
Width of window.
窗口的宽度。
参数:shift
Distance between consecutive window start positions.
连续窗口开始位置之间的距离。
参数:method
Function used to produce a summary for each window. It should accept a single numeric vector as argument.
函数用来产生一个总结,对每个窗口。它应该接受单一数字作为参数向量。
值----------Value----------
If method returns a single value a vector of all window summaries is returned, otherwise the return value is a list with one component for each window.
如果method返回单个值的所有窗口摘要向量返回,否则返回值是与每个窗口的一个组成部分的列表。
作者(S)----------Author(s)----------
Peter Humburg
举例----------Examples----------
## generate some very simple artificial read data[#产生一些非常简单的人工读取数据。]
set.seed(1)
fwd <- sample(c(50:70, 250:270), 30, replace=TRUE)
rev <- sample(c(197:217, 347:417), 30, replace=TRUE)
## create data.frame with read positions as input to strandPileup[#创建一个数据框读输入到strandPileup的位置]
reads <- data.frame(chromosome="chr1", position=c(fwd, rev),
length=25, strand=factor(rep(c("+", "-"), times=c(30, 30))))
## create object of class ReadCounts[#创建对象类ReadCounts]
readPile <- strandPileup(reads, chrLen=501, extend=1, plot=FALSE, compress=FALSE)
## get number of reads in sliding window[#在滑动窗口的读取数]
wdwCount <- windowCounts(apply(readPile[[1]], 1, sum), window=10, shift=5)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|