
Create or refresh cache of BANC meta information
Source:R/banc-coconatfly.R
banc_meta_create_cache.Rdbanc_meta_create_cache() builds or refreshes an in-memory cache of
BANC metadata for efficient repeated lookups. The default source = "gcs" reads the public compiled meta feather
(gs://lee-lab_brain-and-nerve-cord-fly-connectome/compiled_data/banc_888/banc_888_meta.feather)
and needs no authentication beyond network access. The main accessor
banc_meta() always reads from the most recently created cache.
Usage
banc_meta_create_cache(
source = c("gcs", "cave", "seatable"),
overwrite = FALSE,
use_seatable = NULL,
return = FALSE
)Arguments
- source
Character. Where to read the meta from. One of
"gcs"(default),"cave","seatable". See Details.- overwrite
Logical. If
TRUEandsource = "gcs", re-download the feather even if a cached copy exists.- use_seatable
Deprecated. If supplied,
TRUEmaps tosource = "seatable"andFALSE(the old default) maps tosource = "cave"(the previous default before GCS).- return
Logical; if
TRUE, return the cache tibble; otherwise invisibleNULL.
Details
BANC meta queries can be slow; caching avoids repeated database access. Rerun whenever labels are updated upstream.
Three sources are supported:
"gcs"(default): downloadsbanc_888_meta.featherfrom the public bucket (cached undertools::R_user_dir("bancr", "cache")). This is the recommended path for almost all users; it does not require BANC CAVE or SeaTable credentials."cave": builds the cache live frombanc_cell_info()+banc_codex_annotations(). Requires authenticated BANC CAVE access. Use this when you need fresher annotations than the latest GCS snapshot."seatable": pulls the in-progress draftbanc_metaSeaTable. Restricted to the BANC production team (requires aBANCTABLE_TOKEN); the rest of thebanctable_*family is in the same category.
See also
Other coconatfly:
register_banc_coconat()
Examples
if (FALSE) { # \dontrun{
# Default: download once, cache locally, then look up
banc_meta_create_cache()
result <- banc_meta()
# Live from CAVE (needs BANC CAVE auth)
banc_meta_create_cache(source = "cave")
# SeaTable (production team only; needs BANCTABLE_TOKEN)
banc_meta_create_cache(source = "seatable")
# Use the cache to drive a coconatfly plot
library(coconatfly)
register_banc_coconat()
cf_cosine_plot(cf_ids('/type:LAL0(08|09|10|42)',
datasets = c("banc", "hemibrain")))
} # }