createSimpleBimap       package:AnnotationDbi       R Documentation

_C_r_e_a_t_e_s _a _s_i_m_p_l_e _B_i_m_a_p _f_r_o_m _a _S_Q_L_i_t_e _d_a_t_a_b_a_s_e _i_n _a_n _s_i_t_u_a_t_i_o_n _t_h_a_t
_i_s _e_x_t_e_r_n_a_l _t_o _A_n_n_o_t_a_t_i_o_n_D_b_i

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

     This function allows users to easily make a simple Bimap object
     for extra tables etc that they may wish to add to their annotation
     packages.  For most Bimaps, their definition is stored inside of
     AnnotationDbi.  The addition of this function is to help ensure
     that this does not become a limitation, by allowing simple extra
     Bimaps to easily be defined external to AnnotationDbi.  Usually,
     this will be done in the zzz.R source file of a package so that
     these extra mappings can be seemlessly integrated with the rest of
     the package.  For now, this function assumes that users will want
     to use data from just one table.

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

       createSimpleBimap(tablename, Lcolname, Rcolname, datacache, objName,
       objTarget)

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

tablename: The name of the database table to grab the mapping
          information from.  

Lcolname: The field name from the database table.  These will become
          the Lkeys in the final mapping. 

Rcolname: The field name from the database table.  These will become
          the Rkeys in the final mapping. 

datacache: The datacache object should already exist for every standard
          Annotation package.  It is not exported though, so you will
          have to access it with ::: . It is needed to provide the
          connection information to the function. 

 objName: This is the name of the mapping. 

objTarget: This is the name of the thing the mapping goes with. For
          most uses, this will mean the package name that the mapping
          belongs with. 

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

     ##You simply have to call this function to create a new mapping.  For
     ##example, you could have created a mapping between the gene_name and
     ##the symbols fields from the gene_info table contained in the hgu95av2
     ##package by doing this:
     library(hgu95av2.db)
     hgu95av2NAMESYMBOL <- createSimpleBimap("gene_info",
                                             "gene_name",
                                             "symbol",
                                             hgu95av2.db:::datacache,
                                             "NAMESYMBOL",
                                             "hgu95av2.db")

