Return connector table for a given neuron

catmaid_get_connector_table(skids, direction = c("both", "incoming",
  "outgoing"), partner.skids = TRUE, get_partner_names = FALSE,
  get_partner_nodes = FALSE, pid = 1, conn = NULL, raw = FALSE,
  ...)

Arguments

skids

Numeric skeleton ids

direction

whether to find incoming or outgoing connections

partner.skids

Whether to include information about the skid of each partner neuron (NB there may be multiple partners per connector)

get_partner_names, get_partner_nodes

Whether to fetch the names and/or number of nodes for the partner neurons.

pid

Project id (default 1)

conn

A catmaid_connection objection returned by catmaid_login. If NULL (the default) a new connection object will be generated using the values of the catmaid.* package options as described in the help for catmaid_login.

raw

Whether to return completely unprocessed data (when TRUE) or to convert the nodes and connectors lists into processed data.frames (when FALSE, the default)

...

Additional arguments passed to the catmaid_fetch function

Value

As of CATMAID v2016.10.18 this returns a data.frame with columns

  • skid

  • connector_id

  • x

  • y

  • z

  • confidence

  • user_id

  • treenode_id (NB this is always the treenode id of the query skeleton whether or not incoming or outgoing connections are requested)

  • last_modified

  • partner_skid

Prior to this it returned a data.frame with columns

  • connector_id

  • partner_skid

  • x

  • y

  • z

  • s

  • confidence

  • tags

  • nodes_in_partner

  • username

  • treenode_id

  • last_modified

See also

Examples

if (FALSE) { # fetch connector table for neuron 10418394 ct=catmaid_get_connector_table(10418394) # compare number of incoming and outgoing synapses table(ct$direction) ## Look at synapse location in 3d # plot the neuron skeleton in grey for context library(nat) nopen3d() plot3d(read.neurons.catmaid(10418394), col='grey') # note use of nat::xyzmatrix to get xyz positions from the ct data.frame # colour synapses by direction points3d(xyzmatrix(ct), col=as.integer(ct$direction)) ## plot connected neurons in context of brain nopen3d() # fetch and plot brain model models=catmaid_fetch("1/stack/5/models") vs=matrix(as.numeric(models$cns$vertices), ncol=3, byrow = TRUE) points3d(vs, col='grey', size=1.5) # fetch and plot neurons plot3d(read.neurons.catmaid(10418394), col='black', lwd=3) points3d(xyzmatrix(ct), col=as.integer(ct$direction)) partner_neuron_ids=unique(na.omit(as.integer(ct$partner_skid))) partner_neurons=read.neurons.catmaid(partner_neuron_ids, .progress='text', OmitFailures = TRUE) plot3d(partner_neurons) }