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

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

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

                                        MaskedXString objects
                                         MaskedXString对象

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

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

The MaskedBString, MaskedDNAString, MaskedRNAString and MaskedAAString classes are containers for storing masked sequences.
MaskedBString,MaskedDNAString,MaskedRNAString和MaskedAAString类是容器储存蒙面序列。

All those containers derive directly (and with no additional slots) from the MaskedXString virtual class.
所有这些容器派生直接从MaskedXString虚拟类(与没有额外的插槽)。


Details

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

In Biostrings, a pile of masks can be put on top of a sequence. A pile of masks is represented by a MaskCollection  object and the sequence by an XString object. A MaskedXString object is the result of bundling them together in a single object.
在Biostrings,一堆口罩,可以放在一个序列的顶部。一堆口罩表示由XString对象由MaskCollection对象和序列。一个MaskedXString对象是在一个单一的对象捆绑在一起的结果。

Note that, no matter what masks are put on top of it, the original sequence is always stored unmodified in a MaskedXString object. This allows the user to activate/deactivate masks without having to worry about losing the information stored in the masked/unmasked regions. Also this allows efficient memory management since the original sequence never needs to be copied (modifying it would require to make a copy of it first - sequences cannot and should never be modified in place in Biostrings), even when the set of active/inactive masks changes.
请注意,无论是在它上面放什么口罩,原来的序列总是存储在MaskedXString对象未修改。这使得用户可以激活/停用口罩,而不必担心失去在蒙面/东窗事发区域的信息存储。也是这允许有效的内存管理,因为原来的顺序永远需要来进行复制(修改它会要求,以使一个副本第一 - 序列可以不和应该永远不会被代替在Biostrings修改),即使有效/无效口罩集变化。


存取方法----------Accessor methods----------

In the code snippets below, x is a MaskedXString object. For masks(x) and masks(x) <- y, it can also be an XString object and y must be NULL or a MaskCollection object.
在下面的代码片段,x是MaskedXString的对象。 masks(x)和masks(x) <- y,它也可以是一个XString对象和yNULL或MaskCollection的对象必须是。

unmasked(x): Turns x into an XString object by dropping the masks.
unmasked(x):打开x丢弃口罩XString对象。

masks(x): Turns x into a MaskCollection object by  dropping the sequence.
masks(x):打开x成下降序列MaskCollection对象。

masks(x) <- y: If x is an XString object and y is NULL, then this doesn't do anything.
masks(x) <- y:如果x是XString的对象和yNULL,那么这不会做任何事情。

If x is an XString object and y is a MaskCollection object, then this turns x into a MaskedXString object by putting the masks in y on top of it.
如果x是XString的对象和y是MaskCollection对象,那么这个圈x成把口罩MaskedXString对象y在它的上面。

If x is a MaskedXString object and y is NULL, then this is equivalent to x <- unmasked(x).
如果x是MaskedXString的对象和y是NULL,那么这是相当于到x <- unmasked(x)。

If x is a MaskedXString object and y is a MaskCollection object, then this replaces the masks currently on top of x by the masks in y.
如果x是MaskedXString的对象和y是MaskCollection对象,那么这将替换目前顶部的口罩x中y口罩。

alphabet(x): Equivalent to alphabet(unmasked(x)). See ?alphabet for more information.
alphabet(x):alphabet(unmasked(x))等效。看到?alphabet更多信息。

length(x): Equivalent to length(unmasked(x)). See ?`length,XString-method` for more information.
length(x):length(unmasked(x))等效。看到?length,XString-method更多信息。


“maskedwidth”和相关的方法----------"maskedwidth" and related methods----------

In the code snippets below, x is a MaskedXString object.
在下面的代码片段,x是MaskedXString的对象。

maskedwidth(x): Get the number of masked letters in x. A letter is considered masked iff it's masked by at least one active mask.
maskedwidth(x)在x获取蒙面字母的数量。阿信被认为是蒙面,当且仅当它至少有一个活动的面具掩盖。

maskedratio(x): Equivalent to maskedwidth(x) / length(x).
maskedratio(x):maskedwidth(x) / length(x)等效。

nchar(x): Equivalent to length(x) - maskedwidth(x).
nchar(x):length(x) - maskedwidth(x)等效。


强迫----------Coercion----------

In the code snippets below, x is a MaskedXString object.
在下面的代码片段,x是MaskedXString的对象。

as(x, "XStringViews"): Turns x into an XStringViews object where the views are the unmasked regions of the original sequence ("unmasked" means not masked by at least one active mask).
as(x, "XStringViews"):打开x到XStringViews对象的意见是原始序列东窗事发区域(不“东窗事发”,是指由至少有一个积极的面具掩盖)。


其他方法----------Other methods----------

In the code snippets below, x is a MaskedXString object.
在下面的代码片段,x是MaskedXString的对象。

collapse(x): Collapses the set of masks in x into a single mask made of all active masks.
collapse(x):倍数x到一个单一的所有活动面具面具口罩。

gaps(x): Reverses all the masks i.e. each mask is replaced by a mask where previously unmasked regions are now masked and previously masked regions are now unmasked.
gaps(x):反转即每个面具口罩被替换一个以前东窗事发区域现在蒙面面罩和以前掩盖的区域现在东窗事发。


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


H. Pages



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

maskMotif, injectHardMask, alphabetFrequency, reverseComplement, XString-class, MaskCollection-class, XStringViews-class, Ranges-utils
maskMotif,injectHardMask,alphabetFrequency,reverseComplement,一流的XString,MaskCollection级,级XStringViews,范围-utils的


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


  ## ---------------------------------------------------------------------[#------------------------------------------------- --------------------]
  ## A. MASKING BY POSITION[#答掩蔽按位置]
  ## ---------------------------------------------------------------------[#------------------------------------------------- --------------------]
  mask0 <- Mask(mask.width=29, start=c(3, 10, 25), width=c(6, 8, 5))
  x <- DNAString("ACACAACTAGATAGNACTNNGAGAGACGC")
  length(x)  # same as width(mask0)[同为宽度(mask0)]
  nchar(x)   # same as length(x)[同为长度(X)]
  masks(x) <- mask0
  x
  length(x)  # has not changed[没有改变]
  nchar(x)   # has changed[已更改]
  gaps(x)

  ## Prepare a MaskCollection object of 3 masks ('mymasks') by running the[#通过运行准备了3口罩(“mymasks)MaskCollection对象]
  ## examples in the man page for these objects:[在这些对象的手册页#例子:]
  example(MaskCollection, package="IRanges")

  ## Put it on 'x':[#把X:]
  masks(x) <- mymasks
  x
  alphabetFrequency(x)

  ## Deactivate all masks:[#停用所有口罩:]
  active(masks(x)) <- FALSE
  x

  ## Activate mask "C":[#激活“面具”:]
  active(masks(x))["C"] <- TRUE
  x

  ## Turn MaskedXString object into an XStringViews object:[#打开MaskedXString的对象到XStringViews对象:]
  as(x, "XStringViews")

  ## Drop the masks:[#丢弃面具:]
  masks(x) <- NULL
  x
  alphabetFrequency(x)


  ## ---------------------------------------------------------------------[#------------------------------------------------- --------------------]
  ## B. MASKING BY CONTENT[#二掩蔽按内容]
  ## ---------------------------------------------------------------------[#------------------------------------------------- --------------------]
  ## See ?maskMotif for masking by content[#看到了吗?maskMotif内容掩蔽所]

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-1-24 22:36 , Processed in 0.032176 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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