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

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

[复制链接]
发表于 2012-9-30 01:15:31 | 显示全部楼层 |阅读模式
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:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-5-20 13:19 , Processed in 0.019854 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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