dNameBuilder_DB: Build Data Packages for Mapping between ID and Name

Description Usage Arguments Details Value Author(s) Examples

View source: R/dNameBuilder_DB.R

Description

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

Usage

1
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 <jdoe@doe.com>".

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.

Value

This function does not return any value.

Author(s)

Hong Li

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# 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)
}

Example output

Loading required package: RSQLite
Loading required package: Biobase
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colMeans, colSums, colnames, do.call,
    duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
    lapply, lengths, mapply, match, mget, order, paste, pmax, pmax.int,
    pmin, pmin.int, rank, rbind, rowMeans, rowSums, rownames, sapply,
    setdiff, sort, table, tapply, union, unique, unsplit, which,
    which.max, which.min

Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: AnnotationDbi
Loading required package: stats4
Loading required package: IRanges
Loading required package: S4Vectors

Attaching package: 'S4Vectors'

The following object is masked from 'package:base':

    expand.grid

PAnnBuilder documentation built on May 2, 2018, 4:07 a.m.