R/zzz.R

###
###

.pkgname <- "BSgenome.ZmaysPH207.Phytozome12.v1"

.seqnames <- NULL

.circ_seqs <- NULL

.mseqnames <- NULL

.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="Zea mays PH207",
        common_name="Maize",
        provider="Phytozome12",
        provider_version="v1.0",
        release_date="November 1, 2016",
        release_name="Zea mays PH207 v1.0",
        source_url="https://phytozome.jgi.doe.gov/pz/portal.html#!info?alias=Org_ZmaysPH207",
        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 <- "ZmaysPH207"
    assign(old_objname, bsgenome, envir=ns)
    namespaceExport(ns, old_objname)
}
lileiting/BSgenome.ZmaysPH207.Phytozome12.v1 documentation built on July 2, 2019, 12:19 a.m.