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

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

[复制链接]
发表于 2012-2-25 13:50:24 | 显示全部楼层 |阅读模式
trimLRPatterns(Biostrings)
trimLRPatterns()所属R语言包:Biostrings

                                        Trim Flanking Patterns from Sequences
                                         修剪侧翼序列模式

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

The trimLRPatterns function trims left and/or right flanking patterns from sequences.
trimLRPatterns函数修剪离开和/或右的侧翼序列模式。


用法----------Usage----------


trimLRPatterns(Lpattern = "", Rpattern = "", subject,
               max.Lmismatch = 0, max.Rmismatch = 0,
               with.Lindels = FALSE, with.Rindels = FALSE,
               Lfixed = TRUE, Rfixed = TRUE, ranges = FALSE)



参数----------Arguments----------

参数:Lpattern
The left pattern.  
左侧的模式。


参数:Rpattern
The right pattern.  
正确的模式。


参数:subject
An XString object, XStringSet object, or character vector containing the target sequence(s).  
一个XString对象,XStringSet对象,或含有靶序列(S)的特征向量。


参数:max.Lmismatch
Either an integer vector of length nLp = nchar(Lpattern) representing an absolute number of mismatches (or edit distance if with.Lindels is TRUE) or a single numeric value in the interval [0, 1) representing a mismatch rate when aligning terminal substrings (suffixes) of Lpattern with the beginning (prefix) of subject following the conventions set by  neditStartingAt, isMatchingStartingAt, etc.  When max.Lmismatch is 0L or a numeric value in the interval [0, 1), it is taken as a "rate" and is converted to as.integer(1:nLp * max.Lmismatch), analogous to agrep (which, however, employs ceiling).  Otherwise, max.Lmismatch is treated as an integer vector where negative numbers are used to prevent trimming at the i-th location. When an input integer vector is shorter than nLp, it is augmented with enough -1s at the beginning to bring its length up to nLp. Elements of max.Lmismatch beyond the first nLp are ignored.  Once the integer vector is constructed using the rules given above, when with.Lindels is FALSE, max.Lmismatch[i] is the number of acceptable mismatches (errors) between the suffix substring(Lpattern, nLp - i + 1, nLp) of Lpattern and the first i letters of subject. When with.Lindels is TRUE, max.Lmismatch[i] represents the allowed "edit distance" between that suffix of Lpattern and subject, starting at position 1 of subject (as in matchPattern and isMatchingStartingAt).  For a given element s of the subject, the initial segment (prefix) substring(s, 1, j) of s is trimmed if j is the largest i for which there is an acceptable match, if any.  
无论是一个长度的整数向量nLp = nchar(Lpattern)错配的绝对数量(或编辑的距离,如果with.Lindels是TRUE)或一个单一的数值间隔[0, 1)代表不匹配率调整终端的子串(后缀)Lpattern的subject按照neditStartingAt设置的公约,isMatchingStartingAt当max.Lmismatch的开始(前缀) 是0L或在区间数值[0, 1),它被视为一个“率”,并转换为as.integer(1:nLp * max.Lmismatch),类似于agrep(其中,然而,采用ceiling)。否则,max.Lmismatch被视为负数是用来修剪防止i-TH的位置在一个整数向量。当输入整数向量是比nLp短,它在开始增强,带来它的长度为-1不够nLp的。元素max.Lmismatch超越第一nLp被忽略。一旦整数向量,使用上述规则,当with.Lindels是FALSE,max.Lmismatch[i]是可接受的不匹配(错误)之间的后缀substring(Lpattern, nLp - i + 1, nLp)Lpattern和isubject字母。当with.Lindels是TRUE,max.Lmismatch[i]代表允许“编辑距离”,起始位置Lpattern之间的后缀,subject和1 subject(matchPattern和isMatchingStartingAt)。对于一个给定的元素ssubject,初始段(前缀)substring(s, 1, j) s如果修剪j是最大的i其中有一个可接受的匹配,如果有的话。


