tasks.repair
¶
Repair tasks.
Module Contents¶
Classes¶
Collect annotated dataset to work with on this phase. |
|
Fix zero diameters. |
|
Unravel morphologies. |
|
Repair morphologies. |
|
Make collage plot of morphologies. |
|
Make a morpology release, with three possible folders: zero-diameter, unravel or repair. |
|
Plot the cut leaves on repaired cells. |
|
Smooth diameters. |
|
Plot smoothed diameters versus originals. |
|
Detect and plot errors in curated morphologies. |
Attributes¶
- tasks.repair.logger¶
- class tasks.repair.CollectAnnotated(*args, **kwargs)¶
Bases:
morphology_workflows.utils.StrIndexMixin
,data_validation_framework.task.ElementValidationTask
Collect annotated dataset to work with on this phase.
- class tasks.repair.FixZeroDiameters(*args, **kwargs)¶
Bases:
morphology_workflows.utils.StrIndexMixin
,SkippableMixin
(),data_validation_framework.task.ElementValidationTask
Fix zero diameters.
This task applies a fix on zero diameters on dendrites, by calling
neuror.zero_diameter_fixer.fix_zero_diameters()
.
- class tasks.repair.Unravel(*args, **kwargs)¶
Bases:
morphology_workflows.utils.StrIndexMixin
,SkippableMixin
(),data_validation_framework.task.ElementValidationTask
Unravel morphologies.
In-vitro morphologies produce recostruction with too much tortuosity, which is corrected for here, using
neuror.unravel.unravel()
. As this changes the location of the points, the cut leaves have to be updated, as well as the apical points, if any.
- class tasks.repair.RepairNeurites(*args, **kwargs)¶
Bases:
morphology_workflows.utils.StrIndexMixin
,SkippableMixin
(),data_validation_framework.task.ElementValidationTask
Repair morphologies.
Using the cut leaves, we recreate missing branches using
neuror.main.Repair
.Todo
Currently, axons are not repaired, as they need other axons.
Improve repair of dendrite by using all dendrites of same type.
- repair_params¶
Repair internal parameters (see details in https://neuror.readthedocs.io/en/stable/neuror.main.html#neuror.main.Repair)
- Type:
- class tasks.repair.MakeCollage(*args, **kwargs)¶
Bases:
morphology_workflows.utils.StrIndexMixin
,SkippableMixin
(),data_validation_framework.task.SetValidationTask
Make collage plot of morphologies.
- separation¶
- layer_thickness¶
- dpi¶
- n_morph_per_page¶
- class tasks.repair.MakeRelease(*args, **kwargs)¶
Bases:
morphology_workflows.utils.StrIndexMixin
,data_validation_framework.task.SetValidationTask
Make a morpology release, with three possible folders: zero-diameter, unravel or repair.
- repair_path¶
Path to repaired morphologies (not created if None)
- Type:
- Default value:
repaired_release
- duplicate_layers¶
Duplicate entries with mixed layer mtypes, i.e. L23_PC.
- Type:
- Default value:
True
- extensions = ['.asc', '.h5', '.swc']¶
- class tasks.repair.PlotRepair(*args, **kwargs)¶
Bases:
morphology_workflows.utils.StrIndexMixin
,SkippableMixin
(),data_validation_framework.task.ElementValidationTask
Plot the cut leaves on repaired cells.
- class tasks.repair.SmoothDiameters(*args, **kwargs)¶
Bases:
morphology_workflows.utils.StrIndexMixin
,SkippableMixin
(True
),data_validation_framework.task.SetValidationTask
Smooth diameters.
This tasks uses
diameter_synthesis.build_models.build()
to learn a diameter model from the actual diameters which is then used bydiameter_synthesis.build_diameters.build()
to diametrize the morphology.By default, this task is skipped.
- class tasks.repair.PlotSmoothDiameters(*args, **kwargs)¶
Bases:
morphology_workflows.utils.StrIndexMixin
,SkippableMixin
(True
),data_validation_framework.task.ElementValidationTask
Plot smoothed diameters versus originals.
- class tasks.repair.FinalCheck(*args, **kwargs)¶
Bases:
morphology_workflows.utils.StrIndexMixin
,SkippableMixin
(),data_validation_framework.task.ElementValidationTask
Detect and plot errors in curated morphologies.
The checks are the same as in the
tasks.curation.DetectErrors
task.This task uses
neuror.sanitize.annotate_neurolucida()
. This task creates new.asc
file with error annotated so it can be red by Neurolucida, and amorphology_workflows.marker_helper.MarkerSet
container of the errors, for later plotting. Basic plots are also exported when errors are detectedThe
strict_labels
parameter can be used to select for which errors the morphologies are considered as invalid..- overlapping_point_tolerance¶
Tolerance used to detect overlapping points.
- Type:
- Default value:
1e-06
- disabled_checker_labels¶
The listed checkers will not be processed.
- Type:
- Default value:
[‘back-tracking’]
- strict_checker_labels¶
Morphologies with at least one of these errors are marked as invalid.
- Type:
- Default value:
[‘overlapping point’]