annotate TxDb.Hsapiens.UCSC.hg19.knownGene/R/zzz.R @ 39:5447fc8946ed draft default tip

Uploaded
author testtool
date Fri, 13 Oct 2017 11:22:49 -0400
parents ec7a1f7f9a94
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
37
ec7a1f7f9a94 Uploaded
testtool
parents:
diff changeset
1 ###
ec7a1f7f9a94 Uploaded
testtool
parents:
diff changeset
2 ### Load any db objects whenever the package is loaded.
ec7a1f7f9a94 Uploaded
testtool
parents:
diff changeset
3 ###
ec7a1f7f9a94 Uploaded
testtool
parents:
diff changeset
4
ec7a1f7f9a94 Uploaded
testtool
parents:
diff changeset
5 .onLoad <- function(libname, pkgname)
ec7a1f7f9a94 Uploaded
testtool
parents:
diff changeset
6 {
ec7a1f7f9a94 Uploaded
testtool
parents:
diff changeset
7 ns <- asNamespace(pkgname)
ec7a1f7f9a94 Uploaded
testtool
parents:
diff changeset
8 path <- system.file("extdata", package=pkgname, lib.loc=libname)
ec7a1f7f9a94 Uploaded
testtool
parents:
diff changeset
9 files <- dir(path)
ec7a1f7f9a94 Uploaded
testtool
parents:
diff changeset
10 for(i in seq_len(length(files))){
ec7a1f7f9a94 Uploaded
testtool
parents:
diff changeset
11 db <- loadDb(system.file("extdata", files[[i]], package=pkgname,
ec7a1f7f9a94 Uploaded
testtool
parents:
diff changeset
12 lib.loc=libname),packageName=pkgname)
ec7a1f7f9a94 Uploaded
testtool
parents:
diff changeset
13 objname <- sub(".sqlite$","",files[[i]])
ec7a1f7f9a94 Uploaded
testtool
parents:
diff changeset
14 assign(objname, db, envir=ns)
ec7a1f7f9a94 Uploaded
testtool
parents:
diff changeset
15 namespaceExport(ns, objname)
ec7a1f7f9a94 Uploaded
testtool
parents:
diff changeset
16 }
ec7a1f7f9a94 Uploaded
testtool
parents:
diff changeset
17 }