morphology_workflows.curation
¶
Curation functions.
Module Contents¶
Functions¶
|
Collect morphologies. |
|
Extract marker data from morphology files. |
|
Plot markers on morphologies. |
|
Sanitize morphologies. |
|
Check which neurites are present, add soma if missing and mock_soma_type is not None. |
|
Fix the radius of a spherical soma. |
|
Fix neurites whose points are located inside the soma. |
|
Recenter morphologies to place soma at [0, 0, 0]. |
|
Orient a morphology such that the original pia_direcion is along y. |
|
Align a morphology. |
|
Checker for z-range. |
|
Detect errors in morphologies. |
|
Plot error markers. |
|
Make the error report as a df and save to .csv. |
|
Resample morphologies with fixed linear density. |
|
Plot a morphology. |
-
morphology_workflows.curation.
collect
(row, data_dir, morph_path_col='morph_path')¶ Collect morphologies.
-
morphology_workflows.curation.
extract_marker
(row, data_dir)¶ Extract marker data from morphology files.
-
morphology_workflows.curation.
plot_markers
(row, data_dir, with_plotly=True)¶ Plot markers on morphologies.
-
morphology_workflows.curation.
sanitize
(row, data_dir)¶ Sanitize morphologies.
-
morphology_workflows.curation.
check_neurites
(row, data_dir, axon_n_section_min=5, mock_soma_type='spherical')¶ Check which neurites are present, add soma if missing and mock_soma_type is not None.
-
morphology_workflows.curation.
fix_soma_radius
(morph)¶ Fix the radius of a spherical soma.
If all points of a neurite are located inside the soma, the radius is reduced such that at least the last point of each neurite is located outside the soma.
-
morphology_workflows.curation.
fix_neurites_in_soma
(row, data_dir)¶ Fix neurites whose points are located inside the soma.
- Method:
The radius of the soma is adapted to reduce the number of points inside the soma.
The remaining points inside the soma are removed.
-
morphology_workflows.curation.
recenter
(row, data_dir)¶ Recenter morphologies to place soma at [0, 0, 0].
-
morphology_workflows.curation.
orient
(row, data_dir, pia_direction='y')¶ Orient a morphology such that the original pia_direcion is along y.
-
morphology_workflows.curation.
align
(row, data_dir, method='whole', neurite_type='apical', direction=None)¶ Align a morphology.
-
morphology_workflows.curation.
z_range
(neuron, min_range=50)¶ Checker for z-range.
-
morphology_workflows.curation.
detect_errors
(row, data_dir, min_range=50)¶ Detect errors in morphologies.
TODO: bypass dangling if only one axon/neurite
-
morphology_workflows.curation.
plot_errors
(row, data_dir, with_plotly=True)¶ Plot error markers.
-
morphology_workflows.curation.
make_error_report
(df, data_dir, error_report_path='error_report.csv')¶ Make the error report as a df and save to .csv.
-
morphology_workflows.curation.
resample
(row, data_dir, linear_density=1.0)¶ Resample morphologies with fixed linear density.
-
morphology_workflows.curation.
plot_morphology
(row, data_dir, with_plotly=True, realistic_diameters=True)¶ Plot a morphology.