Load any dataset from the shared external data release. Dataset identifiers also name convenience functions that call this loader with the same options.
Usage
glyhub_load(
dataset,
kind = c("curated", "raw"),
cache_dir = getOption("glyhub.cache_dir", tools::R_user_dir("glyhub", "cache")),
refresh = FALSE,
offline = FALSE
)Arguments
- dataset
Exact dataset identifier from
glyhub_catalog(), for example"glyhub_GPST000738_N_B4GalT1"or"glyhub_CPTAC_CCRCC".- kind
"curated"returns a data object;"raw"returns the path to a verified source archive. Raw archives are currently available for CPTAC.- cache_dir
Cache directory, defaulting to
tools::R_user_dir("glyhub", "cache"). Set optionglyhub.cache_dirto change the default.- refresh
Download the pinned resource again, even if cached.
- offline
Prohibit downloads; require a verified local resource.
Value
For kind = "curated", a glyexp::GlycomicSE or
glyexp::GlycoproteomicSE. For kind = "raw", an absolute file path.
Details
Downloads and cached files are checked against the package's size and
SHA-256 manifest before use. Files are cached by version and hash.
Interrupted or invalid downloads never replace a verified cached file.
refresh = TRUE cannot be combined with offline = TRUE.
Delete downloaded files from cache_dir to clear the cache.
Dataset objects are no longer exposed through LazyData or data(). Use this
loader or each dataset's same-named function. Both return identical objects
and share the verified cache. Consult dataset help for scientific details.
Examples
glyhub_catalog()[1:3, c("dataset", "bytes")]
#> # A tibble: 3 × 2
#> dataset bytes
#> <chr> <int>
#> 1 glyhub_GPST000738_N_B4GalT1 85324
#> 2 glyhub_GPST000738_N_ST6GAL1 86980
#> 3 glyhub_GPST000643_O 136920