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

R语言 GenomicRanges包 seqinfo()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-2-25 19:29:49 | 显示全部楼层 |阅读模式
seqinfo(GenomicRanges)
seqinfo()所属R语言包:GenomicRanges

                                        Accessing sequence information
                                         访问序列信息

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

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

A set of generic functions for getting/setting sequence information from/on an object.
获取/设置/对象的序列信息的通用功能集。


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


seqinfo(x)
seqinfo(x, new2old=NULL, force=FALSE) <- value

seqnames(x)
seqnames(x) <- value

seqlevels(x)
seqlevels(x, force=FALSE) <- value

seqlengths(x)
seqlengths(x) <- value

isCircular(x)
isCircular(x) <- value

isCircularWithKnownLength(x)

genome(x)
genome(x) <- value



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

参数:x
The object from/on which to get/set the sequence information.  
对象/获取/设置序列信息。


参数:new2old
The new2old argument allows the user to rename, drop, add and/or reorder the "sequence levels" in x.  new2old can be NULL or an integer vector with one element per row in Seqinfo object value (i.e. new2old and value must have the same length) describing how the "new" sequence levels should be mapped to the "old" sequence levels, that is, how the rows in value should be mapped to the rows in seqinfo(x). The values in new2old must be >= 1 and <= length(seqinfo(x)). NAs are allowed and indicate sequence levels that are being added. Old sequence levels that are not represented in new2old will be dropped, but this will fail if those levels are in use (e.g. if x is a GRanges object with ranges defined on those sequence levels) unless force=TRUE is used (see below).  If new2old=NULL, then sequence levels can only be added to the existing ones, that is, value must have at least as many rows as seqinfo(x) (i.e. length(values) >= length(seqinfo(x))) and also seqlevels(values)[seq_len(length(seqlevels(x)))] must be identical to seqlevels(x).  
new2old参数,允许用户重命名,删除,添加和/或重新安排“x序列水平”。 new2old能NULL或value(即new2old和value必须有相同的长度)描述如何每行元素的整数向量Seqinfo对象“新”序列水平应映射到“老字号”序列的水平,也就是说,如何行value应seqinfo(x)行映射到。 new2old值必须> = 1和<=length(seqinfo(x))。 NA的允许,并注明序列水平正在增加。旧的序列,不new2old的代表水平将下降,但是这会失败,如果在使用这些级别(例如,如果x农庄对象与这些序列水平上定义的范围),除非force=TRUE使用(见下文)。如果new2old=NULL,然后序列水平只能被添加到现有的,即value必须至少有许多seqinfo(x)(即length(values) >= length(seqinfo(x)))也行seqlevels(values)[seq_len(length(seqlevels(x)))]必须是相同的seqlevels(x)。


参数:force
Force dropping sequence levels currently in use. This is achieved by dropping the elements in x where those levels are used (hence typically reducing the length of x).  
强制目前使用序列水平下降。这是由丢弃的元素x那些水平(因此通常减少x长度)。


参数:value
Typically a Seqinfo object for the seqinfo setter.  Either a named or unnamed character vector for the seqlevels setter.  A vector containing the sequence information to store for the other setters.  
通常情况下,seqinfo二传手Seqinfo对象。无论是有名或无名的seqlevels二传手的特征向量。一个向量,包含序列信息来存储其他setter方法。


Details

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

Various classes implement methods for those generic functions.
各种类实现这些通用功能的方法。

The Seqinfo class plays a central role for those generics because:
Seqinfo类起着核心作用,对于那些仿制药,因为:

It implements methods for all the above generics except for seqinfo. That is, the seqnames, seqlevels, seqlengths, isCircular, isCircularWithKnownLength and genome getters are defined for Seqinfo objects.
它实现了所有上述仿制药的方法,除了seqinfo。也就是说,seqnames,seqlevels,seqlengths,isCircular,isCircularWithKnownLength和genome干将Seqinfo对象的定义。

Classes that implement the seqinfo getter are typically expected to return a Seqinfo object.
类实现seqinfo吸气通常预期,返回Seqinfo的对象。

Default seqlevels, seqlengths, isCircular, isCircularWithKnownLength and genome getters and setters are provided. By default, seqlevels(x) does seqlevels(seqinfo(x)), seqlengths(x) does seqlengths(seqinfo(x)), isCircular(x) does isCircular(seqinfo(x)), isCircularWithKnownLength(x) does isCircularWithKnownLength(seqinfo(x)), and genome(x) does genome(seqinfo(x)). So any class with a seqinfo getter that returns a Seqinfo object also has all those getters working out-of-the-box. See the GRanges, GRangesList and GappedAlignments classes as examples of such classes (those 3 classes are defined in the GenomicRanges package).
提供默认的seqlevels,seqlengths,isCircular,isCircularWithKnownLength和genomegetter和setter方法。默认情况下,seqlevels(x)不seqlevels(seqinfo(x)),seqlengths(x)不seqlengths(seqinfo(x)),isCircular(x)不isCircular(seqinfo(x)),isCircularWithKnownLength(x)不isCircularWithKnownLength(seqinfo(x)) ,genome(x)genome(seqinfo(x))。所以任何类seqinfo的getter返回Seqinfo对象的,也有所有这些干将工作的框。看到农庄,这样的类实例(这3类在GenomicRanges包定义)GRangesList和GappedAlignments类。


注意----------Note----------

The full list of methods defined for a given generic can be seen with e.g. showMethods("seqinfo") or showMethods("seqnames") (for the getters), and showMethods("seqinfo<-") or showMethods("seqnames<-") (for the setters aka replacement methods). Please be aware that this shows only methods defined in packages that are currently attached.
定义为一个给定的通用方法的完整列表可以看出,与如showMethods("seqinfo")或showMethods("seqnames")(干将),和showMethods("seqinfo<-")或showMethods("seqnames<-")的setter又名替代方法。请注意,这说明目前连接的包中定义的唯一方法。


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

Seqinfo-class, GRanges-class, GRangesList-class, GappedAlignments-class
seqinfo级,农庄类,GRangesList级,GappedAlignments级


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


  showMethods("seqinfo")
  showMethods("seqinfo<-")

  showMethods("seqnames")
  showMethods("seqnames<-")

  if (interactive())
    ?`GRanges-class`

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-2-7 13:06 , Processed in 0.044032 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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