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

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

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

                                        GappedRanges objects
                                         GappedRanges对象

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

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

The GappedRanges class is a vector-like container for storing a set of "gapped ranges".
GappedRanges类是一个存储组“间隙范围”的向量样的容器。


Details

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

A "gapped range" is conceptually the union of 1 or more non-overlapping (and non-empty) ranges ordered from left to right. More precisely, a "gapped range" can be represented by a normal IRanges object of length >= 1. In particular normality here ensures that the individual ranges are non-empty and are separated by non-empty gaps. The start of a "gapped range" is the start of its first range. The end of a "gapped range" is the end of its last range. If we ignore the gaps, then a GappedRanges object can be seen as a Ranges object.
一个“跳空范围”概念的工会1个或多个非重叠(非空)的范围从左至右排列。更确切地说,“跳空范围”可以表示长度> = 1正常IRanges的对象。在这里特别正常,确保个人的范围非空,非空差距分隔。 “开始”跳空范围是它的第一个范围的开始。 “跳空范围”到底是其最后一个范围的结束。如果我们忽视的差距,然后GappedRanges对象可以作为一个范围对象。


构造----------Constructor----------

No constructor function is provided for GappedRanges objects. The coercion methods described below can be used to create GappedRanges objects.
没有提供GappedRanges对象的构造函数。下文所述的强制方法可用于创建GappedRanges对象。


强迫----------Coercion----------

as(from, "GappedRanges"): Turns a CompressedNormalIRangesList or CompressedIRangesList object into a GappedRanges object.
as(from, "GappedRanges"):打开1成GappedRanges对象的CompressedNormalIRangesList或CompressedIRangesList的对象。

as(from, "RangesList"): Turns a GappedRanges object into a RangesList object (more precisely the result will be a CompressedNormalIRangesList object).
as(from, "RangesList"):打开成RangesList对象(更准确的结果将是一个CompressedNormalIRangesList对象)1 GappedRanges对象。


存取方法----------Accessor methods----------

In the code snippets below, x is a GappedRanges object.
在下面的代码片段,x是GappedRanges对象。

length(x): Returns the number of "gapped ranges" in x.
length(x):返回x“间隙范围”。

start(x), end(x): Returns an integer vector of length length(x) containing the start and end (respectively) of each "gapped range" in x. See Details section above for the exact definitions of the start and end of a "gapped range".
start(x), end(x):返回一个长整数向量length(x)包含在x每个“跳空的范围”的开始和结束(分别)。 “跳空的范围”的开始和结束的确切的定义,请参阅详细资料“节以上。

width(x): Defined as end(x) - start(x) + 1L.
width(x):定义为end(x) - start(x) + 1L。

ngap(x): Returns an integer vector of length length(x) containing the number of gaps for each "gapped range" in x. Equivalent to elementLengths(x) - 1L.
ngap(x):返回一个长整数向量length(x)x为每一个“间隙范围”包含的多项空白。“相当于elementLengths(x) - 1L。

names(x): NULL or a character vector of length length(x).
names(x):NULL或特征向量的长度length(x)。


子集和相关的操作----------Subsetting and related operations----------

In the code snippets below, x is a GappedRanges object.
在下面的代码片段,x是GappedRanges对象。

x[i]: Returns a new GappedRanges object made of the selected "gapped ranges". i can be a numeric, character or logical vector, or any of the types supported by the [ method for CompressedNormalIRangesList objects.
x[i]:返回新GappedRanges,选择“跳空范围”的对象。 i可以是一个数字,字符或逻辑向量,或任何支持的类型[为CompressedNormalIRangesList对象的方法。

x[[i]]: Returns the NormalIRanges object representing the i-th element in x. Equivalent to as(from, "RangesList")[[i]]. i can be a single numeric value or a single character string.
x[[i]]:将NormalIRanges返回对象,表示在xi个元素。相当于as(from, "RangesList")[[i]]。 i可以是一个单一的数值或一个字符串。

elemenType(x): Returns the type of x[[i]] as a single string (always "NormalIRanges"). Note that the semantic of the [[ method for GappedRanges objects is different from the semantic of the method for Ranges objects (the latter returns an integer vector).
elemenType(x):返回类型的x[[i]]作为一个单一字符串(总是"NormalIRanges")。请注意,[[的GappedRanges对象方法的语义从语义范围对象(后者返回一个整数向量)的方法是不同的。

elementLengths(x): Semantically equivalent to
elementLengths(x):语义上等同于


结合及相关业务----------Combining and related operations----------

In the code snippets below, x is a GappedRanges object.
在下面的代码片段,x是GappedRanges对象。

c(x, ...): Combine x and the GappedRanges objects in ... together. The result is an object of the same class as x.
c(x, ...):结合x和...一起GappedRanges对象。其结果是为x同一类的对象。


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


H. Pages



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

Ranges-class, CompressedNormalIRangesList-class
范围类,CompressedNormalIRangesList-级


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


  ## The 3 following IRanges objects are normal. Each of them will be[#3以下IRanges对象,是正常的。他们每个人都将是]
  ## stored as a "gapped range" in the GappedRanges object 'gr'.[#存储为一个“跳空”在该GappedRanges对象GR范围。]
  ir1 <- IRanges(start=c(11, 21, 23), end=c(15, 21, 30))
  ir2 <- IRanges(start=-2, end=15)
  ir3 <- IRanges(start=c(-2, 21), end=c(10, 22))
  irl <- IRangesList(ir1, ir2, ir3)

  gr <- as(irl, "GappedRanges")
  gr

  length(gr)
  start(gr)
  end(gr)
  width(gr)
  ngap(gr)
  gr[-1]
  gr[ngap(gr) >= 1]
  gr[[1]]
  as.integer(gr[[1]])
  gr[[2]]
  as.integer(gr[[2]])
  as(gr, "RangesList")
  start(as(gr, "RangesList"))  # not the same as 'start(gr)'[不一样的“开始(GR)]

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-2-5 13:58 , Processed in 0.019336 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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