neurom check: the morphology checker

The neurom check application performs checks on reconstructed morphologies from data contained in morphology files, and so may be used as a morphology validation of sorts.

An example usage

neurom check path/to/morph/file_or_dir --config path/to/config --output path/to/output/file

The tests are grouped in two categories:

  1. Structural tests. Dropped in v2 version.

  2. Neuron tests. These are applied to properties of reconstructed neurons and their constituent soma and neurites, and can be thought of as “quality” checks.

It is very likely that inability to build a soma typically results in an inability to build neurites. Failure to build a soma or neurites results in an early failure for a given morphology file.

The application may be invoked with a YAML configuration file specifying which checks to perform. The structure of the configuration file reflects the test categories mentioned above. Here is an example configuration:

        - has_basal_dendrite
        - has_axon
        - has_all_nonzero_segment_lengths
        - has_all_nonzero_section_lengths
        - has_all_nonzero_neurite_radii
        - has_nonzero_soma_radius

options :
    has_nonzero_soma_radius         : 0.0
    has_all_nonzero_neurite_radii   : 0.007
    has_all_nonzero_segment_lengths : 0.01
    has_all_nonzero_section_lengths : 0.01

As can be seen, the configuration file is split into two sections checks, and options. checks can only have neuron_checks sub-item that corresponds to a sub-module neuron_checks. Each of its sub-items corresponds to a function in that sub-module.

The application also produces a summary json file, which can be useful when processing more than one file:

    "files": {
        "test_data/swc/Neuron.swc": {
            "Has basal dendrite": true,
            "Has axon": true,
            "Has apical dendrite": true,
            "Has all nonzero segment lengths": true,
            "Has all nonzero section lengths": true,
            "Has all nonzero neurite radii": true,
            "Has nonzero soma radius": true,
            "ALL": true
    "STATUS": "PASS"

For more information on the application and available options, invoke it with the --help or -h option.

neurom check --help
neurom --help  # to see all logging options