Skip to content

Commit

Permalink
Revert "Initial commit"
Browse files Browse the repository at this point in the history
This reverts commit db381bb4d13f6f09a61f236f819184e5e6f43bd8.

Initial commit

Annotation for fission yeast

Delete org.Spombe.eg.sqlite
  • Loading branch information
llq0325 committed Jul 26, 2021
0 parents commit 249b343
Show file tree
Hide file tree
Showing 6 changed files with 203 additions and 0 deletions.
14 changes: 14 additions & 0 deletions DESCRIPTION
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

16 changes: 16 additions & 0 deletions NAMESPACE
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
)

36 changes: 36 additions & 0 deletions R/zzz.R
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())
}

18 changes: 18 additions & 0 deletions man/org.Spombe.egBASE.Rd
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}

32 changes: 32 additions & 0 deletions man/org.Spombe.egORGANISM.Rd
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}

87 changes: 87 additions & 0 deletions man/org.Spombe.eg_dbconn.Rd
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}

0 comments on commit 249b343

Please sign in to comment.