R/connectivity.R
neuprint_simple_connectivity.Rd
Get all of the neurons in the database that connect to the query neurons, either upstream or downstream of them
neuprint_simple_connectivity(
bodyids,
prepost = c("PRE", "POST"),
dataset = NULL,
conn = NULL,
...
)
the cypher by which to make your search
whether to look for partners presynaptic to postsynaptic to the given bodyids
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.
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
a n x m matrix where n correspond to the neurons that connect to m bodyids
# \donttest{
da2s=neuprint_search(".*DA2.*")
neuprint_common_connectivity(da2s$bodyid)
#>
#> 1796817841
#> 1796818119
#> 1797505019
#> 1827516355
#> 818983130
#> 1669017843
#> 1669699714
#> 1669946117
#> 1670382036
#> 1670386270
#> 1670390647
#> 1669358817
#> 1671659809
#> 1702107389
#> 1702802179
#> 1701675592
#> 1701757711
#> 1700393451
#> 1732792926
#> 1732797061
#> 1733491818
#> 1733833296
#> 1796809680
#> 1796813992
#> 1796818061
#> 1796818191
#> 1796822470
#> 1826929327
#> 1858887650
#> 1858892359
#> 1859220826
#> 1859224592
#> 1859224739
#> 1859565686
#> 1889931525
#> 5901198995
#> 5901201379
#> 5901202409
#> 5813040847
#> 5812994702
# }
inputs <- neuprint_simple_connectivity(5901222731, prepost='PRE')
head(inputs)
#> input name type 5901222731_weight
#> 1 5901218894 lLN2F_a(Full)_R lLN2F_a 34
#> 2 7112626217 <NA> <NA> 1
#> 3 5901208281 <NA> <NA> 1
#> 4 5901204007 LN_L <NA> 4
#> 5 5901206553 il3LN6_L il3LN6 2
#> 6 5901194556 M_lvPNm37_R M_lvPNm37 5
# top inputs
head(sort(table(inputs$type), decreasing = TRUE))
#>
#> HRN_VP4 ORN_VL2p HRN_VP1d lLN1_b lLN2T_a v2LN40
#> 16 15 10 8 8 7
outputs <- neuprint_simple_connectivity(5901222731, prepost='POST')
head(outputs)
#> name output type 5901222731_weight
#> 1 <NA> 1161645231 <NA> 1
#> 2 <NA> 1161645010 <NA> 2
#> 3 <NA> 2134083409 <NA> 1
#> 4 <NA> 2134083422 <NA> 1
#> 5 <NA> 2134083429 <NA> 1
#> 6 <NA> 1161645180 <NA> 1