coverage(IRanges)
coverage()所属R语言包:IRanges
Coverage across a set of ranges
覆盖全国的范围
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Counts the number of times a position is represented in a set of ranges.
计算一个位置是在一组范围代表的次数。
用法----------Usage----------
coverage(x, shift=0L, width=NULL, weight=1L, ...)
## S4 method for signature 'RangesList'
coverage(x,
shift = structure(rep(list(0L), length(x)), names = names(x)),
width = structure(rep(list(NULL), length(x)), names = names(x)),
weight = structure(rep(list(1L), length(x)), names = names(x)),
method = c("sort", "hash"))
参数----------Arguments----------
参数:x
An IRanges, Views, MaskCollection, RangesList, RangedData object, or any object for which a coverage method is defined.
一个IRanges,次数,MaskCollection,RangesList,RangedData对象,或任何一个coverage方法定义的对象。
参数:shift
For most methods, an integer vector (recycled to the length of x) specifying how each element in x should be (horizontally) shifted before the coverage is computed. Only shifted indices in the range [1, width] will be included in the coverage calculation. For RangesList and RangedData objects, a list or vector of the same length as x to be used for the corresponding element in x. In addition for RangedData objects, can also be a character vector of length 1 denoting the column to use in values(x).
对于大多数方法,整数向量(回收的x长度)指定如何在x应该是(水平)的每个元素转移的覆盖率计算之前。只有转移的指标范围内[1width]将覆盖计算。对于RangesList和RangedData对象,列表或x相应的元素在x使用相同长度的向量。除了在为RangedData的对象,也可以是一个长度为1的特征向量,表示该列使用values(x)。
参数:width
For most methods, the length of the returned coverage vector. For RangesList and RangedData objects, a list or vector of the same length as x to be used for the corresponding element in x. In addition for RangedData objects, can also be a character vector of length 1 denoting the column to use in values(x). If width=NULL (the default), then the specific coverage method that is actually selected will choose the length of the returned vector "in a way that makes sense". For example, when width=NULL, the method for IRanges objects returns a vector that has just enough elements to have its last element aligned with the rightmost end of all the ranges in x after those ranges have been shifted (see the shift argument above). This ensures that any longer coverage vector would be a "padded with zeros" version of the vector returned when width=NULL. When width=NULL, the method for Views objects returns a vector with length(subject(x)) elements. When width=NULL, the method for MaskCollection objects returns a vector with width(x) elements.
对于大多数方法,返回覆盖向量的长度。对于RangesList和RangedData对象,列表或x相应的元素在x使用相同长度的向量。除了在为RangedData的对象,也可以是一个长度为1的特征向量,表示该列使用values(x)。如果width=NULL(默认),然后具体coverage方法,实际上是选择将选择返回的向量“的方式,使感”的长度。例如,当width=NULL,IRanges对象的方法返回一个向量,有足够的元素与所有范围的右边结束的最后一个元素对齐x的范围后,已转移(看到上面的shift参数)。这将确保任何覆盖向量将不再是“零填充”向量版本时返回width=NULL。当width=NULL,视图对象的方法返回length(subject(x))元素的向量。当width=NULL,MaskCollection对象的方法返回width(x)元素的向量。
参数:weight
For most methods, an integer vector specifying how much each element in x counts. For RangesList and RangedData objects, a list or vector of the same length as x to be used for the corresponding element in x. For RangedData objects, this can also be a single string naming a column to be used as the weights.
对于大多数方法,指定一个整数的向量多少x计数的每个元素。对于RangesList和RangedData对象,列表或x相应的元素在x使用相同长度的向量。 RangedData对象,这也可以是一个单一的字符串,命名为权重,以中使用的列。
参数:method
Settings method to hash is intended only for large x objects. If method is set to the sort default, then x is sorted during the calculation of the coverage Rle. If method is set to hash, then x is hashed to a vector of size width. Note that setting method to hash saves time on large x vectors, but at the expense of additional memory usage.
设置methodhash大x对象只打算。“如果methodsort默认设置,然后x排序在计算覆盖RLE。如果method设置为hash,x散列大小width向量。注意:该设置methodhash大x向量节省时间,但在额外的记忆体使用的费用。
参数:...
Further arguments to be passed to or from other methods.
进一步的参数被传递或其他方法。
值----------Value----------
For most methods, an Rle object representing the coverage of x. For RangesList and RangedData objects, a SimpleRleList object representing a list of coverage vectors.
对于大多数方法,RLE对象代表x的覆盖面。对于RangesList和RangedData对象,SimpleRleList对象代表一个覆盖向量列表。
An integer value called the "coverage" can be associated to each position in x, indicating how many times this position is covered by the elements contained in x. For example, if x is a Views object, the coverage of a given position in subject(x) is the number of views it belongs to.
被称为“覆盖”,可以关联一个整型值每个x的位置,说明这个位置由x包含的元素覆盖多少次。例如,如果x是一个视图对象,覆盖范围在一个给定的位置subject(x)是它所属的若干意见。
作者(S)----------Author(s)----------
H. Pages and P. Aboyoun
参见----------See Also----------
IRanges-class, Views-class, Rle-class, MaskCollection-class
IRanges-类,视图类,RLE一流的,一流的MaskCollection
举例----------Examples----------
x <- IRanges(start=c(-2L, 6L, 9L, -4L, 1L, 0L, -6L, 10L),
width=c( 5L, 0L, 6L, 1L, 4L, 3L, 2L, 3L))
coverage(x)
coverage(x, shift=7)
coverage(x, shift=7, width=27)
coverage(restrict(x, 1, 10))
coverage(reduce(x), shift=7)
coverage(gaps(shift(x, 7), start=1, end=27))
mask1 <- Mask(mask.width=29, start=c(11, 25, 28), width=c(5, 2, 2))
mask2 <- Mask(mask.width=29, start=c(3, 10, 27), width=c(5, 8, 1))
mask3 <- Mask(mask.width=29, start=c(7, 12), width=c(2, 4))
mymasks <- append(append(mask1, mask2), mask3)
coverage(mymasks)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|