navis.interfaces.neuromorpho.get_neuron¶
- navis.interfaces.neuromorpho.get_neuron(x, parallel=True, max_threads=4, **kwargs)[source]¶
Fetch neuron by ID or by name.
- Parameters:
x (int | str | dict | pandas.DataFrame) – Integer is intepreted as ID, string as neuron name. Dictionary and DataFrame must contain ‘archive’ (e.g. “Wearne_Hof”) and ‘neuron_name’ (e.g. “cnic_001”).
parallel (bool) – If True, will use threads to fetch data.
max_threads (int) – Max number of parallel threads to use.
**kwargs – Keyword arguments passed on to
navis.read_swc()
.
- Return type:
Examples
>>> import navis.interfaces.neuromorpho as nm >>> # Get a neuron by its ID >>> n = nm.get_neuron(1) >>> n type TreeNeuron name SWC n_nodes 1274 n_connectors 0 n_branches 46 n_leafs 54 cable_length 4792.21 soma None