diff --git a/NAMESPACE b/NAMESPACE index 0ae74e9..cf3554e 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -40,6 +40,7 @@ export(banc_cellid_from_segid) export(banc_change_log) export(banc_decapitate) export(banc_front_view) +export(banc_ggneuron) export(banc_ids) export(banc_islatest) export(banc_latestid) diff --git a/R/l2.R b/R/l2.R index 2c8c60f..c095ac9 100644 --- a/R/l2.R +++ b/R/l2.R @@ -199,6 +199,9 @@ add_field_seq <- function (x, entries, field = "id", ...) { nl } +add_field <- function (x, entry, field = "bodyid", ...) + UseMethod("add_field") + add_field.neuron <- function (x, entry, field = "id", ...) { x[[field]] = entry x @@ -209,5 +212,3 @@ add_field.neuronlist <- function (x, entry, field = "id", ...) { ...) } -add_field <- function (x, entry, field = "bodyid", ...) - UseMethod("add_field") diff --git a/man/banc_cave_query.Rd b/man/banc_cave_query.Rd index c5dab8f..bed2d32 100644 --- a/man/banc_cave_query.Rd +++ b/man/banc_cave_query.Rd @@ -10,7 +10,11 @@ banc_cave_query(table, live = TRUE, ...) \item{table}{The name of the table (or view, see views section) to query} \item{live}{Whether to use live query mode, which updates any root ids to -their current value.} +their current value (or to another \code{timestamp} when provided). Values +of \code{TRUE} or \code{1} select CAVE's \emph{Live} mode, while \code{2} +selects \code{Live live} mode which gives access even to annotations that +are not part of a materialisation version. See section \bold{Live and Live +Live queries} for details.} \item{...}{Additional arguments passed to \code{\link{flywire_cave_query}} \code{\link[fafbseg]{flywire_cave_query}}} diff --git a/man/banc_ggneuron.Rd b/man/banc_ggneuron.Rd new file mode 100644 index 0000000..8c61d98 --- /dev/null +++ b/man/banc_ggneuron.Rd @@ -0,0 +1,49 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ggplot2.R +\name{banc_ggneuron} +\alias{banc_ggneuron} +\title{Plot a neuron in the BANC connectomic dataset using ggplot2} +\usage{ +banc_ggneuron( + x, + volume = NULL, + info = NULL, + view = c("main", "side", "front", "vnc", "vnc_side", "brain_side"), + cols1 = c("turquoise", "navy"), + cols2 = c("grey75", "grey50"), + alpha = 0.5, + title.col = "darkgrey", + ... +) +} +\arguments{ +\item{x}{A 'neuron', 'neuronlist', 'mesh3d', or 'hxsurf' object to be visualized.} + +\item{volume}{A brain/neuropil volume to be plotted in grey, for context. +Defaults to NULL, no volume plotted.} + +\item{info}{Optional. A string to be used as the plot title.} + +\item{view}{A character string specifying the view orientation. +Options are "main", "side", "front", "vnc", "vnc_side", "brain_side".} + +\item{cols1}{A vector of two colors for the lowest Z values. Default is c("turquoise", "navy").} + +\item{cols2}{A vector of two colors for the highest Z values. Default is c("grey75", "grey50").} + +\item{alpha}{Transparency of the neuron visualization. Default is 0.5.} + +\item{title.col}{Color of the plot title. Default is "darkgrey".} + +\item{...}{Additional arguments passed to geom_neuron().} +} +\value{ +A ggplot object representing the visualized neuron. +} +\description{ +This function visualizes a neuron or neuron-related object from the BANC connectomic dataset using ggplot2. +} +\details{ +This function is a wrapper around the ggneuron function, specifically tailored for the BANC dataset. +It applies a rotation matrix based on the specified view and uses predefined color schemes. +} diff --git a/man/banc_reroot.Rd b/man/banc_reroot.Rd index 7edd4be..b099253 100644 --- a/man/banc_reroot.Rd +++ b/man/banc_reroot.Rd @@ -40,7 +40,7 @@ location. \examples{ \dontrun{ x <- banc_read_l2skel(..., simplify = FALSE) -roots <- roots() +roots <- bancr:::banc_roots() re-rooted_neuron <- banc_reroot(x, roots = roots) } }