-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This reverts commit db381bb4d13f6f09a61f236f819184e5e6f43bd8. Initial commit Annotation for fission yeast Delete org.Spombe.eg.sqlite
- Loading branch information
0 parents
commit 249b343
Showing
6 changed files
with
203 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Package: org.Spombe.eg.db | ||
Title: Genome wide annotation for Schizosaccharomyces pombe | ||
Description: Genome wide annotation for Schizosaccharomyces pombe, primarily based on mapping using Entrez Gene identifiers. | ||
Version: 0.1 | ||
Author: Langqing Liu <[email protected]> | ||
Maintainer: Langqing Liu <[email protected]> | ||
Depends: R (>= 2.7.0), methods, AnnotationDbi (>= 1.52.0) | ||
Suggests: DBI, annotate, RUnit | ||
Imports: methods, AnnotationDbi | ||
License: Artistic-2.0 | ||
organism: Schizosaccharomyces pombe | ||
species: Schizosaccharomyces pombe | ||
biocViews: OrgDb, annotation | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import(methods) | ||
import(AnnotationDbi) | ||
|
||
### Only put what is statically exported here. All the AnnObj instances | ||
### created at load time are dynamically exported (refer to R/zzz.R for | ||
### the details). | ||
export( | ||
org.Spombe.eg, | ||
org.Spombe.eg_dbconn, | ||
org.Spombe.eg_dbfile, | ||
org.Spombe.eg_dbschema, | ||
org.Spombe.eg_dbInfo, | ||
|
||
org.Spombe.egORGANISM | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
datacache <- new.env(hash=TRUE, parent=emptyenv()) | ||
|
||
org.Spombe.eg <- function() showQCData("org.Spombe.eg", datacache) | ||
org.Spombe.eg_dbconn <- function() dbconn(datacache) | ||
org.Spombe.eg_dbfile <- function() dbfile(datacache) | ||
org.Spombe.eg_dbschema <- function(file="", show.indices=FALSE) dbschema(datacache, file=file, show.indices=show.indices) | ||
org.Spombe.eg_dbInfo <- function() dbInfo(datacache) | ||
|
||
org.Spombe.egORGANISM <- "Schizosaccharomyces pombe" | ||
|
||
.onLoad <- function(libname, pkgname) | ||
{ | ||
## Connect to the SQLite DB | ||
dbfile <- system.file("extdata", "org.Spombe.eg.sqlite", package=pkgname, lib.loc=libname) | ||
assign("dbfile", dbfile, envir=datacache) | ||
dbconn <- dbFileConnect(dbfile) | ||
assign("dbconn", dbconn, envir=datacache) | ||
|
||
## Create the OrgDb object | ||
sPkgname <- sub(".db$","",pkgname) | ||
db <- loadDb(system.file("extdata", paste(sPkgname, | ||
".sqlite",sep=""), package=pkgname, lib.loc=libname), | ||
packageName=pkgname) | ||
dbNewname <- AnnotationDbi:::dbObjectName(pkgname,"OrgDb") | ||
ns <- asNamespace(pkgname) | ||
assign(dbNewname, db, envir=ns) | ||
namespaceExport(ns, dbNewname) | ||
|
||
packageStartupMessage(AnnotationDbi:::annoStartupMessages("org.Spombe.eg.db")) | ||
} | ||
|
||
.onUnload <- function(libpath) | ||
{ | ||
dbFileDisconnect(org.Spombe.eg_dbconn()) | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
\name{org.Spombe.eg.db} | ||
\alias{org.Spombe.eg.db} | ||
\alias{org.Spombe.eg} | ||
\title{Bioconductor annotation data package} | ||
\description{ | ||
|
||
Welcome to the org.Spombe.eg.db annotation Package. This is an | ||
organism specific package. The purpose is to provide detailed | ||
information about the species abbreviated in the second part of the | ||
package name org.Spombe.eg.db. This package is updated biannually. | ||
|
||
To learn more about this package, users are encouraged to learn about | ||
the select, columns, keys and keytypes methods. These are described | ||
in a walkthrough on the bioconductor website as well as in the manual | ||
pages and vignettes in the AnnotationDbi package. | ||
} | ||
\keyword{datasets} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
\name{org.Spombe.egORGANISM} | ||
\alias{org.Spombe.egORGANISM} | ||
\title{The Organism for org.Spombe.eg} | ||
\description{ | ||
org.Spombe.egORGANISM is an R object that contains a single item: a | ||
character string that names the organism for which org.Spombe.eg was built. | ||
} | ||
|
||
\details{ | ||
Although the package name is suggestive of the organism for which it | ||
was built, org.Spombe.egORGANISM provides a simple way to programmatically | ||
extract the organism name. | ||
} | ||
|
||
\seealso{ | ||
\itemize{ | ||
\item \code{\link[AnnotationDbi]{AnnotationDb-class}} for use of | ||
the \code{select()} interface. | ||
} | ||
} | ||
|
||
\examples{ | ||
## select() interface: | ||
## Objects in this package can be accessed using the select() interface | ||
## from the AnnotationDbi package. See ?select for details. | ||
|
||
## Bimap interface: | ||
org.Spombe.egORGANISM | ||
} | ||
|
||
\keyword{datasets} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
|
||
\name{org.Spombe.eg_dbconn} | ||
|
||
\alias{org.Spombe.eg_dbconn} | ||
\alias{org.Spombe.eg_dbfile} | ||
\alias{org.Spombe.eg_dbschema} | ||
\alias{org.Spombe.eg_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{ | ||
org.Spombe.eg_dbconn() | ||
org.Spombe.eg_dbfile() | ||
org.Spombe.eg_dbschema(file="", show.indices=FALSE) | ||
org.Spombe.eg_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{org.Spombe.eg_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{org.Spombe.eg_dbconn} or you will break all the | ||
\code{\link[AnnotationDbi:AnnDbObj-class]{AnnDbObj}} objects defined | ||
in this package! | ||
\code{org.Spombe.eg_dbfile} returns the path (character string) to the | ||
package annotation DB (this is an SQLite file). | ||
\code{org.Spombe.eg_dbschema} prints the schema definition of the | ||
package annotation DB. | ||
\code{org.Spombe.eg_dbInfo} prints other information about the package | ||
annotation DB. | ||
} | ||
\value{ | ||
\code{org.Spombe.eg_dbconn}: a DBIConnection object representing an | ||
open connection to the package annotation DB. | ||
\code{org.Spombe.eg_dbfile}: a character string with the path to the | ||
package annotation DB. | ||
\code{org.Spombe.eg_dbschema}: none (invisible \code{NULL}). | ||
\code{org.Spombe.eg_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 "genes" table: | ||
dbGetQuery(org.Spombe.eg_dbconn(), "SELECT COUNT(*) FROM genes") | ||
org.Spombe.eg_dbschema() | ||
org.Spombe.eg_dbInfo() | ||
} | ||
\keyword{utilities} | ||
\keyword{datasets} | ||