Skip to content

Commit

Permalink
add experimental support for our fanc metadata
Browse files Browse the repository at this point in the history
* sourced from neck connective repo
  • Loading branch information
jefferis committed Dec 29, 2024
1 parent c397655 commit 724ff14
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion R/meta.R
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ manc_meta <- function(ids, ...) {
fanc_meta <- function(ids=NULL, ...) {
ids=fanc_ids(ids)
df=fancr::with_fanc(fancorbanc_meta(table='neuron_information', ids=ids, ...))
metaf=getOption('coconatfly.fancmeta')
metaf=getOption('coconatfly.fanc_meta')
if(!is.null(metaf)) {
# we can use an unevaluated call as an option
# by evaluating we can trigger function
Expand Down
10 changes: 10 additions & 0 deletions R/zzz.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.onLoad <- function(libname, pkgname) {
# set up experimental extra
coconatfly.fanc_meta=getOption('coconatfly.fanc_meta')
if(is.null(coconatfly.fanc_meta)) {
options(coconatfly.fanc_meta=function() {
fafbseg::flywire_sirepo_file_memo('https://github.com/flyconnectome/2023neckconnective/blob/dev/data/fanc-neckconnective-anns.tsv', read=TRUE)
})
}
invisible()
}

0 comments on commit 724ff14

Please sign in to comment.