pymaid.delete_neuron(x, no_prompt=False, remote_instance=None)[source]

Completely delete neurons.


Use this with EXTREME caution as this is irreversible! Your only chance to recover accidentally deleted neurons is asking a server admin for help.


Deletes a neuron if (and only if!) two conditions are met:

  1. You own all nodes of the skeleton making up the neuron in question.

  2. The neuron is not annotated by other users.

  • x

    Neurons to delete. 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

  • no_prompt (bool, optional) – By default, you will be prompted to confirm before deleting the neuron(s). Set this to True to skip that step.

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

Return type

server response