pymaid.get_arbor

pymaid.get_arbor(x, node_flag=1, connector_flag=1, tag_flag=1, remote_instance=None)[source]

Retrieve skeleton data for a list of skeleton ids.

Similar to pymaid.get_neuron() but the connector data includes the whole chain:

node1 -> (link_confidence) -> connector -> (link_confidence) -> node2

This means that connectors can shop up multiple times (i.e. if they have multiple postsynaptic targets). Does include connector x, y, z coordinates!

Parameters:
  • x

    Neurons to retrieve. Can be either:

    1. list of skeleton ID(s) (int or str)

    2. list of neuron name(s) (str, exact match)

    3. an annotation: e.g. ‘annotation:PN right’

    4. CatmaidNeuron or CatmaidNeuronList object

  • connector_flag (0 | 1, optional) – Set if connector data should be retrieved.

  • tag_flag (0 | 1, optional) – Set if tags should be retrieved.

  • remote_instance (CatmaidInstance, optional) – If not passed directly, will try using global.

Returns:

DataFrame in which each row represents a neuron:

  neuron_name   skeleton_id   nodes      connectors   tags
0    str           str     DataFrame     DataFrame   dict
1
2

Return type:

pandas.DataFrame

Notes

  • nodes and connectors are pandas.DataFrames themselves

  • tags is a dict: {'tag': [node_id, node_id, ...]}

Dataframe (df) column titles should be self explanatory with these exception:

  • df['relation_1'] describes node1 to/from connector

  • df['relation_2'] describes node2 to/from connector

  • relation can be: 0 (presynaptic), 1 (postsynaptic), 2 (gap junction)