Fetch the synapses associated with a bodyid and assign them to the nearest point in the skeleton. For this to work, the skeletons must be in the same brainspace as the synaptic data being pulled from neuprint. I.e. do not transform them to another brainspace, until after this step.

For some datasets, somata positions have been mapped to pixels within a soma volume in the image data. If your bodyids contain such an annotated pixel, you can retrieve its position.

neuprint_assign_connectors(x, bodyids = NULL, dataset = NULL, conn = NULL, ...)

neuprint_locate_soma(
  bodyids,
  dataset = NULL,
  all_segments = TRUE,
  conn = NULL,
  ...
)

Arguments

x

either an object of class neuron, or neuronlist

bodyids

the body IDs for neurons/segments (bodies) you wish to query. This can be in any form understood by neuprint_ids.

dataset

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

conn

optional, a neuprintr connection object, which also specifies the neuPrint server. If NULL, the defaults set in your .Rprofile or .Renviron are used. See neuprint_login for details.

...

methods passed to neuprint_login

all_segments

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

Value

a neuron/neuronlist object as dictated used by the nat and rcatmaid packages a data frame of X,Y,Z coordinates, a row for each bodyid supplied

Examples

# \donttest{
neuprint_locate_soma("5813115796")
#>       bodyid    X     Y     Z
#> 1 5813115796 4345 27108 13968
# }