BString, DNAString, RNAString   package:Biostrings   R Documentation

_T_h_e _B_S_t_r_i_n_g, _D_N_A_S_t_r_i_n_g _a_n_d _R_N_A_S_t_r_i_n_g _c_l_a_s_s_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     The BString, DNAString and RNAString classes are containers for
     big strings in general, and DNA or RNA sequences in particular.
     BString is the base class designed to store a big string and to
     make its manipulation easy and efficient. It's also the common
     parent of the DNAString and RNAString classes.

_D_e_t_a_i_l_s:

     The 2 main differences between a BString and a conventional
     character vector are: (1) the data stored in a BString are not
     copied on object duplication and (2) a BString can only store a
     single string (see the BStringViews class for an efficient way to
     store a collection of big strings in a single object). A BString
     object can be used to store {\it as is} any non-empty string based
     on a single-byte character set. The DNAString and RNAString
     classes derive directly from the BString class (they have no
     additional slot). However, these classes can only store strings
     based on a limited alphabet (the IUPAC extended genetic alphabet +
     the gap letter) and these letters are encoded (before they are
     stored in the object) in a way that optimizes fast search
     algorithms. This makes the DNAString and RNAString classes
     particularly well suited for storing big DNA or RNA sequences.
     When the strings you want to work with are not DNA or RNA
     sequences, then you can use the BString class. All the methods
     that are defined for a BString object also work with a DNAString
     or RNAString object.

_A_c_c_e_s_o_r _m_e_t_h_o_d_s:

     In the code snippets below, 'x' is a BString (or DNAString or
     RNAString) object and 'i' is a numeric vector.

      'letter(x, i)': [TODO: Document me]

_C_o_n_s_t_r_u_c_t_o_r-_l_i_k_e _f_u_n_c_t_i_o_n_s _a_n_d _g_e_n_e_r_i_c_s:

     In the code snippets below, 'src' can be a character vector or a
     BString (or DNAString or RNAString) object.

      'BString(src)': [TODO: Document me]

      'DNAString(src)': [TODO: Document me]

      'RNAString(src)': [TODO: Document me]

_S_t_a_n_d_a_r_d _g_e_n_e_r_i_c _m_e_t_h_o_d_s:

     In the code snippets below, 'x', 'object', 'e1' and 'e2' are
     BString (or DNAString or RNAString) objects, and 'i' is a numeric
     vector.

      'length(x)' or 'nchar(x)': Used to get the length of a BString,
          i.e., its number of letters

      'x[i]': [TODO: Document me]

      'e1 == e2': [TODO: Document me]

      'e1 != e2': [TODO: Document me]

      'as.character(x)': [TODO: Document me]

      'toString(x)': [TODO: Document me]

_O_t_h_e_r _f_u_n_c_t_i_o_n_s _a_n_d _g_e_n_e_r_i_c_s:

     In the code snippets below, 'x' is a BString (or DNAString or
     RNAString) object and 'first' and 'last' are single numerics.

      'subBString(x, first, last)': [TODO: Document me]

_A_u_t_h_o_r(_s):

     H. Pages

_S_e_e _A_l_s_o:

     BStringViews

_E_x_a_m_p_l_e_s:

       b <- BString("I am a BString object")
       length(b)
       d <- DNAString("TTGAAAA-CTC-N")
       length(d)
       r <- RNAString(d)

