Last data update: 2014.03.03

R: Collect information about the package annotation DB
indac_dbconnR Documentation

Collect information about the package annotation DB

Description

Some convenience functions for getting a connection object to (or collecting information about) the package annotation DB.

Usage

  indac_dbconn()
  indac_dbfile()
  indac_dbschema(file="", show.indices=FALSE)
  indac_dbInfo()

Arguments

file

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

indac_dbconn returns a connection object to the package annotation DB. IMPORTANT: Don't call dbDisconnect on the connection object returned by indac_dbconn or you will break all the AnnDbObj objects defined in this package!

indac_dbfile returns the path (character string) to the package annotation DB (this is an SQLite file).

indac_dbschema prints the schema definition of the package annotation DB.

indac_dbInfo prints other information about the package annotation DB.

Value

indac_dbconn: a DBIConnection object representing an open connection to the package annotation DB.

indac_dbfile: a character string with the path to the package annotation DB.

indac_dbschema: none (invisible NULL).

indac_dbInfo: none (invisible NULL).

See Also

dbGetQuery, dbConnect, dbconn, dbfile, dbschema, dbInfo

Examples

  library(DBI)
  ## Count the number of rows in the "probes" table:
  dbGetQuery(indac_dbconn(), "SELECT COUNT(*) FROM probes")

  indac_dbschema()

  indac_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(indac.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

Loading required package: org.Dm.eg.db


> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/indac.db/indac_dbconn.Rd_%03d_medium.png", width=480, height=480)
> ### Name: indac_dbconn
> ### Title: Collect information about the package annotation DB
> ### Aliases: indac_dbconn indac_dbfile indac_dbschema indac_dbInfo
> ### Keywords: utilities datasets
> 
> ### ** Examples
> 
>   library(DBI)
>   ## Count the number of rows in the "probes" table:
>   dbGetQuery(indac_dbconn(), "SELECT COUNT(*) FROM probes")
  COUNT(*)
1    15744
> 
>   indac_dbschema()
CREATE TABLE metadata (name VARCHAR(80) PRIMARY KEY, value VARCHAR(255) );
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
    );
CREATE TABLE map_counts (
      map_name VARCHAR(80) PRIMARY KEY,
      count INTEGER NOT NULL
    );
CREATE TABLE sqlite_stat1(tbl,idx,stat);
CREATE TABLE accessions (probe_id VARCHAR(80),accession VARCHAR(20));
CREATE TABLE probes (probe_id VARCHAR(80), gene_id VARCHAR(10) NULL, is_multiple SMALLINT NOT NULL);

> 
>   indac_dbInfo()
                 name
1     DBSCHEMAVERSION
2             Db type
3  Supporting package
4            DBSCHEMA
5            ORGANISM
6             SPECIES
7        MANUFACTURER
8            CHIPNAME
9     MANUFACTURERURL
10       EGSOURCEDATE
11       EGSOURCENAME
12        EGSOURCEURL
13          CENTRALID
14              TAXID
15       GOSOURCENAME
16        GOSOURCEURL
17       GOSOURCEDATE
18     GOEGSOURCEDATE
19     GOEGSOURCENAME
20      GOEGSOURCEURL
21     KEGGSOURCENAME
22      KEGGSOURCEURL
23     KEGGSOURCEDATE
24       GPSOURCENAME
25        GPSOURCEURL
26       GPSOURCEDATE
27       FBSOURCEDATE
28       FBSOURCENAME
29        FBSOURCEURL
30       ENSOURCEDATE
31       ENSOURCENAME
32        ENSOURCEURL
                                                               value
1                                                                2.1
2                                                             ChipDb
3                                                      AnnotationDbi
4                                                         FLYCHIP_DB
5                                            Drosophila melanogaster
6                                                                Fly
7                                                              INDAC
8                           FlyChip_long_oligonucleotide_002 (FL002)
9                     http://www.flychip.org.uk/services/core/FL002/
10                                                        2015-Sep27
11                                                       Entrez Gene
12                              ftp://ftp.ncbi.nlm.nih.gov/gene/DATA
13                                                          ENTREZID
14                                                              7227
15                                                     Gene Ontology
16 ftp://ftp.geneontology.org/pub/go/godatabase/archive/latest-lite/
17                                                          20150919
18                                                        2015-Sep27
19                                                       Entrez Gene
20                              ftp://ftp.ncbi.nlm.nih.gov/gene/DATA
21                                                       KEGG GENOME
22                              ftp://ftp.genome.jp/pub/kegg/genomes
23                                                        2011-Mar15
24              UCSC Genome Bioinformatics (Drosophila melanogaster)
25                      ftp://hgdownload.cse.ucsc.edu/goldenPath/dm6
26                                                        2014-Dec12
27                                                        2015-Aug18
28                                                           Flybase
29   ftp://ftp.flybase.net/releases/current/precomputed_files/genes/
30                                                        2015-Jul16
31                                                           Ensembl
32                           ftp://ftp.ensembl.org/pub/current_fasta
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>