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       size npre
#> 294792184 294792184        M_vPNml53_R M_vPNml53       Traced  424947333   92
#> 329566174 329566174 OA-VPM3(NO2/NO3)_R   OA-VPM3       Traced 6917059458 8632
#> 420274150 420274150           SLP236_R    SLP236       Traced 1406561606  918
#> 424379864 424379864           SLP234_R    SLP234       Traced 1339319152 1066
#> 480927537 480927537        M_vPNml70_R M_vPNml70       Traced  244229430   83
#> 481268653 481268653        M_vPNml89_R M_vPNml89       Traced  266715893  146
#>           npost notes AL(R).pre AL(R).post AL(R).upstream AL(R).downstream
#> 294792184   348  <NA>         1        162            162                3
#> 329566174 10075  <NA>         7          2              2               18
#> 420274150   847  <NA>         0          1              1                0
#> 424379864   811  <NA>         0          7              7                0
#> 480927537   279  <NA>         0        122            122                0
#> 481268653    58  <NA>         0         28             28                0
#>           LH(R).pre LH(R).post LH(R).upstream LH(R).downstream
#> 294792184        20         29             29              166
#> 329566174       236        159            159             1066
#> 420274150        75         96             96              601
#> 424379864         7          0              0               62
#> 480927537        68        138            138              576
#> 481268653       135         26             26             1498
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 1010248735   1014700   0   10      0       3
#> 2 1006105083   5363494   4    6      4       6
#> 3 1006446342   1031843   3    5      3       5
#> 4 1007865728   1801114   0   10      0      10
#> 5 1008145243   1123011   2    4      2       4
#> 6 1009919653 783883666 589  788      6       2
# }