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

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

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

                                        Injecting a hard mask in a sequence
                                         在顺序注射硬掩膜

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

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

injectHardMask allows the user to "fill" the masked regions of a sequence with an arbitrary letter (typically the "+" letter).
injectHardMask允许用户“补”的序列中的任意一个字母(通常是"+"信)蒙面区域。


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


injectHardMask(x, letter="+")



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

参数:x
A MaskedXString or XStringViews object.  
一个MaskedXString或XStringViews对象。


参数:letter
A single letter.  
一个字母。


Details

详情----------Details----------

The name of the injectHardMask function was chosen because of the primary use that it is intended for: converting a pile of active "soft masks" into a "hard mask". Here the pile of active "soft masks" refers to the active masks that have been put on top of a sequence. In Biostrings, the original sequence and the masks defined on top of it are bundled together in one of the dedicated containers for this: the MaskedBString, MaskedDNAString, MaskedRNAString and MaskedAAString containers (this is the MaskedXString family of containers). The original sequence is always stored unmodified in a MaskedXString object so no information is lost. This allows the user to activate/deactivate masks without having to worry about losing the letters that are in the regions that are masked/unmasked. Also this allows better memory management since the original sequence never needs to be copied, even when the set of active/inactive masks changes.
injectHardMask函数的名字被选中,是因为它的主要用途是用于:一堆活跃的“软面具”转换成“硬掩膜”。这里的“积极的”软口罩桩是指序列上已投入的积极口罩。在Biostrings,原来的序列,并在它上面定义的口罩捆绑在专用容器之一:MaskedBString,MaskedDNAString,MaskedRNAString和MaskedAAString容器(这是容器MaskedXString的家庭)。原来的序列总是存储未修改在MaskedXString对象,因此不会丢失信息。这使得用户可以激活/停用口罩,而不必担心失去的信件,在被屏蔽/揭露区域。这也允许更好的内存管理,因为原来的顺序永远需要复制时,即使一套有效/无效口罩变化。

However, there are situations where the user might want to really get rid of the letters that are in some particular regions by replacing them with a junk letter (e.g. "+") that is guaranteed to not interfer with the analysis that s/he is currently doing. For example, it's very likely that a set of motifs or short reads will not contain the "+" letter (this could easily be checked) so they will never hit the regions filled with "+". In a way, it's like the regions filled with "+" were masked but we call this kind of masking "hard masking".
不过,也有情况下,用户可能要真正摆脱取代垃圾信(如"+"),这是保证不干扰分析,在一些特定区域的字母S /他目前正在做的事情。例如,它很可能是一套图案或短的读取将不包含"+"信(这很容易被选中),所以他们将永远不会打充满"+"的区域。在某种程度上,它就像充满"+"被掩盖的区域,但我们所说的这种掩盖“硬掩蔽”。

Some important differences between "soft" and "hard" masking:
之间的“软”“硬”遮蔽了一些重要的差异:

injectHardMask creates a (modified) copy of the original sequence. Using "soft masking" does not.
injectHardMask创建一个原始序列(修改)副本。使用“软屏蔽”不。

A function that is "mask aware" like alphabetFrequency or matchPattern will really skip the masked regions when "soft masking" is used i.e. they will not walk thru the regions that are under active masks. This might lead to some speed improvements when a high percentage of the original sequence is masked. With "hard masking", the entire sequence is walked thru.
一个“面具知道”之类的功能,是alphabetFrequency或matchPattern真的会跳过“软屏蔽”,即他们不会走路,通过区域正在积极口罩蒙面区域。这可能会导致一些被屏蔽的速度时,高比例的原始序列的改善。与“硬屏蔽”,整个序列是通过走。

Matches cannot span over masked regions with "soft masking". With "hard masking" they can.
比赛不能跨越“软屏蔽”蒙面区域。他们与“硬掩蔽”。


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

An XString object of the same length as the orignal object x if x is a MaskedXString object, or of the same length as subject(x) if it's an XStringViews object.
x如果x是MaskedXString的对象,或长度相同的原对象相同长度的XString对象subject(x)如果它是一个XStringViews对象。


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


H. Pages



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

maskMotif, MaskedXString-class, replaceLetterAt, chartr, XString, XStringViews-class
maskMotif,MaskedXString级,replaceLetterAt,chartr,XString,XStringViews级


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


  ## ---------------------------------------------------------------------[#------------------------------------------------- --------------------]
  ## A. WITH AN XStringViews OBJECT[#A.与XStringViews对象]
  ## ---------------------------------------------------------------------[#------------------------------------------------- --------------------]
  v2 <- Views("abCDefgHIJK", start=c(8, 3), end=c(14, 4))
  injectHardMask(v2)
  injectHardMask(v2, letter="=")

  ## ---------------------------------------------------------------------[#------------------------------------------------- --------------------]
  ## B. WITH A MaskedXString OBJECT[#B.随着MaskedXString对象]
  ## ---------------------------------------------------------------------[#------------------------------------------------- --------------------]
  mask0 <- Mask(mask.width=29, start=c(3, 10, 25), width=c(6, 8, 5))
  x <- DNAString("ACACAACTAGATAGNACTNNGAGAGACGC")
  masks(x) <- mask0
  x
  subject <- injectHardMask(x)

  ## Matches can span over masked regions with "hard masking":[#匹配,可以跨越区域与“硬掩蔽”蒙面:]
  matchPattern("ACggggggA", subject, max.mismatch=6)
  ## but not with "soft masking":[#但不能与“软掩蔽”:]
  matchPattern("ACggggggA", x, max.mismatch=6)

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


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

使用道具 举报

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

本版积分规则

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

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

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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