neuprint_read_neurons: Read bodies from the neuPrint server as skeletons

Description Usage Arguments Value See Also

View source: R/neurons.R

Description

Get nat::neuronlist objects or data frames in the format of SWC files, for neurons retrievable from a neuPrint server. Choose whether or not to heal the fetched skeletons, assign a soma (if tagged in neuprint) and assign synapses to approximate treenode positions, in the style of neuron objects used by the rcatmaid package

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
neuprint_read_neurons(bodyids, meta = TRUE, nat = TRUE,
  drvid = FALSE, flow.centrality = FALSE, split = c("postsynapses",
  "presynapses", "distance"), soma = TRUE, heal = TRUE,
  connectors = TRUE, all_segments = TRUE, dataset = NULL,
  resample = FALSE, conn = NULL, OmitFailures = TRUE, ...)

neuprint_read_neuron(bodyid, nat = TRUE, drvid = FALSE,
  flow.centrality = FALSE, split = c("postsynapses", "presynapses",
  "distance"), soma = TRUE, heal = TRUE, connectors = TRUE,
  dataset = NULL, all_segments = TRUE, resample = FALSE,
  conn = NULL, ...)

Arguments

bodyids

the body IDs for neurons/segments (bodies) you wish to query

meta

whether or not to fetch a meta data for the given bodyids, using neuprint_get_meta

nat

whether or not to read neurons are nat::neuronlist objects (TRUE) or get SWC data frame (FALSE)

drvid

whether or not to use drvid::read.neuron.dvid rather than a cypher post request to neuprint_fetch_custom, in order to read a neuron. This might be faster, and this might also enable access to skeletons on an underlying DVID database that have not yet been ported to neuprint.

flow.centrality

if TRUE, the neuron is split into primary neurite, axon and dendrite based on its flow centrality, as specified by Schneider-Mizell et al. (2016), using catnat::flow.centrality

split

the algorithm will assign two main neurite compartments, which as per SWC format will be indicates as either axon (Label =2) or dendrite (Label = 3) in the returned objects, at neuron$d$Label. This assignment can be based which compartment contains the most postsynapses ("postsynapses") or presynapses ("presynapses"), or the Euclidean distance of its first branch point from the primary branch point (i.e. the first branch point from the soma) ("distance").

soma

whether or not to fetch a possible soma location for the given bodyids, using neuprint_locate_soma

heal

whether or not to heal a fragmented skeleton using a minimum spanning tree, via heal_skeleton

connectors

whether or not to add synapse data to the retrieved skeletons in the format used by the rcatmaid package, for easy use with rcatmaid or catnat functions. This can be done for synapse-less skeletons using neuprint_assign_connectors

all_segments

if TRUE, all bodies are considered, if FALSE, only 'Neurons', i.e. bodies with a status roughly traced status.

dataset

optional, a dataset you want to query. If NULL, the default specified by your R environ file is used. See neuprint_login for details.

resample

if a number, the neuron is resampled using nat::resample, stepsize = resample. If 0 or FALSE (default), no resampling occurs.

conn

optional, a neuprintr connection object, which also specifies the neuPrint server see ?neuprint_login. If NULL, your defaults set in your R.profile or R.environ are used.

OmitFailures

Whether to omit neurons for which FUN gives an error. The default value (NA) will result in nlapply stopping with an error message the moment there is an error. For other values, see details.

...

methods passed to neuprint_login

bodyid

a single body ID for a neuron/segment (body) you wish to query

Value

a data frame in SWC format, or a neuron/neuronlist object as dictated used by the nat and rcatmaid packages

See Also

neuprint_fetch_custom, neuprint_get_synapses, neuprint_assign_connectors


alexanderbates/neuprintr documentation built on May 28, 2019, 6:11 p.m.