morph_check: the morphology checkerΒΆ
The morph_check
application performs checks on reconstructed morphologies from
data contained in morphology files, and so may be used as a morphology validaiton
of sorts.
The tests are grouped in two categories:
- Structural tests. These apply to the structure of the data and are a good indicator as to whether a neuron object or any of its sub-components can actually be reconstructed. Failure in some of these may make further tests fail.
- 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 a failure in the structural tests will make the neuron tests fail. Furthermore, inability to build a soma typically results in an inability to build neurites. Failure to build a soma or neurites results in an early faulure 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:
checks:
structural_checks:
- is_single_tree
- has_soma_points
- has_valid_soma
- has_valid_neurites
neuron_checks:
- 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
.
Each of the checks
sub-items corresponds to a sub-module of neurom.check
, namely
structural_checks
and neuron_checks
. And each
of their sub-items corresponds to a function in that sub-module. This illustrates the possible
checks that may be applied by morph_check
.
The application also produces a summary json file, which can be useful when processing more than one file:
{
"files": {
"test_data/swc/Neuron.swc": {
"Is single tree": true,
"Has soma points": true,
"No missing parents": true,
"Has sequential ids": true,
"Has increasing ids": true,
"Has valid soma": true,
"Has valid neurites": true,
"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.
morph_check --help