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)
#> 425790257 478613576 480590566 513323340 573695941 698194389
#> 1796817841 2 5 6 1 7 5
#> 1827516355 2 3 4 5 9 3
#> 818983130 5 1 2 5 10 3
#> 1797505019 2 1 4 3 7 4
#> 1796818119 7 5 1 7 5 2
#> 759810119 947453617 1610530558 1639886198 1640922516 1640922754
#> 1796817841 4 1 1 5 1 2
#> 1827516355 2 3 2 2 6 1
#> 818983130 1 1 5 5 1 1
#> 1797505019 2 3 3 2 1 1
#> 1796818119 5 4 4 4 5 6
#> 1667251683 1669017843 1669358817 1669699714 1669946117 1670386270
#> 1796817841 2 1 3 4 4 2
#> 1827516355 2 1 7 1 5 7
#> 818983130 4 3 1 4 5 7
#> 1797505019 6 2 6 4 1 7
#> 1796818119 6 3 3 1 1 8
#> 1670390647 1670627928 1671620613 1700393451 1701675592 1702107389
#> 1796817841 7 3 13 2 5 3
#> 1827516355 3 2 18 6 6 2
#> 818983130 3 8 11 6 3 2
#> 1797505019 3 5 8 6 5 1
#> 1796818119 14 8 22 17 8 4
#> 1702306037 1702802179 1732792926 1733491818 1733833296 1762354941
#> 1796817841 7 3 3 3 3 4
#> 1827516355 11 10 3 3 2 5
#> 818983130 8 6 2 4 5 1
#> 1797505019 8 4 9 3 8 1
#> 1796818119 11 16 2 3 10 3
#> 1762359683 1795799176 1796809680 1796813992 1796818061 1796818191
#> 1796817841 2 10 10 3 1 6
#> 1827516355 2 7 6 4 7 6
#> 818983130 2 1 16 2 2 6
#> 1797505019 2 2 4 4 4 6
#> 1796818119 2 5 11 17 10 7
#> 1796822470 1825789179 1826445251 1826929327 1828194121 1828198909
#> 1796817841 4 13 2 2 1 2
#> 1827516355 5 17 3 7 1 2
#> 818983130 3 24 5 3 5 1
#> 1797505019 3 6 2 6 2 1
#> 1796818119 4 25 3 5 7 3
#> 1828530446 1858171556 1858887650 1858892359 1859220826 1859224739
#> 1796817841 1 3 1 5 9 6
#> 1827516355 3 6 10 5 2 8
#> 818983130 2 4 3 7 4 2
#> 1797505019 9 5 9 7 2 3
#> 1796818119 3 14 9 10 6 10
#> 1859224808 1859229253 1859565686 1889931525 1920258429 5812994702
#> 1796817841 5 4 7 7 3 6
#> 1827516355 3 1 3 4 4 2
#> 818983130 3 1 6 10 1 1
#> 1797505019 3 1 1 1 1 7
#> 1796818119 5 2 6 8 5 4
#> 5813032595 5813039491 5813040847 5813054622 5813054726 5813054773
#> 1796817841 2 1 2 1 5 5
#> 1827516355 2 1 7 3 13 5
#> 818983130 3 1 3 1 4 2
#> 1797505019 1 3 1 2 3 1
#> 1796818119 5 3 10 2 8 7
#> 5813054777 5813069085 5813078440 5813130064 5901198995 5901202409
#> 1796817841 1 1 3 1 5 3
#> 1827516355 1 3 4 1 6 11
#> 818983130 1 1 1 2 12 28
#> 1797505019 3 2 3 1 5 11
#> 1796818119 3 1 5 3 4 28
# }
inputs <- neuprint_simple_connectivity(5901222731, prepost='PRE')
head(inputs)
#> input name type 5901222731_weight
#> 1 5901218894 LN(AVM02)_R olfactory LN 34
#> 2 5901208281 <NA> <NA> 1
#> 3 5901204007 <NA> <NA> 4
#> 4 5901206553 LN(AL) olfactory LN 2
#> 5 5813132949 LN(AVM02)_R olfactory LN 11
#> 6 5901194556 mPNX(AVM06)_R olfactory multi lvPN mALT 5
# top inputs
head(sort(table(inputs$type), decreasing = TRUE))
#>
#> olfactory LN ORN olfactory multi vPN mlALT
#> 96 19 9
#> olfactory multi lPN mALT olfactory multi lvPN mALT AVL07k_pct
#> 8 7 5
outputs <- neuprint_simple_connectivity(5901222731, prepost='POST')
head(outputs)
#> name output type 5901222731_weight
#> 1 <NA> 1164373123 <NA> 1
#> 2 <NA> 1164373194 <NA> 1
#> 3 <NA> 1226785176 <NA> 1
#> 4 <NA> 1226115112 <NA> 1
#> 5 <NA> 1225421107 <NA> 1
#> 6 <NA> 1037177820 <NA> 1