View source: R/catmaid_skeleton.R
catmaid_get_connector_table | R Documentation |
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, ... )
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 |
raw |
Whether to return completely unprocessed data (when |
... |
Additional arguments passed to the |
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
Other connectors:
catmaid_adjacency_matrix()
,
catmaid_get_connectors_between()
,
catmaid_get_connectors()
,
catmaid_query_connected()
,
connectors()
## Not run: # 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) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.