inst/GmapGenomePackage-template/R/zzz.R

###
### Load the GmapGenome object whenever the package is loaded.
###

.onLoad <- function(libname, pkgname)
{
  ns <- asNamespace(pkgname)

  iit_path <- system.file("extdata", package=pkgname, lib.loc=libname)
  genome <- GmapGenome(genome = "@GMAPGENOMENAME@",
                       directory = GmapGenomeDirectory(iit_path),
                       create = FALSE)

  objname <- pkgname
  assign(objname, genome, envir=ns)
  namespaceExport(ns, objname)
}

Try the gmapR package in your browser

Any scripts or data that you put into this service are public.

gmapR documentation built on Nov. 8, 2020, 5:29 p.m.