chartr(Biostrings)
chartr()所属R语言包:Biostrings
Translating letters of a sequence
翻译信件的序列
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Translate letters of a sequence.
转换序列的字母。
用法----------Usage----------
## S4 method for signature 'ANY,ANY,XString'
chartr(old, new, x)
参数----------Arguments----------
参数:old
A character string specifying the characters to be translated.
一个字符串指定的字符被翻译。
参数:new
A character string specifying the translations.
一个字符串指定的翻译。
参数:x
The sequence or set of sequences to translate. If x is an XString, XStringSet, XStringViews or MaskedXString object, then the appropriate chartr method is called, otherwise the standard chartr R function is called.
翻译组序列或序列。如果x是XString的,XStringSet,XStringViews或MaskedXString的对象,然后在适当的被称为chartr方法,否则标准的chartrR的功能被称为。
Details
详情----------Details----------
See ?chartr for the details.
看到?chartr细节。
Note that, unlike the standard chartr R function, the methods for XString, XStringSet, XStringViews and MaskedXString objects do NOT support character ranges in the specifications.
请注意,不像标准的chartrR的功能,为XString,XStringSet,XStringViews和MaskedXString对象的方法,不支持在规范的字符范围。
值----------Value----------
An object of the same class and length as the original object.
同一类的对象和原始对象的长度。
参见----------See Also----------
chartr, replaceLetterAt, XString-class, XStringSet-class, XStringViews-class, MaskedXString-class, alphabetFrequency, matchPattern, reverseComplement
chartr,replaceLetterAt,级XStringViews,级XStringSet,XString-级,级MaskedXString,alphabetFrequency,matchPattern,reverseComplement
举例----------Examples----------
x <- BString("MiXeD cAsE 123")
chartr("iXs", "why", x)
## ---------------------------------------------------------------------[#------------------------------------------------- --------------------]
## TRANSFORMING DNA WITH BISULFITE (AND SEARCHING IT...)[#转化的DNA与亚硫酸氢钠(与搜索...)]
## ---------------------------------------------------------------------[#------------------------------------------------- --------------------]
library(BSgenome.Celegans.UCSC.ce2)
chrII <- Celegans[["chrII"]]
alphabetFrequency(chrII)
pattern <- DNAString("TGGGTGTATTTA")
## Transforming and searching the + strand[#转化和搜索+链]
plus_strand <- chartr("C", "T", chrII)
alphabetFrequency(plus_strand)
matchPattern(pattern, plus_strand)
matchPattern(pattern, chrII)
## Transforming and searching the - strand[#转化和搜索 - 链]
minus_strand <- chartr("G", "A", chrII)
alphabetFrequency(minus_strand)
matchPattern(reverseComplement(pattern), minus_strand)
matchPattern(reverseComplement(pattern), chrII)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|