convertHub {AnnotationHub} | R Documentation

## Convert old Hub to new Hub structure

### Description

The Hub class was updated to utilize BiocFileCache to allow for file level caching control. This update changed the way files were stored and named. As a convenience for AnnotationHub and ExperimentHub we have provided this helper function to try to re-download files and add them into the BiocFileCache tracking database.

### Usage

    convertHub(oldcachepath=NULL,
               newcachepath=NULL,
               hubType=c("AnnotationHub", "ExperimentHub"),
               proxy=getAnnotationHubOption("PROXY"),
               max.downloads=getAnnotationHubOption("MAX_DOWNLOADS"),
               force=FALSE, verbose=TRUE)

### Arguments

`oldcachepath` | character(1) complete file path location of the old hub to be converted. If left as `NULL`, will use the default path of the old code, which for unix systems was in a user's home directory "~\" and for windows users was in a user's AppData directory "~\AppData".
`newcachepath` | character(1) complete file path to the new location for the cache. If left as `NULL`, will use the new default path which utilizes the `rappdir::user_cache_dir` to deterime the appropriate caching location.
`hubType` | Either AnnotationHub or ExperimentHub. By default assumes AnnotationHub.
`proxy` | proxy connection allowing Internet access, usually through a restrictive firewall. Default: NULL.
`max.downloads` | numeric(1). The integer number of downloads allowed before triggering a warning. This is to help avoid accidental download of a large number of AnnotationHub members
`force` | logical(1). Force re-download of a resource rather than using a cached version.
`verbose` | logical(1). Print out status messages.

### Value

character(1). File path of new cache location. If `verbose` also prints status messages for downloading files and any files that were not redownloaded.

### Author(s)

Lori Shepherd

### See Also

`AnnotationHub`, `getAnnotationHubOption`, `getInfoOnIds`

### Examples

    # To transition over from old default to new default location
    ## Not run: convertHub()

[Package AnnotationHub version 3.2.2 Index]