GenomeData-class          package:BSgenome          R Documentation

_D_a_t_a _o_n _t_h_e _g_e_n_o_m_e

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

     'GenomeData' formally represents genomic data as a list, with one
     element per chromosome in the genome.

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

     This class facilitates storing data on the genome by formalizing a
     set of metadata fields for storing the organism (e.g. Mmusculus),
     genome build provider (e.g. UCSC), and genome build version (e.g.
     mm9).

     The data is represented as a list, with one element per chromosome
     (or really any sequence, like a gene). There are no constraints as
     to the data type of the elements.

     Note that as an 'AnnotatedList', it is possible to store
     chromosome-level data (e.g. the lengths) in the 'elementMetadata'
     slot. The 'organism', 'provider' and 'providerVersion' are all
     stored in the the 'AnnotatedList' 'metadata', so they may be
     retrieved in list form by calling 'metadata(x)'.

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

     In the code snippets below, 'x' is a 'GenomeData' object.


      'organism(x)': Get the single string indicating the organism, if
          specified, otherwise 'NULL'.

      'provider(x)': Get the single string indicating the genome build
          provider, if specified, otherwise 'NULL'.

      'providerVersion(x)': Get the single string indicating the genome
          build version, if specified, otherwise 'NULL'.


_C_o_n_s_t_r_u_c_t_o_r:


      'GenomeData(elements = list(), providerVersion = NULL, organism =
          NULL, provider = NULL, metadata = list(), elementMetadata =
          NULL, ...)': Creates a 'GenomeData' with the elements from
          the 'elements' parameter, a list. The other arguments
          correspond to the metadata fields, and, with the exception of
          'elementMetadata', should all be either single strings or
          'NULL' (unspecified). Additional global metadata elements may
          be passed in 'metadata', in list-form, and via '...'. The
          elements in 'metadata' are always overridden by the explicit
          arguments, like 'organism' and those in '...'. 
          'elementMetadata' should be an 'XDataFrame' or 'NULL'. 


_C_o_e_r_c_i_o_n:


      'as(from, "data.frame")': Coerces each subelement to a data
          frame, and binds them into a single data frame with an
          additional column indicating chromosome


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

     Michael Lawrence

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

     GenomeDataList, a container of this class and useful for storing
     data on multiple samples.

     AnnotatedList, the base of this class.

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

     gd <- GenomeData(list(chr1 = IRanges(1, 10), chrX = IRanges(2, 5)),
                      organism = "Mmusculus", provider = "UCSC",
                      providerVersion = "mm9")
     organism(gd)
     providerVersion(gd)
     provider(gd)
     gd[["chr1"]] # get data for chromsome 1

