comp(seqinr)
comp()所属R语言包:seqinr
complements a nucleic acid sequence
互补的核酸序列
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Complements a sequence, for instance if the sequence is "a","c","g","t" it returns "t","g","c","a". This is not the reverse complementary strand. This function can handle ambiguous bases if required.
互补序列,例如,如果序列"a","c","g","t"它返回"t","g","c","a"。这是不反向的互补链。如果需要的话,这个功能可以处理模糊碱基。
用法----------Usage----------
comp(seq, forceToLower = TRUE, ambiguous = FALSE)
参数----------Arguments----------
参数:seq
a DNA sequence as a vector of single chars
单字符的一个DNA序列作为一个向量
参数:forceToLower
if TRUE characters in seq are forced to lower case
如果是TRUE字符seq被迫以较低的情况下,
参数:ambiguous
if TRUE ambiguous bases in seq are handled
如果真正的暧昧碱基seq处理
值----------Value----------
a vector of characters which is the complement of the sequence, not the reverse complementary strand. Undefined values are returned as NA.
这是补体的序列,而不是相反的互补链的向量的字符。返回未定义的值都为NA。
(作者)----------Author(s)----------
D. Charif, J.R. Lobry
参考文献----------References----------
参见----------See Also----------
Because ssDNA sequences are always written in the 5'->3' direction, use rev(comp(seq)) to get the reverse complementary strand (see rev).
由于单链DNA序列5-> 3方向始终被写入,使用转(COMP(SEQ))的反向互补链(见rev“)。
实例----------Examples----------
##[#]
## Show that comp() does *not* return the reverve complementary strand:[#显示排版()*不*回报的reverve的互补链:]
##[#]
c2s(comp(s2c("aaaattttggggcccc")))
##[#]
## Show how to get the reverse complementary strand:[#显示如何获取反向互补链:]
##[#]
c2s(rev(comp(s2c("aaaattttggggcccc"))))
##[#]
## Show what happens with non allowed values:[#显示会发生什么事与非允许的值:]
##[#]
c2s(rev(comp(s2c("aaaaXttttYggggZcccc"))))
##[#]
## Show what happens with ambiguous bases:[#显示会发生什么暧昧碱基:]
##[#]
allbases <- s2c("abcdghkmstvwn")
comp(allbases) # NA are produced[NA生产]
comp(allbases, ambiguous = TRUE) # No more NA[没有更多的NA]
##[#]
## Routine sanity checks:[#常规完整性检查:]
##[#]
stopifnot(identical(comp(allbases, ambiguous = TRUE), s2c("tvghcdmksabwn")))
stopifnot(identical(comp(c("A", "C", "G", "T"), forceToLower = FALSE), c("T", "G", "C", "A")))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|