makeStandardOrgDbs {AnnotationHubData} | R Documentation

## Functions to add OrgDb and TxDb sqlite files to AnnotationHub

### Description

Add OrgDb and TxDb sqlite files to AnnotationHub

### Usage

    makeStandardOrgDbsToAHM(currentMetadata, justRunUnitTest = FALSE,
                            BiocVersion = biocVersion(),
                            downloadOrgDbs = TRUE)

    makeStandardTxDbsToAHM(currentMetadata, justRunUnitTest = FALSE,
                           BiocVersion = biocVersion(), TxDbs)

    makeNCBIToOrgDbsToAHM(currentMetadata, justRunUnitTest = FALSE,
                          BiocVersion = biocVersion(),
                          baseUrl = "ftp://ftp.ncbi.nlm.nih.gov/gene/DATA/")

### Arguments

`currentMetadata` | Historically was intended to be a list of metadata to filter, i.e., records that do not need to be processed again. In some recipes this is used as a way to pass additional arguments. Need to remove or make consistent.
`baseUrl` | A `character()`. The file location.
`justRunUnitTest` | A `logical`. When TRUE, a small number of records (usually <= 5) are processed instead of all.
`BiocVersion` | A `character(1)`. The resource will be available for Bioconductor versions greater than and equal to this version. Default is BiocInstaller::biocVersion().
`TxDbs` | Character vector of the `TxDb` names; generally includes `TxDbs` that were new or updated for the current release.
`downloadOrgDbs` | A `logical`. Indicates if all `OrgDb` packages in the Bioconductor repo should be downloaded and installed. This should be `TRUE` the first time the recipe is run and can be `FALSE` for subsequent runs when testing.

### Details

`makeStandardOrgDbsToAHM` and `makeStandardTxDbsToAHM` extracts the sqlite files from the existing `OrgDb` and `TxDb` packages in the Bioconductor repositories and generate associated metadata.

`makeNCBIToOrgDbsToAHM` creates sqlite files and metadata for 1000 organisms with the `makeOrgPackageFromNCBI` function. These organisms are less 'main stream' than those hosted in the Bioconductor repository (`makeStandardOrgDbsToAHM`) and the databases are less comprehensive because data only come from one source, NCBI.

### Value

List of `AnnotationHubMetadata` objects.

### Author(s)

Bioconductor Core Team

### See Also

- updateResources

- AnnotationHubMetadata

### Examples

    ## Not run:
    ## In Bioconductor 3.5, one new TxDb was added and 4 active
    ## tracks were updated. This piece of code shows how to add these 5
    ## packages to AnnotationHub.

    ## Step I: generate metadata
    ##
    ## Generate the metadata with the low-level helper for inspection.
    TxDbs <- c("TxDb.Ggallus.UCSC.galGal5.refGene",
               "TxDb.Celegans.UCSC.ce11.refGene",
               "TxDb.Rnorvegicus.UCSC.rn5.refGene",
               "TxDb.Dmelanogaster.UCSC.dm6.ensGene",
               "TxDb.Rnorvegicus.UCSC.rn6.refGene")
    meta <- makeStandardTxDbsToAHM(currentMetadata=list(AnnotationHubRoot=getwd()),
                                   justRunUnitTest=FALSE,
                                   TxDbs = TxDbs)

    ## Once the low-level helper runs with no errors, try generating the
    ## metadata with the high-level wrapper updateResources(). Setting
    ## metadataOnly=TRUE will generate metadata only and not push resources
    ## to S3. insert=FALSE prevents the metadata from being inserted in the
    ## database.
    ##
    ## The metadata generated by updateResources() will be the same as that
    ## generated by makeStandardTxDbsToAHM(). Both should be a list the same
    ## length as the number of TxDbs specified.
    meta <- updateResources(getwd(),
                            preparerClasses="TxDbFromPkgsImportPreparer",
                            metadataOnly=TRUE, insert = FALSE,
                            justRunUnitTest=FALSE, TxDbs = TxDbs)

    INFO [2017-04-11 09:12:09] Preparer Class: TxDbFromPkgsImportPreparer
    complete!
    > length(meta)
    [1] 5

    ## Step II: push resources to S3
    ##
    ## If the metadata looks correct we are ready to push resources to S3.
    ## Set metadataOnly=FALSE but keep insert=FALSE.

    meta <- updateResources(getwd(),
                            BiocVersion="3.5",
                            preparerClasses="TxDbFromPkgsImportPreparer",
                            metadataOnly=FALSE, insert = FALSE,
                            justRunUnitTest=FALSE, TxDbs = TxDbs)

    ## Step III: insert metadata in AnnotationHub production database
    ##
    ## Inserting the metadata in the database is usually done as a separte step
    ## and with the help of the AnnotationHub docker.
    ## Set metadataOnly=TRUE and insert=TRUE.
    meta <- updateResources(getwd(),
                            BiocVersion="3.5",
                            preparerClasses="TxDbFromPkgsImportPreparer",
                            metadataOnly=FALSE, insert = FALSE,
                            justRunUnitTest=FALSE, TxDbs = TxDbs)

    ## End(Not run)

[Package AnnotationHubData version 1.10.3 Index]