pymaid.find_nodes

pymaid.find_nodes(tags=None, node_ids=None, skeleton_ids=None, remote_instance=None)[source]

Get nodes by tag (label), ID or associated skeleton.

Search intersected (logical AND) across parameters but additive (logical OR) within each parameter (see examples).

Parameters
  • tags (str | list of str) – Use to restrict to nodes with given tags.

  • node_ids (int | list of int) – Use to restrict to nodes with given IDs.

  • skeleton_ids (str | int | CatmaidNeuron/List, optional) –

    Use to restrict to a set of neurons. Can be:

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

    2. neuron name(s) (str)

    3. annotation(s): e.g. ‘annotation:PN right’

    4. CatmaidNeuron or CatmaidNeuronList object

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

Returns

DataFrame in which each row represents a node:

  skeleton_id  node_id  parent_id   x  y  z  confidence ...
0
1
2
...
  radius  edition_time  creator_id
0
1
2

Return type

pandas.DataFrame

See also

pymaid.get_connectors()

Function to get connectors by neurons and/or by tags.

Examples

Get all nodes with a given tag

>>> tagged = pymaid.find_nodes(tags='SCHLEGEL_LH')

Get all nodes of a set of neurons with either of two tags

>>> tagged = pymaid.find_nodes(tags=['SCHLEGEL_LH', 'SCHLEGEL_AL'],
                                     skeleton_ids='annotation:glomerulus DA1')