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

R语言 AnnotationDbi包 Bimap-keys()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-2-25 11:55:26 | 显示全部楼层 |阅读模式
Bimap-keys(AnnotationDbi)
Bimap-keys()所属R语言包:AnnotationDbi

                                        Methods for manipulating the keys of a Bimap object
                                         操纵一个bimap对象键的方法

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

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

These methods are part of the Bimap interface (see ?Bimap for a quick overview of the Bimap objects and their interface).
这些方法的bimap的接口的一部分(见?Bimap一个bimap的对象和它们的接口的简要概述)。


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


  keys(x, keytype)
  #length(x)
  isNA(x)
  mappedkeys(x)
  count.mappedkeys(x)
  keys(x) <- value
  #x[i]



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

参数:x
A Bimap object. If the method being caled is keys(x), then x can also be a AnnotationDb object or one of that objects progeny.  
一个bimap对象。如果被caled方法是keys(x),则x也可以是一个AnnotationDb对象或子代的对象之一。


参数:value
A character vector containing the new keys (must be a subset of the current keys).  
一个特征向量,包含新键(必须是当前键的子集)。


参数:i
A character vector containing the keys of the map elements to extract.  
字符向量的图元素的键提取。


参数:keytype
the keytype to indicate which kind of keys are desired from keys when used on a AnnotationDb object. This argument is only supported for the keys method when used on an AnnotationDb object or any object derived from one.  
公钥类型,以表明是从keys需要哪种键AnnotationDb对象时使用。“ keys方法AnnotationDb对象或从一个派生的任何对象上使用时只支持这种说法。


Details

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

keys(x) returns the set of all valid keys for map x. For example, keys(hgu95av2GO) is the set of all probe set IDs for chip hgu95av2 from Affymetrix.
keys(x)返回所有有效键为图x。例如,keys(hgu95av2GO)是为一套芯片hgu95av2从Affymetrix公司所有探针组ID。

Please Note that in addition to Bimap objest, keys(x) will also work for AnnotationDb objects and related objects such as OrgDb and ChipDb objects.
请注意,除了Bimapobjestkeys(x)还将AnnotationDb如OrgDb和ChipDb对象的对象和相关对象。

Note also that the double bracket operator [[ for Bimap objects is guaranteed to work only with a valid key and will raise an error if the key is invalid. (See ?`AnnDbBimap-envirAPI` for more information about this operator.)
还要注意双括号运算符[[bimap的对象是保证只有一个有效的关键工作和关键是无效的,将引发一个错误。 (见?AnnDbBimap-envirAPI有关此操作的更多信息。)

length(x) is equivalent to (but more efficient than) length(keys(x)).
length(x)相当于(但效率比)length(keys(x))。

A valid key is not necessarily mapped ([[ will return an NA on an unmapped key).
一个有效的密钥不一定映射([[将返回一个未映射的键NA)。

isNA(x) returns a logical vector of the same length as x where the TRUE value is used to mark keys that are NOT mapped and the FALSE value to mark keys that ARE mapped.
isNA(x)返回一个x其中TRUE值用来标记未映射的键FALSE值纪念钥匙,被映射的相同长度的逻辑向量。

mappedkeys(x) returns the subset of keys(x) where only mapped keys were kept.
mappedkeys(x)keys(x)只映射的键保持返回的子集。

count.mappedkeys(x) is equivalent to (but more efficient than) length(mappedkeys(x)).
count.mappedkeys(x)相当于(但效率比)length(mappedkeys(x))。

Two (almost) equivalent forms of subsetting a Bimap object are provided: (1) by setting the keys explicitely and (2) by using the single bracket operator [ for Bimap objects. Let's say the user wants to restrict the mapping to the subset of valid keys stored in character vector mykeys. This can be done either with keys(x) <- mykeys (form (1)) or with y <- x[mykeys] (form (2)). Please note that form (1) alters object x in an irreversible way (the original keys are lost) so form (2) should be preferred.
两个几乎相当于一个bimap对象的子集的形式提供:(1)明确地设置键(2)使用单一的括号运算符[ bimap的对象。比方说,用户要限制映射到特征向量mykeys有效的密钥存储的子集。这可以做keys(x) <- mykeys(表(1))或y <- x[mykeys](表格(2))。请注意形式(1)改变对象x在一个不可逆转的方式(原来的钥匙丢失)这样的形式(2)应优先考虑。

All the methods described on this pages are "directed methods" i.e. what they return DOES depend on the direction of the Bimap object that they are applied to (see ?direction for more information about this).
在这个网页中介绍的方法是“指导方法”,即他们返回取决于bimap的对象的方向,它们应用到(见?direction关于此的更多信息)。


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

A character vector for keys and mappedkeys.
一个特征向量keys和mappedkeys。

A single non-negative integer for length and count.mappedkeys.
一个单一的非负整数length和count.mappedkeys。

A logical vector for isNA.
一个的isNA逻辑的向量。

A Bimap object of the same subtype as x for x[i].
一个xx[i]同一亚型的bimap的对象。


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


H. Pages



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

Bimap, AnnDbBimap-envirAPI, Bimap-toTable, BimapFormatting, AnnotationDb, select, cols
bimap的,AnnDbBimap envirAPI,bimap的toTable,BimapFormatting,AnnotationDb,选择,COLS


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


  library(hgu95av2.db)
  x <- hgu95av2GO
  x
  length(x)
  count.mappedkeys(x)
  x[1:3]
  links(x[1:3])

  ## Keep only the mapped keys[#只保留映射的键。]
  keys(x) <- mappedkeys(x)
  length(x)
  count.mappedkeys(x)
  x # now it is a submap[现在它是子映射]

  ## The above subsetting can also be achieved with[#以上的子集,也可以实现]
  x <- hgu95av2GO[mappedkeys(hgu95av2GO)]

  ## mappedkeys() and count.mappedkeys() also work with an environment[,#mappedkeys()和count.mappedkeys()工作环境]
  ## or a list[#或列表]
  z <- list(k1=NA, k2=letters[1:4], k3="x")
  mappedkeys(z)
  count.mappedkeys(z)

  ## retrieve the set of primary keys for the ChipDb object named 'hgu95av2.db'[#检索为名为“hgu95av2.db”ChipDb对象的主键]
  keys <- keys(hgu95av2.db)
  head(keys)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-1-23 15:08 , Processed in 0.024867 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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