Get the neurons that are shared synaptic partners for a set of given bodyids, either upstream or downstream.

neuprint_common_connectivity(
bodyids,
statuses = NULL,
prepost = c("PRE", "POST"),
all_segments = FALSE,
dataset = NULL,
conn = NULL,
...
)

## Arguments

bodyids

the cypher by which to make your search

statuses

if not NULL, only bodies with the given status are considered. Statuses include: Unimportant,0.5assign,Leaves,Prelim Roughly Traced, Anchor, Orphan.

prepost

whether to look for partners presynaptic or postsynaptic to the given bodyids. So when prepost="PRE" you will return inputs (upstream partners) of your starting neurons.

all_segments

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

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.

...

methods passed to neuprint_login

## Value

a n x m matrix where n correspond to the neurons that all connect to m bodyids

neuprint_simple_connectivity, neuprint_get_adjacency_matrix

## Examples

# \donttest{
da2s=neuprint_search('.*DA2.*')
da2conn = neuprint_common_connectivity(da2s\$bodyid[1:2], prepost='PRE')
plot(t(da2conn))