pymaid.transfer_neuron

pymaid.transfer_neuron(x, source_instance, target_instance, move_tags=False, move_annotations=False, move_connectors=False, force_id=False, no_prompt=False)[source]

Copy neuron(s) from one CatmaidInstance to another.

Note that skeleton, node and connector IDs will change (see server response for old->new mapping). Also: node confidences are currently not transferred.

Parameters:
  • x (Skeleton ID(s)) – Neuron(s) to move from source_instance to target_instance.

  • source_instance (CatmaidInstance) – Instance that the neuron(s) currently live in.

  • target_instance (CatmaidInstance) – Instance to copy the neuron(s) to.

  • move_tags (bool, optional) – If True, will upload node tags from x.tags.

  • move_annotations (bool, optional) – If True will upload annotations from x.annotations.

  • move_connectors (bool, optional) – If True will upload connectors from x.connectors.

  • force_id (bool, optional) – If True and neuron/skeleton IDs already exist in target instance, they will be replaced. Use this with extrem caution as this will destroy the existing skeleton!

  • no_prompt (bool, optional) – If True, will not prompt before transferring neurons!

Returns:

Server response with new skeleton/node IDs:

{
 'neuron_id': new neuron ID,
 'skeleton_id': new skeleton ID,
 'node_id_map': {'old_node_id': new_node_id, ...},
 'annotations': if import_annotations=True,
 'tags': if tags=True
}

Return type:

dict