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

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

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

                                        Methods for getting/setting the direction 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的对象和它们的接口的简要概述)。

They are divided in 2 groups: (1) methods for getting or setting the direction of a Bimap object and (2) methods for getting, counting or setting the left or right keys (or mapped keys only) of a Bimap object. Note that all the methods in group (2) are undirected methods i.e. what they return does NOT depend on the direction of the map (more on this below).
他们分成2组:(1)获取或设置一个bimap对象的方向和(2)方法获得,计数或左或右的一个bimap对象键(或唯一的映射键)的方法。请注意,所有组的方法(2)无向的方法,即他们返回不依赖于图(下面)的方向。


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


  ## Getting or setting the direction of a Bimap object
  direction(x)
  direction(x) <- value
  revmap(x, ...)

  ## Getting, counting or setting the left or right keys (or mapped
  ## keys only) of a Bimap object
  Lkeys(x)
  Rkeys(x)
  Llength(x)
  Rlength(x)
  mappedLkeys(x)
  mappedRkeys(x)
  count.mappedLkeys(x)
  count.mappedRkeys(x)
  Lkeys(x) <- value
  Rkeys(x) <- value
  subset(x, ...)




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

参数:x
A Bimap object.  
一个bimap对象。


参数:value
A single integer or character string indicating the new direction in direction(x) <- value. A character vector containing the new keys (must be a subset of the current keys) in Lkeys(x) <- value and Rkeys(x) <- value.  
一个整数或字符串显示在direction(x) <- value新的方向。一个特征向量,包含新键(必须是当前键的子集)Lkeys(x) <- value和Rkeys(x) <- value。


参数:...
Extra argument for revmap can be:     
revmap额外的参数可以是:

objName The name to give to the reversed map (only supported if x is an AnnDbBimap object).      Extra arguments for subset can be:     
objName给逆转图(只支持如果x是AnnDbBimap的对象)的名称。 subset可以额外的参数:

Lkeys The new Lkeys.   
Lkeys的新Lkeys,。

Rkeys The new Rkeys.   
Rkeys的新Rkeys,。

drop.invalid.keys If drop.invalid.keys=FALSE (the default), an error will be raised if the new Lkeys or Rkeys contain invalid keys i.e. keys that don't belong to the current Lkeys or Rkeys. If drop.invalid.keys=TRUE, invalid keys are silently dropped.   
drop.invalid.keys如果drop.invalid.keys=FALSE(默认),一个错误将引发新Lkeys或Rkeys包含无效的钥匙即钥匙,不属于当前Lkeys或Rkeys。如果drop.invalid.keys=TRUE,无效的键被丢弃。

objName The name to give to the submap (only supported if x is an AnnDbBimap object).      
objName给子图(只支持如果x是AnnDbBimap的对象)的名称。


Details

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

All Bimap objects have a direction which can be left-to-right (i.e. the mapping goes from the left keys to the right keys) or right-to-left (i.e. the mapping goes from the right keys to the left keys). A Bimap object x that maps from left to right is considered to be a direct map. Otherwise it is considered to be an indirect map (when it maps from right to left).
所有bimap的对象有一个方向可以是左到右(即从左边的键映射到正确的键)或右至左(即从右侧键映射到左边的键)。一个bimap对象x映射从左至右被认为是直接映射。否则,它被认为是一种间接的图(右映射到左)。

direction returns 1 on a direct map and -1 otherwise.
direction返回1直接映射和-1否则。

The direction of x can be changed with direction(x) <- value where value must be 1 or -1. An easy way to reverse a map (i.e. to change its direction) is to do direction(x) <- - direction(x), or, even better, to use revmap(x) which is actually the recommended way for doing it.
的x方向可以改变direction(x) <- value值必须是1或-1。扭转图(即改变其方向)一个简单的方法是做direction(x) <- - direction(x),或者,甚至更好,使用revmap(x)这实际上是推荐的方式做。

