neuprint_get_synapses: Get the locations of pre- and post synapses associated with a...

View source: R/synapses.R

neuprint_get_synapsesR Documentation

Get the locations of pre- and post synapses associated with a body.

Description

Get the xyz locations, IDs and confidences of pre- and post synapses associated with a body. The connector_id for each synapse is for the 'presynaptic' object. Separate IDs exist for the postsynapses in neuPrint, and these are not fetched b this function. This is similar to the logic use in rcatmaid.

Usage

neuprint_get_synapses(
  bodyids,
  roi = NULL,
  remove.autapses = TRUE,
  chunk = TRUE,
  progress = NULL,
  dataset = NULL,
  conn = NULL,
  ...
)

Arguments

bodyids

the body IDs for neurons/segments (bodies) you wish to query. This can be in any form understood by neuprint_ids.

roi

a ROI (i.e. neuropil volume) you want to query. Use neuprint_ROIs to see what is available. Defaults to 'all', which will return synapses in all ROIs.

remove.autapses

Whether to remove autaptic connections (default TRUE) from the results. It appears that there is a relatively high number of false positive autapses.

chunk

A logical specifying whether to split the query into multiple chunks or an integer specifying the size of those chunks (which defaults to 20 when chunk=TRUE).

progress

if TRUE, a progress bar will be shown. This may slow the data fetching process for smaller queries (<100 body ids). The default of progress=NULL will only show a progress bar if the query will be split into multiple chunks based on the chunk argument.

dataset

optional, a dataset you want to query. If NULL, the default specified by your R environ file 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 data frame, where each row is a connection between one query bodyid and a single partner neuron. The prepost column should be interpreted as follows:

  • prepost=0 a downstream or output partner, postsynaptic to the query neuron

  • prepost=1 an upstream or input partner, presynaptic to the query neuron

Each connection is associated with a synapse that has its own unique connector_id, XYZ coordinates and a confidence in its existence.

See Also

neuprint_fetch_custom, neuprint_simple_connectivity, neuprint_common_connectivity

Examples


syns=neuprint_get_synapses(c(818983130, 1796818119))
head(syns)


natverse/neuprintr documentation built on Sept. 15, 2023, 6:59 a.m.