A connection, or a character string naming the file to print to (see
the file argument of the cat function for
the details).
show.indices
The CREATE INDEX statements are not shown by default.
Use show.indices=TRUE to get them.
Details
KEGG_dbconn returns a connection object to the
package annotation DB. IMPORTANT: Don't call
dbDisconnect on the connection object
returned by KEGG_dbconn or you will break all the
AnnDbObj objects defined
in this package!
KEGG_dbfile returns the path (character string) to the
package annotation DB (this is an SQLite file).
KEGG_dbschema prints the schema definition of the
package annotation DB.
KEGG_dbInfo prints other information about the package
annotation DB.
Value
KEGG_dbconn: a DBIConnection object representing an
open connection to the package annotation DB.
KEGG_dbfile: a character string with the path to the
package annotation DB.
library(DBI)
## Count the number of rows in the "pathway2name" table:
dbGetQuery(KEGG_dbconn(), "SELECT COUNT(*) FROM pathway2name")
KEGG_dbschema()
KEGG_dbInfo()
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(KEGG.db)
Loading required package: AnnotationDbi
Loading required package: stats4
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, xtabs
The following objects are masked from 'package:base':
Filter, Find, Map, Position, Reduce, anyDuplicated, append,
as.data.frame, cbind, 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, rownames, sapply, setdiff, sort, table, tapply, union,
unique, unsplit
Loading required package: Biobase
Welcome to Bioconductor
Vignettes contain introductory material; view with
'browseVignettes()'. To cite Bioconductor, see
'citation("Biobase")', and for packages 'citation("pkgname")'.
Loading required package: IRanges
Loading required package: S4Vectors
Attaching package: 'S4Vectors'
The following objects are masked from 'package:base':
colMeans, colSums, expand.grid, rowMeans, rowSums
KEGG.db contains mappings based on older data because the original
resource was removed from the the public domain before the most
recent update was produced. This package should now be considered
deprecated and future versions of Bioconductor may not have it
available. Users who want more current data are encouraged to look
at the KEGGREST or reactome.db packages
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/KEGG.db/KEGG_dbconn.Rd_%03d_medium.png", width=480, height=480)
> ### Name: KEGG_dbconn
> ### Title: Collect information about the package annotation DB
> ### Aliases: KEGG_dbconn KEGG_dbfile KEGG_dbschema KEGG_dbInfo
> ### Keywords: utilities datasets
>
> ### ** Examples
>
> library(DBI)
> ## Count the number of rows in the "pathway2name" table:
> dbGetQuery(KEGG_dbconn(), "SELECT COUNT(*) FROM pathway2name")
COUNT(*)
1 478
>
> KEGG_dbschema()
CREATE TABLE metadata (
name VARCHAR(80) PRIMARY KEY,
value VARCHAR(255)
);
CREATE TABLE pathway2name (
path_id CHAR(5) NOT NULL UNIQUE, -- KEGG pathway short ID
path_name VARCHAR(100) NOT NULL UNIQUE -- KEGG pathway name
);
CREATE TABLE pathway2gene (
pathway_id CHAR(8) NOT NULL, -- KEGG pathway long ID
gene_or_orf_id VARCHAR(20) NOT NULL -- Entrez Gene or ORF ID
);
CREATE TABLE ath_NCBI_pathway2gene (
pathway_id CHAR(8) NOT NULL, -- KEGG pathway long ID
gene_or_orf_id VARCHAR(20) NOT NULL -- Entrez Gene or ORF ID
);
CREATE TABLE ec2go(ec_no VARCHAR(16),go_id CHAR(10));
CREATE TABLE map_counts (
map_name VARCHAR(80) PRIMARY KEY,
count INTEGER NOT NULL
);
CREATE TABLE map_metadata (
map_name VARCHAR(80) NOT NULL,
source_name VARCHAR(80) NOT NULL,
source_url VARCHAR(255) NOT NULL,
source_date VARCHAR(20) NOT NULL
);
>
> KEGG_dbInfo()
name value
1 PATHNAMESOURCENAME KEGG PATHWAY
2 PATHNAMESOURCEURL ftp://ftp.genome.jp/pub/kegg/pathway
3 PATHNAMESOURCEDATE 2011-Mar15
4 KEGGSOURCENAME KEGG GENOME
5 KEGGSOURCEURL ftp://ftp.genome.jp/pub/kegg/genomes
6 KEGGSOURCEDATE 2011-Mar15
7 GOEXTSOURCEDATE 2015-Sepec2go27
8 GOEXTSOURCENAME Gene Ontology External Link
9 GOEXTSOURCEURL http://www.geneontology.org/external2go
10 DBSCHEMA KEGG_DB
11 Db type KEGGDb
12 DBSCHEMAVERSION 2.1
>
>
>
>
>
> dev.off()
null device
1
>