tasks.annotation

Annotation tasks.

Module Contents

Classes

CollectCurated

Collect curated dataset to work with on this phase.

MType

Assign mtypes to morphologies.

HardLimit

Compute hard limits.

PlotHardLimit

Plot the hard limits.

ApicalPoint

Detect apical point.

PlotApicalPoint

Plot apical point.

CutLeaves

Detect the cut leaves.

PlotCutLeaves

Plot the cut leaves.

Attributes

logger

tasks.annotation.logger
class tasks.annotation.CollectCurated(*args, **kwargs)

Bases: morphology_workflows.utils.StrIndexMixin, data_validation_framework.task.ElementValidationTask

Collect curated dataset to work with on this phase.

class tasks.annotation.MType(*args, **kwargs)

Bases: morphology_workflows.utils.StrIndexMixin, data_validation_framework.task.ElementValidationTask

Assign mtypes to morphologies.

Currently, we only check if the mtype corresponds to the provided list of regex. If the list of regex is empty, we let all the morphologies pass (equivalent to skip).

If they do not, we invalidate the morphologies.

mtype_regex
class tasks.annotation.HardLimit(*args, **kwargs)

Bases: morphology_workflows.utils.StrIndexMixin, data_validation_framework.task.ElementValidationTask

Compute hard limits.

Hard limits are markers used to place morphologies in a circuit. They can be automatically computed as min and max extent of axon and dendrites.

Todo

There can be more such markers, manually placed with nse-tools/placement-annotator internal tool.

skip_axon

Skip the computation for axon hard limit

Type:

bool

Default value:

False

dendrite_hard_limit

Name of the dendrite hard limit annotation

Type:

str

Default value:

L1_hard_limit

axon_hard_limit

Name of the axon hard limit annotation

Type:

str

Default value:

L1_axon_hard_limit

class tasks.annotation.PlotHardLimit(*args, **kwargs)

Bases: morphology_workflows.utils.StrIndexMixin, SkippableMixin(), data_validation_framework.task.ElementValidationTask

Plot the hard limits.

Plot hard limits as lines on morphologies with plotly.

with_plotly

Use Plotly for plotting

Type:

bool

Default value:

True

class tasks.annotation.ApicalPoint(*args, **kwargs)

Bases: morphology_workflows.utils.StrIndexMixin, SkippableMixin(), data_validation_framework.task.ElementValidationTask

Detect apical point.

For morphologies with apical dendrites we estimate the location of the apical point with the automatic tool morph_tool.apical_point.apical_point_position().

tuft_percent

Fraction of tuft for morph-tool algorithm

Type:

float

Default value:

20

class tasks.annotation.PlotApicalPoint(*args, **kwargs)

Bases: morphology_workflows.utils.StrIndexMixin, SkippableMixin(), data_validation_framework.task.ElementValidationTask

Plot apical point.

Plot apical point as a single scatter point on a morphology with plotly.

with_plotly

Use Plotly for plotting

Type:

bool

Default value:

True

class tasks.annotation.CutLeaves(*args, **kwargs)

Bases: morphology_workflows.utils.StrIndexMixin, data_validation_framework.task.ElementValidationTask

Detect the cut leaves.

Cut leaves are considered to represent boundaries of slices of in-vitro reconstructions. See neuror.cut_plane.cut_leaves.find_cut_leaves() for more details on the algorithm and its parameters.

bin_width

Thickness of cut plane

Type:

float

Default value:

15

percentile_threshold

Threshold percentile for finding a cut plane

Type:

float

Default value:

70

class tasks.annotation.PlotCutLeaves(*args, **kwargs)

Bases: morphology_workflows.utils.StrIndexMixin, SkippableMixin(), data_validation_framework.task.ElementValidationTask

Plot the cut leaves.

We plot the cut-leaves as scatter markers, as the terminal points on dendrites intersecting the cut plane.

with_plotly

Use Plotly for plotting

Type:

bool

Default value:

True