找回密码
 注册
查看: 516|回复: 0

R语言 IRanges包 RangesList-utils()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-2-25 22:30:47 | 显示全部楼层 |阅读模式
RangesList-utils(IRanges)
RangesList-utils()所属R语言包:IRanges

                                        RangesList utility functions
                                         RangesList实用功能

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Utility functions for manipulating RangesList objects.
实用的操作RangesList对象的功能。


用法----------Usage----------


# Intra-interval operations
## S4 method for signature 'RangesList'
flank(x, width, start=TRUE, both=FALSE, use.names=TRUE)
## S4 method for signature 'RangesList'
narrow(x, start=NA, end=NA, width=NA, use.names=TRUE)
## S4 method for signature 'RangesList'
resize(x, width, fix="start", use.names=TRUE)
## S4 method for signature 'RangesList'
restrict(x, start=NA, end=NA, keep.all.ranges=FALSE, use.names=TRUE)
## S4 method for signature 'RangesList'
shift(x, shift, use.names=TRUE)

# Inter-interval operations
## S4 method for signature 'RangesList'
disjoin(x)
## S4 method for signature 'RangesList'
gaps(x, start=NA, end=NA)
## S4 method for signature 'RangesList'
range(x, ..., na.rm = FALSE)
## S4 method for signature 'RangesList'
reduce(x, drop.empty.ranges=FALSE, min.gapwidth=1L,
                              with.inframe.attrib=FALSE)

# Set operations
## S4 method for signature 'RangesList,RangesList'
union(x, y)
## S4 method for signature 'RangesList,RangesList'
intersect(x, y)
## S4 method for signature 'RangesList,RangesList'
setdiff(x, y)



参数----------Arguments----------

参数:x, y
A RangesList
一个RangesList


参数:start, end
For flank, start must be either a logical vector or a LogicalList object indicating whether x should be flanked at the start (TRUE) or the end (FALSE). Recycled as necessary so that each element corresponds to a range in x.  For narrow, start and end must be either an integer vector or a IntegerList object containing coordinates relative to the current ranges.  For restrict, start and end must be either a single integer or NA.  For gaps, start and end must be an integer vector containing the coordinate bounds for each RangesList element.  
flank,start必须是一个逻辑向量,或LogicalList的对象,表明是否x应在两侧开始(TRUE)或结束(FALSE )。回收作为必要使每个元素对应一个x的范围。 narrow,start和end必须是一个整数向量或1 IntegerList对象,其中包含相电流范围。 restrict,start和end必须是一个整数或NA。 gaps,start和end必须是一个整数向量包含每个RangesList元素的坐标范围。


参数:width
For flank and resize, either an integer vector or an IntegerList object containing the width of the flanking or resized regions. Recycled as necessary so that each element corresponds to a range in x. (Note for flank: if both is TRUE, this is effectively doubled.)   For narrow, either an integer vector or a IntegerList object containing the widths to narrow to. See the SEW (Start/End/Width) interface for the details (?solveUserSEW).  
flank和resize,一个整数向量,或IntegerList对象,其中包含侧翼或调整大小的区域的宽度。回收作为必要使每个元素对应一个x的范围。 (注意事项flank如果both是TRUE,这是有效地增加了一倍。)narrow,是一个整数向量,或IntegerList对象包含的宽度缩小到。看到,SEW(开始/结束/宽)接口的细节(?solveUserSEW)。


参数:both
If TRUE, extends the flanking region width positions into the range. The resulting range thus straddles the end point, with width positions on either side.  
如果TRUE“的范围延伸到侧翼区width阵地。由此产生的范围跨越了终点,用width两边的位置。


参数:use.names
TRUE or FALSE. Should names be preserved?  
TRUE或FALSE。应名被保留吗?


参数:fix
For resize, a character vector of length 1, a CharacterList object, or a 'character' RleList object containing the values "start", "end", and "center" denoting what to use as an anchor for each element in x.  
resize,特征向量的长度1,CharacterList的对象,或字符RleList对象包含值"start","end","center"汉语表使用作为一个每个x元素的锚。


参数:keep.all.ranges
TRUE or FALSE. Should ranges that don't overlap with the interval specified by start and end be kept? Note that "don't overlap" means that they end strictly before start - 1 or start strictly after end + 1. Ranges that end at start - 1 or start at end + 1 are always kept and their width is set to zero in the returned RangesList object.  
TRUE或FALSE。应与由start和end保持指定的时间间隔不重叠的范围?注意,“不重叠”的意思,他们结束前start - 1严格,或启动后end + 1严格。范围年底start - 1启动end + 1始终保持其宽度设置为零,在返回RangesList对象。


参数:shift
Either an integer vector or a IntegerList object containing the shift information. Recycled as necessary so that each element corresponds to a range in x.  
一个整数向量,或IntegerList对象,其中包含移位信息。回收作为必要使每个元素对应一个x的范围。


