BSgenome-class           package:BSgenome           R Documentation

_T_h_e _B_S_g_e_n_o_m_e _c_l_a_s_s

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

     A container for the complete genome sequence of a given specie.

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

     [TODO: Put some details here]

_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' is a BSgenome object and 'name' is
     the name of a chromosome (character-string).

      'names(x)': Returns the index of BStringViews objects contained
          in 'x'. Each BStringViews object in 'x' was created from a
          single FASTA file. The names returned by 'names(x)' are
          usually the names of those source files but eventually a
          common prefix or suffix was removed in order to keep them as
          short as possible.

      'length(x)': Returns the length of 'x', i.e., the number of
          BStringViews objects that it contains. This is the same as
          'length(names(x))'.

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

      'x$name': [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 BSgenome object and 'name' is
     the name of a chromosome (character-string).

      'unload(x, name)': [TODO: Document me]

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

     H. Pages

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

     matchPattern, BStringViews, DNAString

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

       library(BSgenome.Celegans.UCSC.ce2)
       length(Celegans)
       Celegans

       ## Access chromosome V (BStringViews object) with
       Celegans[["chrV"]]
       ## or with
       Celegans$chrV

       ## Note that the chromosome V data are not loaded into memory until the
       ## first time you try to access them (what gets loaded is the serialized
       ## BStringViews instance stored in the "chrV.rda" file)
       ## To unload chromosome V (if you need to free some memory)
       unload(Celegans, "chrV")

       ## Note that assignment of BStringViews objects does NOT copy the data
       c <- Celegans[["chrV"]]

       ## But then, clean unloading is a bit more complicated
       unload(Celegans, "chrV")
       remove(c)
       ## More generally, you need to keep track of all BStringViews objects
       ## referencing the same data if you want to be able to unload these data
       ## from memory

