AnnDbObj-objects        package:AnnotationDbi        R Documentation

_A_n_n_D_b_O_b_j _o_b_j_e_c_t_s

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

     The AnnDbObj class is the most general container for storing any
     kind of SQLite-based annotation data.

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

     Many classes in AnnotationDbi inherit directly or indirectly from
     the AnnDbObj class. One important particular case is the
     AnnDbBimap class which is the lowest class in the AnnDbObj
     hierarchy to also inherit the Bimap interface.

_A_c_c_e_s_s_o_r-_l_i_k_e _m_e_t_h_o_d_s:

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

      'dbconn(x)': Return a connection object to the SQLite DB
          containing 'x''s data.

      'dbfile(x)': Return the path (character string) to the SQLite DB
          (file) containing 'x''s data.

      'dbmeta(x, name)': Print the value of metadata whose name is
          'name'. Also works if 'x' is a DBIConnection object.

      'dbschema(x, file="", show.indices=FALSE)': Print the schema
          definition of the SQLite DB. Also works if 'x' is a
          DBIConnection object.

          The 'file' argument must be a connection, or a character
          string naming the file to print to (see the 'file' argument
          of the 'cat' function for the details).

          The CREATE INDEX statements are not shown by default. Use
          'show.indices=TRUE' to get them.

      'dbInfo(x)': Prints other information about the SQLite DB. Also
          works if 'x' is a DBIConnection object.

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

     'dbConnect', 'dbListTables', 'dbListFields', 'dbGetQuery', Bimap

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

       library(hgu95av2.db)

       dbconn(hgu95av2ENTREZID)              # same as hgu95av2_dbconn()
       dbfile(hgu95av2ENTREZID)              # same as hgu95av2_dbfile()

       dbmeta(hgu95av2_dbconn(), "ORGANISM")
       dbmeta(hgu95av2_dbconn(), "DBSCHEMA")
       dbmeta(hgu95av2_dbconn(), "DBSCHEMAVERSION")

       dbListTables(hgu95av2_dbconn())
       dbListFields(hgu95av2_dbconn(), "probes")
       dbListFields(hgu95av2_dbconn(), "genes")
       dbschema(hgu95av2ENTREZID)            # same as hgu95av2_dbschema()
       ## According to the schema, the probes.id column references the genes.id
       ## column. Note that in all tables, the "id" column is an internal id with
       ## no biological meaning (provided for allowing efficient joins between
       ## tables).
       ## To retrieve the mapping between manufacturer IDs and Entrez Gene IDs:
       dbGetQuery(hgu95av2_dbconn(), "SELECT * FROM probes INNER JOIN genes USING (id) LIMIT 10")
       ## This mapping is in fact the ENTREZID map:
       toTable(hgu95av2ENTREZID)[1:10, ] # only relevant columns are retrieved

       dbInfo(hgu95av2GO)                    # same as hgu95av2_dbInfo()

