trimTails(ShortRead)
trimTails()所属R语言包:ShortRead
Trim ends of reads based on nucleotides or qualities
根据核苷酸或品质读取修剪完
译者:生物统计家园网 机器人LoveR
描述----------Description----------
These generic functions remove leading or trailing nucleotides or qualities. trimTails and trimTailw remove low-quality reads from the right end using a sliding window (trimTailw) or a tally of (successive) nucleotides falling at or below a quality threshold (trimTails). trimEnds takes an alphabet of characters to remove from either left or right end.
这些通用功能删除前导或尾随核苷酸或品质。 trimTails和trimTailw从低质量,正确使用一个滑动窗口(trimTailw)或(连续)或以下的质量阈值(下降核苷酸相符读取<X >)。 trimTails需要一个字母字符,删除或左或右的结束。
用法----------Usage----------
trimTailw(object, k, a, halfwidth, ..., ranges=FALSE)
## S4 method for signature 'BStringSet'
trimTailw(object, k, a, halfwidth, ..., alphabet, ranges=FALSE)
## S4 method for signature 'XStringQuality'
trimTailw(object, k, a, halfwidth, ..., ranges=FALSE)
trimTails(object, k, a, successive=FALSE, ..., ranges=FALSE)
## S4 method for signature 'BStringSet'
trimTails(object, k, a, successive=FALSE, ...,
alphabet, ranges=FALSE)
## S4 method for signature 'XStringQuality'
trimTails(object, k, a, successive=FALSE, ..., ranges=FALSE)
trimEnds(object, a, left=TRUE, right=TRUE, relation=c("<=", "=="),
..., ranges=FALSE)
## S4 method for signature 'XStringSet'
trimEnds(object, a, left=TRUE, right=TRUE, relation=c("<=", "=="),
..., ranges=FALSE)
## S4 method for signature 'XStringQuality'
trimEnds(object, a, left=TRUE, right=TRUE, relation=c("<=", "=="),
..., ranges=FALSE)
## S4 method for signature 'FastqQuality'
trimEnds(object, a, left=TRUE, right=TRUE, relation=c("<=", "=="),
..., ranges=FALSE)
## S4 method for signature 'ShortRead'
trimEnds(object, a, left=TRUE, right=TRUE, relation=c("<=", "=="),
..., ranges=FALSE)
## S4 method for signature 'ShortReadQ'
trimEnds(object, a, left=TRUE, right=TRUE, relation=c("<=", "=="),
..., ranges=FALSE)
参数----------Arguments----------
参数:object
An object for which a methods exist (e.g., ShortReadQ and derived classes); see below to discover these methods.
一个对象的方法存在(例如,ShortReadQ和派生类);看到下面发现这些方法。
参数:k
integer(1) describing the number of failing letters required to trigger trimming.
integer(1)描述触发修剪未能字母的数目。
参数:a
For trimTails and trimTailw, a character(1) with nchar(a) == 1L giving the letter at or below which a nucleotide is marked as failing. For trimEnds a character() with all nchar() == 1L giving the letter at or below which a nucleotide or quality scores marked for removal.
trimTails和trimTailw,character(1)nchar(a) == 1L给予或低于核苷酸的字母标记为失败。 trimEndscharacter()都nchar() == 1L信或低于去除标记的核苷酸或质量分数。
参数:halfwidth
The half width (cycles before or after the current; e.g., a half-width of 5 would span 5 + 1 + 5 cycles) in which qualities are assessed.
半宽度(周期之前或之后的电流,例如,半宽5跨5 + 1 + 5个周期),其中素质评估。
参数:successive
logical(1) indicating whether failures can occur anywhere in the sequence, or must be successive. If successive=FALSE, then the k'th failed letter and subsequent are removed. If successive=TRUE, the first succession of k failed and subsequent letters are removed.
logical(1)表示失败是否可以序列中的任何地方发生,或必须是连续的。如果successive=FALSE,则第k个失败的信和随后被删除。如果successive=TRUEk的第一继承失败和随后的信件被删除。
参数:left, right
logical(1) indicating whether trimming is from the left or right ends.
logical(1)指示是否修剪是左或右两端。
参数:relation
character(1) selected from the argument values, i.e., “<=” or “==” indicating whether all letters at or below the alphabet(object) are to be removed, or only exact matches.
character(1)从选定的参数值,即“<=”或“==”表示所有的字母是否等于或低于alphabet(object)将被删除,或者只精确匹配。
参数:...
Additional arguments, perhaps used by methods.
额外的参数,也许使用的方法。
参数:alphabet
character() (ordered low to high) letters on which quality scale is measured. Usually supplied internally (user does not need to specify). If missing, then set to ASCII characters 0-127.
character()(有序低到高),上规模是衡量质量的信件。一般提供内部(不需要用户指定)。如果失踪,然后设置为0-127的ASCII字符。
参数:ranges
logical(1) indicating whether the trimmed object, or only the ranges satisfying the trimming condition, be returned.
logical(1)指示是否修剪的对象,或只修剪条件满足的范围,返回。
Details
详情----------Details----------
trimTailw starts at the left-most nucleotide, tabulating the number of cycles in a window of 2 * halfwidth + 1 surrounding the current nucleotide with quality scores that fall at or below a. The read is trimmed at the first nucleotide for which this number >= k. The quality of the first or last nucleotide is used to represent portions of the window that extend beyond the sequence.
trimTailw开始在最左边的核苷酸,在一个窗口2 * halfwidth + 1周围的质量分数下降或低于a核苷酸制表的周期数。读的第一个核苷酸这>= k修剪。用来表示窗口的序列超出部分的第一个或最后一个核苷酸的质量。
trimTails starts at the left-most nucleotide and accumulates cycles for which the quality score is at or below a. The read is trimmed at the first location where this number >= k. With successive=TRUE, failing qualities must occur in strict succession.
trimTails开始在最左边的核苷酸和积累的周期,而质量得分或低于a。读修剪在第一的位置,这个数字>= k。与successive=TRUE,没有素质,必须发生在严格继承。
trimEnds examines the left, right, or both ends of object, marking for removal letters that correspond to a and relation. The trimEnds,ShortReadQ-method trims based on quality.
trimEnds检查left,right或object两端,去除字母对应a和relation标记。 trimEnds,ShortReadQ-method质量为基础修剪。
值----------Value----------
An instance of class(object) trimmed to contain only those nucleotides satisfying the trim criterion or, if ranges=TRUE an IRanges instance defining the ranges that would trim object.
一个class(object)实例修剪,只包含那些满足修剪标准的核苷酸或如果ranges=TRUEIRanges实例定义的范围,将削减object。
作者(S)----------Author(s)----------
Martin Morgan <mtmorgan@fhcrc.org>
举例----------Examples----------
showMethods(trimTails)
sp <- SolexaPath(system.file('extdata', package='ShortRead'))
rfq <- readFastq(analysisPath(sp), pattern="s_1_sequence.txt")
## remove leading / trailing quality scores <= 'I'[#删除前导/尾随质量分数<=我]
trimEnds(rfq, "I")
## remove leading / trailing 'N's[#删除前导/尾随“N]
rng <- trimEnds(sread(rfq), "N", relation="==", ranges=TRUE)
narrow(rfq, start(rng), end(rng))
## remove leading / trailing 'G's or 'C's[#删除前导/尾随G的或“C”]
trimEnds(rfq, c("G", "C"), relation="==")
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|