.packageName <- "hgu95av2.db" datacache <- new.env(hash=TRUE, parent=emptyenv()) hgu95av2 <- function() showQCData("hgu95av2", datacache) hgu95av2_dbconn <- function() dbconn(datacache) hgu95av2_dbfile <- function() dbfile(datacache) hgu95av2_dbschema <- function(file="", show.indices=FALSE) dbschema(datacache, file=file, show.indices=show.indices) hgu95av2_dbInfo <- function() dbInfo(datacache) hgu95av2ORGANISM <- "Homo sapiens" .onLoad <- function(libname, pkgname) { require("methods", quietly=TRUE) ## Connect to the SQLite DB dbfile <- system.file("extdata", "hgu95av2.sqlite", package=pkgname, lib.loc=libname) assign("dbfile", dbfile, envir=datacache) dbconn <- dbFileConnect(dbfile) assign("dbconn", dbconn, envir=datacache) ## Create the AnnObj instances ann_objs <- createAnnObjs.HUMANCHIP_DB("hgu95av2", "chip hgu95av2", dbconn, datacache) mergeToNamespaceAndExport(ann_objs, pkgname) } .onUnload <- function(libpath) { dbFileDisconnect(hgu95av2_dbconn()) }