File: GO_dbconn.Rd

package info (click to toggle)
r-bioc-go.db 3.12.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 88,960 kB
  • sloc: makefile: 2
file content (87 lines) | stat: -rw-r--r-- 2,170 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87

\name{GO_dbconn}

\alias{GO_dbconn}
\alias{GO_dbfile}
\alias{GO_dbschema}
\alias{GO_dbInfo}


\title{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{
  GO_dbconn()
  GO_dbfile()
  GO_dbschema(file="", show.indices=FALSE)
  GO_dbInfo()
}

\arguments{
  \item{file}{
    A connection, or a character string naming the file to print to (see
    the \code{file} argument of the \code{\link[base]{cat}} function for
    the details).
  }
  \item{show.indices}{
    The CREATE INDEX statements are not shown by default.
    Use \code{show.indices=TRUE} to get them.
  }
}

\details{
  \code{GO_dbconn} returns a connection object to the
  package annotation DB.  IMPORTANT: Don't call
  \code{\link[DBI:dbConnect]{dbDisconnect}} on the connection object
  returned by \code{GO_dbconn} or you will break all the
  \code{\link[AnnotationDbi:AnnDbObj-class]{AnnDbObj}} objects defined
  in this package!

  \code{GO_dbfile} returns the path (character string) to the
  package annotation DB (this is an SQLite file).

  \code{GO_dbschema} prints the schema definition of the
  package annotation DB.

  \code{GO_dbInfo} prints other information about the package
  annotation DB.
}

\value{
  \code{GO_dbconn}: a DBIConnection object representing an
  open connection to the package annotation DB.

  \code{GO_dbfile}: a character string with the path to the
  package annotation DB.

  \code{GO_dbschema}: none (invisible \code{NULL}).

  \code{GO_dbInfo}: none (invisible \code{NULL}).
}

\seealso{
  \code{\link[DBI:dbSendQuery]{dbGetQuery}},
  \code{\link[DBI:dbConnect]{dbConnect}},
  \code{\link[AnnotationDbi:AnnDbObj-class]{dbconn}},
  \code{\link[AnnotationDbi:AnnDbObj-class]{dbfile}},
  \code{\link[AnnotationDbi:AnnDbObj-class]{dbschema}},
  \code{\link[AnnotationDbi:AnnDbObj-class]{dbInfo}}
}

\examples{
  library(DBI)
  ## Count the number of rows in the "go_term" table:
  dbGetQuery(GO_dbconn(), "SELECT COUNT(*) FROM go_term")

  GO_dbschema()

  GO_dbInfo()
}

\keyword{utilities}
\keyword{datasets}