Here we load a neuron and obtain some information from it:
>>> import neurom as nm
>>> nrn = nm.load_neuron('some/data/path/morph_file.swc')
>>> ap_seg_len = nm.get('segment_lengths', nrn, neurite_type=nm.APICAL_DENDRITE)
>>> ax_sec_len = nm.get('section_lengths', nrn, neurite_type=nm.AXON)
Here we visualize a neuronal morphology:
>>> # Initialize nrn as above
>>> from neurom import viewer
>>> fig, ax = viewer.draw(nrn)
>>> fig.show()
>>> fig, ax = viewer.draw(nrn, mode='3d') # valid modes '2d', '3d', 'dendrogram'
>>> fig.show()
These basic examples illustrate the type of morphometrics that can be easily obtained directly from the neurom
module, without the need for any other neurom
sub-modules or tools.
The idea here is to pre-package the most common analyses so that users can obtain the morphometrics with a very minimal knowledge of python
and neurom
.
../../examples/get_features.py
These slightly more complex examples illustrate what can be done with the neurom
module's various generic iterators and simple morphometric functions.
The idea here is that there is a great deal of flexibility to build new analyses based on some limited number of orthogonal iterator and morphometric components that can be combined in many ways. Users with some knowledge of python
and neurom
can easily implement code to obtain new morphometrics.
All of the examples in the previous sections can be implemented in a similar way to those presented here.
../../examples/neuron_iteration_analysis.py