DNAString-class(Biostrings)
DNAString-class()所属R语言包:Biostrings
DNAString objects
DNAString对象
译者:生物统计家园网 机器人LoveR
描述----------Description----------
A DNAString object allows efficient storage and manipulation of a long DNA sequence.
一个DNAString对象允许长的DNA序列的高效存储和操纵。
Details
详情----------Details----------
The DNAString class is a direct XString subclass (with no additional slot). Therefore all functions and methods described in the XString man page also work with a DNAString object (inheritance).
DNAString类是的直接XString子类(没有额外的插槽)。因此,在XString手册页中描述的所有功能和方法,也可以用DNAString对象(继承)。
Unlike the BString container that allows storage of any single string (based on a single-byte character set) the DNAString container can only store a string based on the DNA alphabet (see below). In addition, the letters stored in a DNAString object are encoded in a way that optimizes fast search algorithms.
不同的BString容器,允许存储任何单个字符串(基于单字节字符集)的DNAString容器只能存储的DNA字母为基础的字符串(见下文)。此外,在DNAString对象中存储的字母编码的方式,优化快速搜索算法。
DNA字母表----------The DNA alphabet----------
This alphabet contains all letters from the IUPAC Extended Genetic Alphabet (see ?IUPAC_CODE_MAP) + the gap ("-") and the hard masking ("+") letters. It is stored in the DNA_ALPHABET constant (character vector). The alphabet method also returns DNA_ALPHABET when applied to a DNAString object and is provided for convenience only.
这个字母表中包含的IUPAC扩展的遗传字母的所有字母(见?IUPAC_CODE_MAP)("-")和硬盘屏蔽("+")字母的差距。它储存在DNA_ALPHABET常数(特征向量)。 alphabet方法也返回DNA_ALPHABET应用于到DNAString对象时,只为方便提供。
构造类似的功能和泛型----------Constructor-like functions and generics----------
In the code snippet below, x can be a single string (character vector of length 1), a BString object or an RNAString object.
在下面的代码片段,x可以是一个字符串(字符长度为1的向量),BString对象或RNAString的对象。
DNAString(x="", start=1, nchar=NA): Tries to convert x into a DNAString object by reading nchar letters starting at position start in x.
DNAString(x="", start=1, nchar=NA):尝试转换x,成DNAString对象的阅读nchar字母位置开始startx。
存取方法----------Accessor methods----------
In the code snippet below, x is a DNAString object.
在下面的代码片段,x是DNAString的对象。
alphabet(x, baseOnly=FALSE): If x is a DNAString object, then return the DNA alphabet (see above). See the corresponding man pages when x is a BString, RNAString or AAString object.
alphabet(x, baseOnly=FALSE)如果x是DNAString的对象,然后返回的DNA字母表(见上文)。请参阅相应的手册页时x是BString,RNAString或AAString的对象。
作者(S)----------Author(s)----------
H. Pages
参见----------See Also----------
IUPAC_CODE_MAP, letter, XString-class, RNAString-class, reverseComplement, alphabetFrequency
IUPAC_CODE_MAP,letter,XString级,RNAString级,reverseComplement,alphabetFrequency
举例----------Examples----------
DNA_BASES
DNA_ALPHABET
d <- DNAString("TTGAAAA-CTC-N")
length(d)
alphabet(d) # DNA_ALPHABET[DNA_ALPHABET]
alphabet(d, baseOnly=TRUE) # DNA_BASES[DNA_BASES]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|