参数:max.Rmismatch
Same as max.Lmismatch but with Rpattern, along with with.Rindels (below), and its initial segments (prefixes) substring(Rpattern, 1, i).  For a given element s of the subject, with nS = nchar(s), the terminal segment (suffix) substring(s, nS - j + 1, nS) of s is trimmed if j is the largest i for which there is an acceptable match, if any.  
max.Lmismatch但是Rpattern相同,随着with.Rindels(下同),其初始段(前缀)substring(Rpattern, 1, i)。对于一个给定的元素s的主题,用nS = nchar(s),终端段(后缀)substring(s, nS - j + 1, nS) s如果修剪j是最大的< x>这是一个可以接受的比赛,如果有的话。


参数:with.Lindels
If TRUE, indels are allowed in the alignments of the suffixes of Lpattern with the subject, at its beginning. See the with.indels arguments of the matchPattern and neditStartingAt functions for detailed information.  
如果TRUE,INDELS是允许的后缀的路线Lpattern的主题,在它的起点。见with.indelsmatchPattern和neditStartingAt详细信息的功能参数。


参数:with.Rindels
Same as with.Lindels but for alignments of the prefixes of Rpattern with the subject, at its end. See the with.indels arguments of the matchPattern and neditEndingAt functions for detailed information.  
with.Lindels但路线的前缀相同Rpattern主体,在其结束。见with.indelsmatchPattern和neditEndingAt详细信息的功能参数。


参数:Lfixed, Rfixed
Whether IUPAC extended letters in the left or right pattern should be interpreted as ambiguities (see ?`lowlevel-matching` for the details).  
在左或右的模式的IUPAC扩展字母是否应解释为含糊不清(见?lowlevel-matching的细节)。


参数:ranges
If TRUE, then return the ranges to use to trim subject. If FALSE, then returned the trimmed subject.  
如果TRUE,然后返回范围内使用修剪subject。如果FALSE,然后返回修剪subject。


值----------Value----------

A new XString object, XStringSet object, or character vector with the "longest" flanking matches removed, as described above.
删除“最长”的侧翼比赛一个新XString对象,XStringSet对象,或特征向量,如上所述。


作者(S)----------Author(s)----------


P. Aboyoun and H. Jaffee



参见----------See Also----------

matchPattern, matchLRPatterns, lowlevel-matching, XString-class, XStringSet-class
matchPattern,matchLRPatterns,低级匹配,级XString,XStringSet级


举例----------Examples----------


  Lpattern <- "TTCTGCTTG"
  Rpattern <- "GATCGGAAG"
  subject <- DNAString("TTCTGCTTGACGTGATCGGA")
  subjectSet <- DNAStringSet(c("TGCTTGACGGCAGATCGG", "TTCTGCTTGGATCGGAAG"))

  ## Only allow for perfect matches on the flanks[#只允许在侧翼完美的比赛]
  trimLRPatterns(Lpattern = Lpattern, subject = subject)
  trimLRPatterns(Rpattern = Rpattern, subject = subject)
  trimLRPatterns(Lpattern = Lpattern, Rpattern = Rpattern, subject = subjectSet)

  ## Allow for perfect matches on the flanking overlaps[#允许为侧翼重叠的完美匹配]
  trimLRPatterns(Lpattern = Lpattern, Rpattern = Rpattern, subject = subjectSet,
                 max.Lmismatch = 0, max.Rmismatch = 0)

  ## Allow for mismatches on the flanks[#允许在侧翼的不匹配]
  trimLRPatterns(Lpattern = Lpattern, Rpattern = Rpattern, subject = subject,
                 max.Lmismatch = 0.2, max.Rmismatch = 0.2)
  maxMismatches <- as.integer(0.2 * 1:9)
  maxMismatches
  trimLRPatterns(Lpattern = Lpattern, Rpattern = Rpattern, subject = subjectSet,
                 max.Lmismatch = maxMismatches, max.Rmismatch = maxMismatches)

  ## Produce ranges that can be an input into other functions[#生产范围,可以是一个输入到其他功能。]
  trimLRPatterns(Lpattern = Lpattern, Rpattern = Rpattern, subject = subjectSet,
                 max.Lmismatch = 0, max.Rmismatch = 0, ranges = TRUE)
  trimLRPatterns(Lpattern = Lpattern, Rpattern = Rpattern, subject = subject,
                 max.Lmismatch = 0.2, max.Rmismatch = 0.2, ranges = TRUE)

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-1-25 04:26 , Processed in 0.022689 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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