pBaseBuilder_DB         package:PAnnBuilder         R Documentation

_B_u_i_l_d _D_a_t_a _P_a_c_k_a_g_e_s _f_o_r _P_r_i_m_a_r_y _P_r_o_t_e_i_n _D_a_t_a_b_a_s_e

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

     Given the URL to SwissProt, TREMBL, IPI or NCBI RefSeq protein
     data, this function creates a SQLite-based annotation data
     package.

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

     pBaseBuilder_DB(baseMapType = c("sp","trembl","ipi","refseq"), organism, 
                    prefix, pkgPath, version, author)

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

baseMapType: a character string that can be either "sp", "trembl",
          "ipi" or "refseq" to indicate which protein database will be
          used.

organism: a character string for the name of the organism of concern.
          (eg: "Homo sapiens")

  prefix: the prefix of the name of the data package to be built. (e.g.
           "hsaSP"). The name of builded package is prefix+".db". 

 pkgPath: a character string for the full path of an existing directory
          where the built backage will be stored.

 version: a character string for the version number.

  author: a list with named elements "authors" containing a character
          vector of author names and "maintainer" containing the
          complete character string for the maintainer field, for
          example, "Jane Doe <jdoe@doe.com>".

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

     Build annotation data packages for proteins in primary protein
     database, including SwissProt, TREMBL, IPI or NCBI RefSeq
     Database. Basic annotation  information will be integrated with
     protein entries, including protein    sequence, description,
     coding gene, structure, Gene Ontology, KEGG pathway,  Pfam doamin
     and so on.

     When baseMapType = "sp", protein data are from
     UniProtKB/Swiss-Prot.  (<URL: http://expasy.org/sprot/>)

     When baseMapType = "trembl", protein data are from
     UniProtKB/TrEMBL. (<URL: http://expasy.org/sprot/>)

     When baseMapType = "ipi", protein data are from International
     Protein Index  (IPI),and seven organisms are supported: Homo
     sapiens, Mus musculus, Rattus  norvegicus, Danio rerio, Bos
     taurus, Gallus gallus, Arabidopsis thaliana.  (<URL:
     http://http://www.ebi.ac.uk/IPI/IPIhelp.html/>)

     When baseMapType = "refseq", protein data are from NCBI Reference
     Sequence,  and six organisms are supported: Homo sapiens, Mus
     musculus, Rattus norvegicus,  Danio rerio, Bos taurus, Xenopus
     tropicalis.  (<URL: http://www.ncbi.nlm.nih.gov/RefSeq/>)

     Data files in the database will be automatically downloaded to the
     tmp directory, so enough space is needed for the data files. After
     downloading, files are parsed by perl, so perl must be installed. 
     It may  take a long time to parse database and build R package.
     Alternatively, we have  produced diverse R packages by
     PAnnBuilder, and you can download appropriate  package via <URL:
     http://www.biosino.org/PAnnBuilder> .

_V_a_l_u_e:

     This function does not return any value.

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

     Hong Li

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

     # Set path, version and author for the package.
     pkgPath <- tempdir()
     version <- "1.0.0"
     author <- list()
     author[["authors"]] <- "Hong Li"
     author[["maintainer"]] <- "Hong Li <sysptm@gmail.com>"

     ## It may take a long time to parse database and build R package.
     if(interactive()){
         # Build annotation data packages "org.Hs.sp.db" for Homo sapiens
         # proteins in SwissProt.
         pBaseBuilder_DB(baseMapType = "sp", organism = "Homo sapiens",  
                         prefix = "org.Hs.sp", pkgPath = pkgPath, version = version, 
                         author = author)                 
         
         # Build annotation data packages "org.Mm.ipi.db" for Mus musculus
         # proteins in IPI.
         pBaseBuilder_DB(baseMapType = "ipi", organism = "Mus musculus",  
                         prefix = "org.Mm.ipi", pkgPath = pkgPath, version = version, 
                         author = author)
                                 
         # Build annotation data packages "org.Rn.ref.db" for Rattus norvegicus
         # proteins in NCBI RefSeq.
         pBaseBuilder_DB(baseMapType = "refseq", organism = "Rattus norvegicus",
                         prefix = "org.Rn.ref", pkgPath = pkgPath, version = version,
                         author = author)
     }

