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        133523450       133497213  1881751117  975432645   6319  17829  14130
#> 2        133590232       133497213   818983130  975432645   6323  17828  14144
#> 3        133523449       133497213   947453617  975432645   6335  17828  14130
#> 4        133638763       133497213  1006820405  975432645   6300  17836  14145
#> 5        132828921       132847104   818983130  974753221   5265  16547  13869
#> 6        132841806       132991410   818983130  974753207   5360  16498  13893
#>   confidence_post x_pre y_pre z_pre confidence_pre
#> 1       0.9932270  6326 17842 14138          0.953
#> 2       0.8521260  6326 17842 14138          0.953
#> 3       0.6970400  6326 17842 14138          0.953
#> 4       0.4669051  6326 17842 14138          0.953
#> 5       0.8970000  5267 16548 13857          0.785
#> 6       0.5626220  5358 16493 13900          0.964
# and their other connections to other bodies too
# }