Find bodies that input/output within certain ROIs (i.e. they must have synapses in these areas)

neuprint_find_neurons(
  input_ROIs,
  output_ROIs = NULL,
  dataset = NULL,
  conn = NULL,
  all_segments = FALSE,
  ...
)

neuprint_bodies_in_ROI(
  roi,
  dataset = NULL,
  all_segments = FALSE,
  conn = NULL,
  ...
)

Arguments

input_ROIs

a vector of input ROIs. Use neuprint_ROIs to see what is available.

output_ROIs

a vector of input ROIs. Use neuprint_ROIs to see what is available.

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.

all_segments

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

...

methods passed to neuprint_login

roi

a single ROI. Use neuprint_ROIs to see what is available.

Value

a n x n matrix, where the rows are input neurons and the columns are their targets

Examples

# \donttest{
# Find some neurons with inputs in the Antennal Lobe (AL) and
# outputs in the LH
pncands=neuprint_find_neurons(input_ROIs = "AL(R)", output_ROIs = "LH(R)")
head(pncands)
#>              bodyid            bodyname                  bodytype neuronStatus
#> 294792184 294792184      mlPN2(AVM04)_R olfactory multi vPN mlALT       Traced
#> 329566174 329566174  OA-VPM3(NO2/NO3)_R                   OA-VPM3       Traced
#> 420274150 420274150 AVM03m_pct(AVM03)_R                AVM03m_pct       Traced
#> 424379864 424379864 AVM03e_pct(AVM03)_R                AVM03e_pct       Traced
#> 480927537 480927537      mlPN2(AVM04)_R olfactory multi vPN mlALT       Traced
#> 481268653 481268653  mlPN2_VM2(AVM04)_R olfactory multi vPN mlALT       Traced
#>                 size npre npost notes AL(R).pre AL(R).post LH(R).pre LH(R).post
#> 294792184  420662445   93   344  <NA>         1        162        20         25
#> 329566174 6840451191 8568  9998  <NA>         7          2       235        160
#> 420274150 1402341169  912   841  <NA>         0          1        72         96
#> 424379864 1338354844 1066   809  <NA>         0          7         7          0
#> 480927537  239954420   82   273  <NA>         0        122        67        132
#> 481268653  265085609  146    58  <NA>         0         28       135         26
plot(`LH(R).pre`~`AL(R).post`, data=pncands)

# }
# \donttest{
lhr=neuprint_bodies_in_ROI('LH(R)')
head(lhr)
#>      bodyid     voxels  pre post roipre roipost
#> 1 480940072  436591770  158  294      3       5
#> 2 759810119 4479200695 3631 6384    869    1125
#> 3 792692885 1939906668 1911 2469    180     161
#> 4 850233586  229634038   84  107      0       1
#> 5 359279388  372877967  143  270      4     106
#> 6 296120593 1194301818  621 1043     11     618
# }