Get synapse IDs for a given connector ID, as well as their associated body IDs and their locations in 3D space.

neuprint_connectors(
  connector_ids,
  all_segments = TRUE,
  conn = NULL,
  dataset = NULL,
  ...
)

Arguments

connector_ids

a vector of IDs (pre- or postsynapse IDs) for a synaptic connection object.

all_segments

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

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.

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.

...

Additional arguments passed to neuprint_fetch_custom

Value

a data frame, where each entry gives the pre-post associations for a synapse. This includes which are the pre/post synaptic bodyids (neurons/fragments) and the location of these synapses in 3D space (likely raw voxel space).

Examples

# \donttest{
syns = neuprint_get_synapses(818983130) # note
# all given connectorIDs from this function are for presynapses
prepost.conn = neuprint_connectors(syns$connector_id, all_segments = TRUE)
head(prepost.conn) # All the synapses that connect to or from 818983130
#>   connectorId_post connectorId_pre bodyId_post bodyId_pre x_post y_post z_post
#> 1        134770239       134750463   818983130  975432645   6323  17828  14144
#> 2        134770240       134750463  1006820405  975432645   6300  17836  14145
#> 3        134750459       134750463   947453617  975432645   6335  17828  14130
#> 4        134750458       134750463  1881751117  975432645   6319  17829  14130
#> 5        133912545       133912547   818983130  974753221   5265  16547  13869
#> 6        133919081       133919083   696126258  974753207   5363  16481  13890
#>   confidence_post x_pre y_pre z_pre confidence_pre
#> 1       0.8521260  6326 17842 14138          0.953
#> 2       0.4669051  6326 17842 14138          0.953
#> 3       0.6970400  6326 17842 14138          0.953
#> 4       0.9932270  6326 17842 14138          0.953
#> 5       0.8970000  5267 16548 13857          0.785
#> 6       0.6449590  5358 16493 13900          0.964
# and their other connections to other bodies too
# }