Learn R Programming

PAnnBuilder (version 1.36.0)

dNameBuilder_DB: Build Data Packages for Mapping between ID and Name

Description

Given the interested database, this function creates a data package to get Name from ID or get ID from Name.

Usage

dNameBuilder_DB(prefix, pkgPath, version, author)

Arguments

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 ".

Value

This function does not return any value.

Details

For given database, build a R package to map entry ID and Name. Supported databases are: "GO": Gene Ontology, http://www.geneontology.org ; "KEGG": KEGG Pathway Database, http://www.genome.ad.jp/kegg/pathway.html ; "PFAM": http://www.sanger.ac.uk/Software/Pfam ; "INTERPRO": http://www.ebi.ac.uk/interpro ; "TAX": NCBI Taxonomy, http://www.ncbi.nlm.nih.gov/sites/entrez?db=Taxonomy ;

dNameBuilder_DB employes functions writeGOName_DB, writeKEGGName_DB writePFAMName_DB, writeINTERPROName_DB and writeTAXName_DB to parse and write data. 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 http://www.biosino.org/PAnnBuilder.

Examples

Run this code
# 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.
# Build ID-Name mapping packages "dName.db" for "GO", "KEGG", "PFAM", "INTERPRO", 
# and "TAX".
if(interactive()){
    dNameBuilder_DB(prefix = "dName", pkgPath, version, author)
}

Run the code above in your browser using DataLab