XStringSet-class         package:Biostrings         R Documentation

_B_S_t_r_i_n_g_S_e_t, _D_N_A_S_t_r_i_n_g_S_e_t, _R_N_A_S_t_r_i_n_g_S_e_t _a_n_d _A_A_S_t_r_i_n_g_S_e_t _o_b_j_e_c_t_s

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

     The BStringSet class is a container for storing a set of 'BString'
     objects and for making its manipulation easy and efficient.
     Similarly, the DNAStringSet (or RNAStringSet, or AAStringSet)
     class is a container for storing a set of 'DNAString' (or
     'RNAString', or 'AAString') objects.

     The BStringList class (and family) is equivalent to the BStringSet
     family. It was a first attempt to address the problem of storing a
     large set of sequences but it has been superseded by the
     BStringSet family.

_U_s_a_g_e:

       BStringSet(x, start=NA, end=NA, width=NA, use.names=TRUE)
       DNAStringSet(x, start=NA, end=NA, width=NA, use.names=TRUE)
       RNAStringSet(x, start=NA, end=NA, width=NA, use.names=TRUE)
       AAStringSet(x, start=NA, end=NA, width=NA, use.names=TRUE)

       ## The BStringList family has been superseded by the more efficient
       ## BStringSet family
       BStringList(x, start=NA, end=NA, width=NA, use.names=TRUE, check=TRUE)
       DNAStringList(x, start=NA, end=NA, width=NA, use.names=TRUE, check=TRUE)
       RNAStringList(x, start=NA, end=NA, width=NA, use.names=TRUE, check=TRUE)
       AAStringList(x, start=NA, end=NA, width=NA, use.names=TRUE, check=TRUE)

_A_r_g_u_m_e_n_t_s:

       x: [TODO] 

   start: [TODO] 

     end: [TODO] 

   width: [TODO] 

use.names: [TODO] 

   check: [TODO] 

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

     [TODO]

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

     The XStringSet class derives from the IRanges class hence all the
     accessor methods defined for a IRanges object can also be used on
     an XStringSet object. In particular, the following methods are
     available (in the code snippets below, 'x' is an XStringSet
     object:


      'length(x)': The number of sequences in 'x'.

      'width(x)': A vector of non-negative integers containing the
          number of letters for each element in 'x'.

      'nchar(x)': The same as 'width(x)'.

      'names(x)': 'NULL' or a character vector of the same length as
          'x' containing a short user-provided description or comment
          for each element in 'x'. These are the only data in an
          XStringSet object that can safely be changed by the user. All
          the other data are immutable! As a general recommendation,
          the user should never try to modify an object by accessing
          its slots directly.


_S_u_b_s_e_t_t_i_n_g _m_e_t_h_o_d_s:

     In the code snippets below, 'x' is an XStringSet object, and 'i'
     should be an index specifying the elements to extract.


      'x[i]': Return a new XStringSet object made of the selected
          elements.

      'x[[i]]': Extract the i-th 'BString' object from 'x'.


_O_t_h_e_r _m_e_t_h_o_d_s:

     In the code snippets below, 'x' is an XStringSet object.


      'as.list(x)': Return the elements in 'x' as a standard R list.


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

     H. Pages

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

     BString-class, DNAString-class, RNAString-class, AAString-class,
     XStringViews-class, IRanges

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

       x1 <- DNAStringSet(c("TTGA", "-CTC-N"))
       x1
       names(x1)
       names(x1)[2] <- "seqB"
       x1

       library(drosophila2probe)
       x2 <- DNAStringSet(drosophila2probe$sequence)
       x2

       RNAStringSet(x2, start=2, end=-5)

