DNAString-class {Biostrings}R Documentation

The DNAString class

Description

A DNAString object allows efficient storage and manipulation of a long DNA sequence.

Details

The DNAString class derives directly from the BString class (with no additional slot). All functions and methods described in the BString man page also work with a DNAString object (inheritance).

Unlike a BString object that allows storage of any non-empty string (based on a single-byte character set) a DNAString object can only store a non-empty string based on the DNAString alphabet (see below). In addition, the letters stored in a DNAString object are encoded in a way that optimizes fast search algorithms.

The DNAString alphabet

This alphabet contains all letters from the IUPAC Extended Genetic Alphabet (see IUPAC_CODE_MAP) + the gap letter "-". It is stored in the DNA_ALPHABET constant (character vector). The alphabet method also returns DNA_ALPHABET when applied to a DNAString object and is provided for convenience only.

Constructor-like functions and generics

In the code snippet below, src can be a character vector or a BString (or derived) object.

DNAString(src): [TODO: Document me]

Author(s)

H. Pages

See Also

BString, IUPAC_CODE_MAP, RNAString, BStringViews

Examples

  DNA_ALPHABET
  d <- DNAString("TTGAAAA-CTC-N")
  length(d)
  alphabet(d)

[Package Biostrings version 2.2.1 Index]