pymaid.get_connectors¶
- pymaid.get_connectors(x, relation_type=None, tags=None, remote_instance=None)[source]¶
Retrieve connectors based on a set of filters.
- Parameters
x –
Neurons for which to retrieve connectors. Can be either:
list of skeleton ID(s) (int or str)
list of neuron name(s) (str, exact match)
an annotation: e.g. ‘annotation:PN right’
CatmaidNeuron or CatmaidNeuronList object
None
if you want all fetch connectors that match other criteria
relation_type ('presynaptic_to' | 'postsynaptic_to' | 'gapjunction_with' | 'abutting' | 'attached_to', optional) – If provided, will filter for these connection types.
tags (str | list of str, optional) – If provided, will filter connectors for tag(s).
remote_instance (CatmaidInstance, optional) – If not passed directly, will try using global.
- Returns
DataFrame in which each row represents a connector:
connector_id x y z confidence creator ... 0 1 ... editor creation_time edition_time 0 1 ...
- Return type
pandas.DataFrame
Examples
Get all connectors for a single neuron:
>>> cn = pymaid.get_connectors(16)
Get every connector with a given tag:
>>> tagged_cn = pymaid.get_connectors(None, tags='FML_sample')
Get all tagged connectors for a set of neurons:
>>> tagged_cn2 = pymaid.get_connectors('annotation:glomerulus DA1', tags='FML_sample')
See also
get_connector_details()
If you need details about the connectivity of a connector
get_connectors_between()
If you need to find the connectors between sets of neurons.
get_connector_links()
If you ned details about links for each connector.
pymaid.find_nodes()
Function to get nodes by tags, IDs or skeleton.