The Lkeys and Rkeys methods return respectively the left and right keys of a Bimap object. Unlike the keys method (see ?keys for more information), these methods are direction-independent i.e. what they return does NOT depend on the direction of the map. Such methods are also said to be "undirected methods"  and methods like the keys method are said to be "directed methods".
Lkeys和Rkeys方法分别返回一个bimap对象的左边和右边的键。不像keys方法(见?keys更多的信息),这些方法是方向独立,即他们返回不依赖于图的方向。这种方法也有说是“无向的方法”,像keys方法的方法说成是“直接方法”。

All the methods described below are also "undirected methods".
下面介绍的方法是“无向方法”。

Llength(x) and Rlength(x) are equivalent to (but more efficient than) length(Lkeys(x)) and length(Rkeys(x)), respectively.
Llength(x)和Rlength(x)相当于(但效率比)length(Lkeys(x))和length(Rkeys(x)),分别。

The mappedLkeys (or mappedRkeys) method returns the left keys (or right keys) that are mapped to at least one right key (or one left key).
mappedLkeys(mappedRkeys)方法返回左侧键(或右方向键)映射到至少有一个右手键(或左键)。

count.mappedLkeys(x) and count.mappedRkeys(x) are equivalent to (but more efficient than) length(mappedLkeys(x)) and length(mappedRkeys(x)), respectively.  These functions give overall summaries, if you want to know how many Rkeys correspond to a given Lkey you can use the nhit function.
count.mappedLkeys(x)和count.mappedRkeys(x)相当于(但效率比)length(mappedLkeys(x))和length(mappedRkeys(x)),分别。这些功能提供全面的总结,如果你想知道多少Rkeys,对应到一个给定的Lkey你可以使用nhit功能。

Lkeys(x) <- value and Rkeys(x) <- value are the undirected versions of keys(x) <- value (see ?keys for more information) and subset(x, Lkeys=new_Lkeys, Rkeys=new_Rkeys) is provided as a convenient way to reduce the sets of left and right keys in one single function call.
Lkeys(x) <- value和Rkeys(x) <- value是无向版本的keys(x) <- value(见?keys了解更多信息)subset(x, Lkeys=new_Lkeys, Rkeys=new_Rkeys)作为一种方便的方式,以减少左套键,并在一个单一的函数调用。


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

1L or -1L for direction.
1L或-1Ldirection。

A Bimap object of the same subtype as x for revmap and subset.
一个同一亚型xrevmap和subsetbimap的对象。

A character vector for Lkeys, Rkeys, mappedLkeys and mappedRkeys.
Lkeys,Rkeys,mappedLkeys和mappedRkeys的一个特征向量。

A single non-negative integer for Llength, Rlength, count.mappedLkeys and count.mappedRkeys.
Llength,Rlength,count.mappedLkeys和count.mappedRkeys单一非负整数。


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


H. Pages



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

Bimap, Bimap-keys, BimapFormatting, AnnDbBimap-envirAPI, nhit
bimap的,bimap的键,BimapFormatting,AnnDbBimap-envirAPInhit


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


  library(hgu95av2.db)
  ls(2)
  x <- hgu95av2GO
  x
  summary(x)
  direction(x)

  length(x)
  Llength(x)
  Rlength(x)

  keys(x)[1:4]
  Lkeys(x)[1:4]
  Rkeys(x)[1:4]

  count.mappedkeys(x)
  count.mappedLkeys(x)
  count.mappedRkeys(x)

  mappedkeys(x)[1:4]
  mappedLkeys(x)[1:4]
  mappedRkeys(x)[1:4]

  y <- revmap(x)
  y
  summary(y)
  direction(y)

  length(y)
  Llength(y)
  Rlength(y)

  keys(y)[1:4]
  Lkeys(y)[1:4]
  Rkeys(y)[1:4]

  ## etc...[等等。]

  ## Get rid of all unmapped keys (left and right)[#获取摆脱所有未映射的键(左,右)]
  z <- subset(y, Lkeys=mappedLkeys(y), Rkeys=mappedRkeys(y))


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


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

使用道具 举报

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

本版积分规则

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

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

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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