参数:drop.empty.ranges
TRUE or FALSE. Should empty ranges be dropped?  
TRUE或FALSE。应该被丢弃空范围?


参数:min.gapwidth
Ranges separated by a gap of at least min.gapwidth positions won't be merged in the Ranges object returned by reduce. Otherwise, they will.  
由间隙分隔的范围至少min.gapwidth职位将不会被合并在reduce返回的范围,对象。否则,他们会。


参数:with.inframe.attrib
TRUE or FALSE. For internal use.  
TRUE或FALSE。供内部使用。


参数:...
For range, additional RangesList to consider.  
range,额外的RangesList考虑。


参数:na.rm
Ignored
忽视


Details

详情----------Details----------

The flank method generates flanking ranges for each range in x.
flank方法为每个范围生成x侧翼范围。

The narrow method narrows the ranges in x i.e. each range in the returned RangesList object is a subrange of the corresponding range in x.
narrow方法x即每个返回RangesList对象的范围是在x一个相应的范围内的子区间范围缩小。

The resize method resizes the ranges to the specified width where either the start or end is used as an anchor.
resize方法调整的范围作为一个锚,开始或结束指定的宽度。

The restrict method restricts the ranges in x to the interval specified by the start and end arguments.
在restrictx方法限制范围的start和end参数指定的时间间隔。

The shift method shifts all the ranges in x.
shiftx方法转移的范围。

The disjoin method returns disjoint ranges by finding the  within element union of the end points of x.
disjoin方法返回不相交的范围内查找元素x终点工会。

The gaps method takes the complement (via gaps) of each element in the list and returns the result as a RangesList.
gaps方法需要补(通过gaps)列表中的每个元素,并返回结果,作为一个RangesList。

range finds the range, i.e. a Ranges with one range, from the minimum start to the maximum end, on each element in x and returns the result as a RangesList. If there are additional RangesList objects in ..., they are merged into x by name, if all objects have names, otherwise, if they are all of the same length, by position. Else, an exception is thrown.
range发现range,即Ranges同一个范围,从最低开始最大的结束,对每个元素在x,<返回结果X>。如果有额外的RangesList对象RangesList,他们...的名字,如果所有对象的名称,否则,如果他们是所有相同的长度,按位置合并。否则,抛出一个异常。

The reduce method merges (via reduce) each of the elements in the list and returns the result as a RangesList.
reduce法合并(通过reduce)每个列表中的元素,并返回结果,作为一个RangesList。

The union method performs elementwise union operations for two RangesList objects.
union方法执行两个union对象的elementwiseRangesList操作。

The intersect method performs elementwise intersect operations for two RangesList objects.
intersect方法执行两个intersect对象的elementwiseRangesList操作。

The setdiff method performs elementwise setdiff operations for two RangesList objects.
setdiff方法执行两个setdiff对象的elementwiseRangesList操作。


值----------Value----------

A RangesList object. For flank, narrow, resize, restrict, and shift, the length is the same as that of x.
一个RangesList对象。 flank,narrow,resize,restrict,shift,长作为x相同。


作者(S)----------Author(s)----------


Michael Lawrence, H. Pages, P. Aboyoun



参见----------See Also----------

RangesList, Ranges-utils
RangesList,Ranges-utils


举例----------Examples----------


  range1 <- IRanges(start=c(1,2,3), end=c(5,2,8))
  range2 <- IRanges(start=c(15,45,20,1), end=c(15,100,80,5))
  range3 &lt;- IRanges(start=c(-2,6,7), width=c(8,0,0))  # with empty ranges[空范围]
  collection <- RangesList(one = range1, range2, range3)

  shift(collection, shift=5)
  restrict(collection, start=2, end=8)
  resize(collection, width=200)
  flank(collection, width=10)
  disjoin(collection)

  # these three are the same[这三个是相同的]
  reduce(collection)
  RangesList(one = reduce(range1), reduce(range2), reduce(range3))
  do.call(RangesList, lapply(collection, reduce))

  # drop empty ranges[删除空范围]
  reduce(collection, drop.empty.ranges=TRUE)

  # these three are the same[这三个是相同的]
  gaps(collection)
  RangesList(one = gaps(range1), gaps(range2), gaps(range3))
  do.call(RangesList, lapply(collection, gaps))

  # 'range'[“范围”]
  rl <- RangesList(a = IRanges(c(1,2),c(4,3)), b = IRanges(c(4,6),c(10,7)))
  rl2 <- RangesList(c = IRanges(c(0,2),c(4,5)), a = IRanges(c(4,5),c(6,7)))
  range(rl, rl2) # matched by names[再配以名]
  names(rl2) <- NULL
  range(rl, rl2) # now by position[现在位置]

  # set operations[设置操作]
  union(rl, rl2)
  intersect(rl, rl2)
  setdiff(rl, rl2)

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-2-5 14:02 , Processed in 0.027397 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表