inst/pkgtemplates/BSgenome_datapkg/R/zzz.R

###
###

.pkgname <- "@[email protected]"

.seqnames <- @SEQNAMES@

.circ_seqs <- @CIRCSEQS@

.mseqnames <- @MSEQNAMES@

.onLoad <- function(libname, pkgname)
{
    if (pkgname != .pkgname)
        stop("package name (", pkgname, ") is not ",
             "the expected name (", .pkgname, ")")
    extdata_dirpath <- system.file("extdata", package=pkgname,
                                   lib.loc=libname, mustWork=TRUE)

    ## Make and export BSgenome object.
    bsgenome <- BSgenome(
        organism="@[email protected]",
        common_name="@[email protected]",
        provider="@[email protected]",
        provider_version="@[email protected]",
        release_date="@[email protected]",
        release_name="@[email protected]",
        source_url="@[email protected]",
        seqnames=.seqnames,
        circ_seqs=.circ_seqs,
        mseqnames=.mseqnames,
        seqs_pkgname=pkgname,
        seqs_dirpath=extdata_dirpath
    )

    ns <- asNamespace(pkgname)

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

    old_objname <- "@[email protected]"
    assign(old_objname, bsgenome, envir=ns)
    namespaceExport(ns, old_objname)
}

Try the BSgenome package in your browser

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

BSgenome documentation built on May 6, 2019, 2:29 a.m.