Skip to contents

choose_fanc with set=T (the default) permanently sets FANC to be the default dataset for flywire_.* functions, whereas with_fanc(expr) runs expr with FANC as the temporary target dataset.

choose_banc will permanently change the default dataset to BANC. Remember to switch back with choose_fanc if needed.

with_banc provides a simple way to access the BANC dataset. Just wrap flywire_.* or fanc_.* functions with this to target them at the BANC.

Usage

choose_fanc(set = TRUE)

choose_banc(set = TRUE)

with_fanc(expr, force = TRUE)

with_banc(expr)

Arguments

set

Whether or not to permanently set the FANC autosegmentation as the default for fafbseg functions.

expr

An expression to evaluate while FANC is the default autosegmentation

force

Whether to insist on using FANC even if BANC is the active dataset. This option defaults to TRUE for the convenience of end users.

Value

If set=TRUE a list containing the previous values of the relevant global options (in the style of options. If set=FALSE a named list containing the option values.

Details

fancr inherits a significant amount of infrastructure from the fafbseg package. This has the concept of the active autosegmentation, which in turn defines one or more R options containing URIs pointing to voxel-wise segmentation, mesh etc data. These are normally contained within a single neuroglancer URL which points to multiple data layers. For FANC this is the neuroglancer scene returned by fanc_scene.

In general we would recommend using fanc_.* functions or with_fanc if you expect to interact with multiple datasets.

note that with_banc(fanc_xyz2id) is not yet functional as there is no XYZ location / supervoxel id service yet available as yet.

Examples

if (FALSE) { # \dontrun{
choose_fanc()
options()[grep("^fafbseg.*url", names(options()))]
} # }
# \donttest{
with_fanc(fafbseg::flywire_islatest('648518346498254576'))
#> [1] FALSE
# }
if (FALSE) { # \dontrun{
with_fanc(fafbseg::flywire_latestid('648518346498254576'))
with_fanc(fafbseg::flywire_latestid('648518346494405175'))
} # }
if (FALSE) { # \dontrun{
# supervoxel id to root id
with_banc(fafbseg::flywire_rootid('76071705504180616'))
# is this id up to date?
with_banc(fafbseg::flywire_islatest('720575941472355131'))
# find up to date root id
with_banc(fafbseg::flywire_latestid('720575941472355131'))
} # }