MaskedXString-class {Biostrings}R Documentation

MaskedXString objects

Description

The MaskedXString class is a container for storing a masked sequence.

Details

[TODO]

Accesor methods

In the code snippets below, x is a MaskedXString object.

unmasked(x): Turns x into an XString object by dropping the masks.
masks(x): Turns x into a MaskCollection object by dropping the sequence.
alphabet(x): Equivalent to alphabet(unmasked(x)). See ?alphabet for more information.
length(x): Equivalent to length(unmasked(x)). See ?`length,XString-method` for more information.

"maskedwidth" and related methods

In the code snippets below, x is a MaskedXString object.

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.
maskedratio(x): Equivalent to maskedwidth(x) / length(x).
nchar(x): Equivalent to length(x) - maskedwidth(x).

Coercion

TODO

Other methods

TODO

Author(s)

H. Pages

See Also

maskMotif, alphabetFrequency, reverse, XString-class, MaskCollection-class, XStringViews-class, IRanges-utils

Examples

  ## Masking by position
  mask0 <- Mask(mask.width=29, start=c(3, 10, 25), width=c(6, 8, 5))
  x <- DNAString("ACACAACTAGATAGNACTNNGAGAGACGC")
  masks(x) <- mask0
  x
  gaps(x)

  ## See ?maskMotif for masking by content

[Package Biostrings version 2.8.18 Index]