Skip to content

Commit

Permalink
Updated readme to give cloud-volume error fix
Browse files Browse the repository at this point in the history
* Solution to update cloud-volume: fafbseg::simple_python('none', pkgs='cloud-volume~=8.32.1')
  • Loading branch information
alexanderbates committed Jul 12, 2024
1 parent b61ad43 commit 7946ea3
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 17 deletions.
10 changes: 5 additions & 5 deletions R/cave-tables.R
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -118,27 +118,27 @@ 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
#' @export
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
Expand Down
7 changes: 3 additions & 4 deletions R/cave.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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())
}

16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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")
```

Expand All @@ -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.
Expand All @@ -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
Expand All @@ -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
Expand Down
5 changes: 1 addition & 4 deletions man/banc_cave_query.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7946ea3

Please sign in to comment.