neurom.check.structural_checks¶
Module with consistency/validity checks for raw data blocks.
Functions
Check that all points with neurite type have a finite radius. |
|
Check that IDs are increasing. |
|
Check that IDs are increasing and consecutive. |
|
Checks if the TYPE column of raw data block has an element of type soma. |
|
Check if any neurites can be reconstructed from data block. |
|
Check if a data block has a valid soma. |
|
Check that data forms a single tree. |
|
Build neurite trees from a raw data wrapper. |
|
Make a soma object from a set of points. |
|
Check that all points have existing parents. |
Classes
Column labels for internal data representation. |
|
Class representing a check result. |
|
Point types. |
Exceptions
Exception for soma construction errors. |
-
class
neurom.check.structural_checks.
COLS
[source]¶ Bases:
object
Column labels for internal data representation.
-
class
neurom.check.structural_checks.
CheckResult
(status, info=None, title=None)[source]¶ Bases:
object
Class representing a check result.
-
class
neurom.check.structural_checks.
POINT_TYPE
[source]¶ Bases:
object
Point types.
These follow SWC specification.
-
exception
neurom.check.structural_checks.
SomaError
[source]¶ Bases:
neurom.exceptions.NeuroMError
Exception for soma construction errors.
-
neurom.check.structural_checks.
has_all_finite_radius_neurites
(data_wrapper, threshold=0.0)[source]¶ Check that all points with neurite type have a finite radius.
- Returns
CheckResult with result and list of IDs of neurite points with zero radius
-
neurom.check.structural_checks.
has_increasing_ids
(data_wrapper)[source]¶ Check that IDs are increasing.
- Returns
CheckResult with result and list of IDs that are inconsistent with their predecessor
-
neurom.check.structural_checks.
has_sequential_ids
(data_wrapper)[source]¶ Check that IDs are increasing and consecutive.
returns tuple (bool, list of IDs that are not consecutive with their predecessor)
-
neurom.check.structural_checks.
has_soma_points
(data_wrapper)[source]¶ Checks if the TYPE column of raw data block has an element of type soma.
- Returns
CheckResult with result
-
neurom.check.structural_checks.
has_valid_neurites
(data_wrapper)[source]¶ Check if any neurites can be reconstructed from data block.
- Returns
CheckResult with result
-
neurom.check.structural_checks.
has_valid_soma
(data_wrapper)[source]¶ Check if a data block has a valid soma.
- Returns
CheckResult with result
-
neurom.check.structural_checks.
is_single_tree
(data_wrapper)[source]¶ Check that data forms a single tree.
Only the first point has ID of -1.
- Returns
CheckResult with result and list of IDs
Note
This assumes no_missing_parents passed.
-
neurom.check.structural_checks.
make_neurites
(rdw)[source]¶ Build neurite trees from a raw data wrapper.
-
neurom.check.structural_checks.
make_soma
(points, soma_check=None, soma_class='contour')[source]¶ Make a soma object from a set of points.
Infers the soma type (SomaSinglePoint, SomaSimpleContour) from the points and the ‘soma_class’
- Parameters
points – collection of points forming a soma.
soma_check – optional validation function applied to points. Should
a SomaError if points not valid. (raise) –
soma_class (str) – one of ‘contour’ or ‘cylinder’ to specify the type
- Raises
SomaError if no soma points found, points incompatible with soma, or –
if soma_check(points) fails. –