diff --git a/R/cave-tables.R b/R/cave-tables.R index 08b7c8d..0e3d335 100644 --- a/R/cave-tables.R +++ b/R/cave-tables.R @@ -106,7 +106,7 @@ banc_nuclei <- function (rootids = NULL, #' @importFrom nat xyzmatrix2str banc_cell_info <- function(rootids = NULL, rawcoords = FALSE){ table <- "cell_info" - res <- get_cave_table_data(table) + res <- with_banc(get_cave_table_data(table)) if (isTRUE(rawcoords)) res else { @@ -118,7 +118,7 @@ banc_cell_info <- function(rootids = NULL, rawcoords = FALSE){ #' @rdname banc_cave_tables #' @export banc_cell_ids <- function(rootids = NULL){ - get_cave_table_data('cell_ids', rootids) + with_banc(get_cave_table_data('cell_ids', rootids)) } #' @rdname banc_cave_tables @@ -126,19 +126,19 @@ banc_cell_ids <- function(rootids = NULL){ banc_neck_connective_neurons <- function(rootids = NULL, table = c("neck_connective_y92500", "neck_connective_y121000")){ table <- match.arg(table) - get_cave_table_data(table, rootids) + with_banc(get_cave_table_data(table, rootids)) } #' @rdname banc_cave_tables #' @export banc_peripheral_nerves <- function(rootids = NULL){ - get_cave_table_data("peripheral_nerves", rootids) + with_banc(get_cave_table_data("peripheral_nerves", rootids)) } #' @rdname banc_cave_tables #' @export banc_backbone_proofread <- function(rootids = NULL){ - get_cave_table_data("backbone_proofread", rootids) + with_banc(get_cave_table_data("backbone_proofread", rootids)) } # hidden diff --git a/R/cave.R b/R/cave.R index a7f3562..f266a30 100644 --- a/R/cave.R +++ b/R/cave.R @@ -18,9 +18,8 @@ #' filter(tag2=='anterior-posterior projection pattern') %>% #' count(tag) #' } -banc_cave_query <- function(table, datastack_name = NULL, live=TRUE, ...) { - if(is.null(datastack_name)) datastack_name=banc_datastack_name() - fafbseg::flywire_cave_query(table = table, datastack_name = datastack_name, live=live, ...) +banc_cave_query <- function(table, live=TRUE, ...) { + with_banc(fafbseg::flywire_cave_query(table = table, live=live, ...)) } #' Low level access to banc's CAVE annotation infrastructure @@ -35,6 +34,6 @@ banc_cave_query <- function(table, datastack_name = NULL, live=TRUE, ...) { #' fcc$materialize$get_table_metadata(tables[1]) #' } banc_cave_client <- function() { - with_banc(flywire_cave_client()) + with_banc(fafbseg::flywire_cave_client()) } diff --git a/README.md b/README.md index b9a0c64..7d975a1 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ To check that everything is set up properly, try: # diagnose issues dr_banc() -# confirm functionality +# confirm functionality, should return FALSE banc_islatest("720575941562355975") ``` @@ -71,14 +71,21 @@ called using the `reticulate` package. You can install full set of recommended libraries including `fafbseg-py`: ``` -simple_python("full") +fafbseg::simple_python("full") ``` Note that this package is designed to play nicely with `fafbseg`, which has been used mainly for the *FAFB-FlyWire* project, but could be used to work with data from many neuroglancer/CAVE based projects. -Use `with_banc()` to wrap many additional fafbseg::flywire_* functions +If you get an error related to not finding cloud-volume or the +cloud-volume version, the solution may be to update cloud-volume, as so: + +```r +fafbseg::simple_python('none', pkgs='cloud-volume~=8.32.1') +``` + +Use `with_banc()` to wrap many additional `fafbseg::flywire_*` functions for use with the *BANC*. Alternatively `choose_banc()` to set all `flywire_*` functions from `fafbseg` to target the *BANC*. Not all functions will work. @@ -95,7 +102,7 @@ remotes::install_github('flyconnectome/bancr') If you need to update a specific Python library dependent, you can do: ```r -reticulate::py_install("fafbseg", upgrade = TRUE) +fafbseg::simple_python(pkgs='fafbseg') ``` Ascending Neuron Vignette @@ -107,6 +114,7 @@ First we need to load the package, and direct ourselves to the *BANC* data set. ```r library(bancr) +# choose_banc() ``` ### Identify the neurons we care about diff --git a/man/banc_cave_query.Rd b/man/banc_cave_query.Rd index 902a431..c5dab8f 100644 --- a/man/banc_cave_query.Rd +++ b/man/banc_cave_query.Rd @@ -4,14 +4,11 @@ \alias{banc_cave_query} \title{Query banc tables in the CAVE annotation system} \usage{ -banc_cave_query(table, datastack_name = NULL, live = TRUE, ...) +banc_cave_query(table, live = TRUE, ...) } \arguments{ \item{table}{The name of the table (or view, see views section) to query} -\item{datastack_name}{An optional CAVE \code{datastack_name}. If unset a -sensible default is chosen.} - \item{live}{Whether to use live query mode, which updates any root ids to their current value.}