GenomeData-class(BSgenome)
GenomeData-class()所属R语言包:BSgenome
Data on the genome
基因组数据
译者:生物统计家园网 机器人LoveR
描述----------Description----------
GenomeData formally represents genomic data as a
GenomeData作为正式代表的基因组数据
Details
详情----------Details----------
This class facilitates storing data on the genome by formalizing a set of metadata fields for storing the organism (e.g. Mmusculus), genome build provider (e.g. UCSC), and genome build version (e.g. mm9).
这个类有利于正式一套元数据字段用于存储的有机体(如Mmusculus),基因组的构建提供商(如加州大学圣克鲁兹分校),基因组内部版本(如MM9)的基因组上的数据存储。
The data is represented as a list, with one element per chromosome (or really any sequence, like a gene). There are no constraints as to the data type of the elements.
数据表示为一个列表,每一个染色体的元素(或真的任何序列,如基因)。有元素的数据类型没有限制。
Note that as a SimpleList, it is possible to store chromosome-level data (e.g. the lengths) in the elementMetadata slot. The organism, provider and providerVersion are all stored in the SimpleList metadata, so they may be retrieved in list form by calling metadata(x).
请注意,作为一个SimpleList,它是可以存储在染色体级别的数据(如长度)elementMetadata插槽。 organism,provider和providerVersion都存储在SimpleListmetadata,所以他们可能会以列表的形式检索调用metadata(x)。
存取方法----------Accessor methods----------
In the code snippets below, x is a GenomeData object.
在下面的代码片段,x是GenomeData对象。
organism(x): Get the single string indicating the organism, if specified, otherwise NULL.
organism(x):表明机体的单个字符串,如果指定,否则NULL的。
provider(x): Get the single string indicating the genome build provider, if specified, otherwise NULL.
provider(x):获取单个字符串,表明基因组的建立提供,如果指定,否则NULL。
providerVersion(x): Get the single string indicating the genome build version, if specified, otherwise NULL.
providerVersion(x):获取单个字符串,表明基因组的构建版本,如果指定,否则NULL。
构造----------Constructor----------
GenomeData(listData = list(), providerVersion = metadata[["providerVersion"]], organism = metadata[["organism"]], provider = metadata[["provider"]], metadata = list(), elementMetadata = NULL, ...): Creates a GenomeData with the elements from the listData parameter, a list. The other arguments correspond to the metadata fields, and, with the exception of elementMetadata, should all be either single strings or NULL (unspecified). Additional global metadata elements may be passed in metadata, in list-form, and via .... The elements in metadata are always overridden by the explicit arguments, like organism and those in .... elementMetadata should be an DataTable or NULL.
GenomeData(listData = list(), providerVersion = metadata[["providerVersion"]], organism = metadata[["organism"]], provider = metadata[["provider"]], metadata = list(), elementMetadata = NULL, ...):创建GenomeData参数,列表中的元素listData的。其它参数对应的元数据字段,与elementMetadata异常,都应该是无论单串或NULL(未指明)。额外的全球元数据元素可以通过metadata,在列表的形式,通过...。 metadata元素总是明确的论点覆盖,像organism和...那些。 elementMetadata应该是DataTable或NULL。
强迫----------Coercion----------
as(from, "data.frame"): Coerces each subelement to a data frame, and binds them into a single data frame with an additional column indicating chromosome
as(from, "data.frame"):胁迫每个子元素到一个数据框,并结合成一个额外的列指示染色体的单个数据框
as(from, "RangesList"): Coerces each subelement to a Ranges and combines them into a RangesList with the same names. The “universe” metadata property is set to the providerVersion of from.
as(from, "RangesList"):Ranges胁迫的每个子元素,并把它们结合成一个具有相同名称的RangesList。 “宇宙”元数据属性设置为providerVersionfrom。
as(from, "RangedData"): Coerces each subelement to a RangedData and combines them into a single RangedData with the same names. The “universe” metadata property is set to the providerVersion of from.
as(from, "RangedData"):RangedData胁迫的每个子元素,并将它们结合成一个单一的RangedData的名称相同。 “宇宙”元数据属性设置为providerVersionfrom。
减少----------Reduction----------
gdreduce(f, ..., init, right=FALSE, accumulate=FALSE, gdArgs=list()):
gdreduce(f, ..., init, right=FALSE, accumulate=FALSE, gdArgs=list()):
Successively combine GenomeData elements of ... using f; all arguments assigned to ... must be of class GenomeData. f is a function accepting two objects returned by "[[" applied to the successive elements of ..., returning a single GenomeData object to be used in subsequent calls to f. init, right, and accumulate are as described for Reduce. gdArgs can be used to provide metadata information to the constructor used to create the final GenomeData object.
先后结合GenomeData元素...用f;分配...所有参数类GenomeData必须。 f是一个功能接受"[["...的连续元素,返回一个单一的GenomeData对象将在后续调用用于f返回两个对象。 init,right,accumulate的Reduce描述。 gdArgs可以用来提供元数据信息,以用于创建最终GenomeData对象的构造。
作者(S)----------Author(s)----------
Michael Lawrence
参见----------See Also----------
GenomeDataList, a container of this class and useful for storing data on multiple samples.
GenomeDataList,这个类和有用的数据存储在多个样品的容器。
SimpleList, the base of this class.
simplelist中,这个类的基础。
举例----------Examples----------
gd <- GenomeData(list(chr1 = IRanges(1, 10), chrX = IRanges(2, 5)),
organism = "Mmusculus", provider = "UCSC",
providerVersion = "mm9")
organism(gd)
providerVersion(gd)
provider(gd)
gd[["chr1"]] # get data for chromsome 1[染色体1获取数据]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|