Checks And Issues Reference#
This is the canonical reference for:
validation checks
GUI issue types
related tools
parameter sources
the current radii-cleaning and auto-labeling algorithms
Primary code sources:
swcstudio/core/validation_catalog.pyswcstudio/core/validation_checks/native_checks.pyswcstudio/core/validation_checks/neuron_morphology_checks.pyswcstudio/core/issues.pyswcstudio/core/radii_cleaning.pyswcstudio/core/auto_typing/(engine package)swcstudio/tools/validation/configs/default.jsonswcstudio/tools/batch_processing/configs/radii_cleaning.jsonswcstudio/tools/batch_processing/configs/auto_typing.json
How To Read This Page#
Sourcenative: implemented directly in SWC-StudioNeuroM: wrapped from NeuroM
Severitycurrent default from
swcstudio/tools/validation/configs/default.json
JSONyes: params are exposed in JSONenabled/severity only: the check can be turned on/off and reclassified, but has no extra exposed params
Related toolthe tool the GUI routes to for inspection or repair
Pipeline Overview#
The app raises issues from three layers:
Validation checksdeterministic checks run through the shared validation engine
Suspicious-item detectorssuspicious radii and suspicious labels
Issue normalizationvalidation rows and suspicious findings become GUI issues
So one SWC can raise:
validation issues
blocked-check issues
suspicious radii issues
suspicious label issues
Validation Check Matrix#
Structural Presence#
Key |
Issue title |
Source |
Severity |
How checked |
Params |
JSON |
Related tool |
|---|---|---|---|---|---|---|---|
|
|
native |
warning |
Groups connected type- |
none |
enabled/severity only |
|
|
|
native |
critical |
Runs after temporary soma consolidation and fails if more than one soma anchor remains. |
none |
enabled/severity only |
|
|
|
native |
critical |
Fails if no node has type |
none |
enabled/severity only |
Manual Label Editing / Auto Label Editing |
|
|
native |
critical |
Fails if any node type is |
none |
enabled/severity only |
Manual Label Editing |
|
|
native |
warning |
Requires every used custom type ( |
none |
enabled/severity only |
|
|
|
native |
warning |
Fails if no node has type |
none |
enabled/severity only |
Manual Label Editing / Auto Label Editing |
|
|
native |
warning |
Fails if no node has type |
none |
enabled/severity only |
Manual Label Editing / Auto Label Editing |
|
|
native |
warning |
Fails if no node has type |
none |
enabled/severity only |
Manual Label Editing / Auto Label Editing |
Radius And Size#
Key |
Issue title |
Source |
Severity |
How checked |
Params |
JSON |
Related tool |
|---|---|---|---|---|---|---|---|
|
|
native |
critical |
Fails on non-soma nodes with non-finite or |
none |
enabled/severity only |
Manual Radii Editing |
|
|
NeuroM |
critical |
Calls NeuroM |
|
yes |
Manual Radii Editing |
|
|
NeuroM |
warning |
Calls NeuroM |
|
yes |
Manual Radii Editing |
|
|
NeuroM |
warning |
Calls NeuroM |
|
yes |
Manual Radii Editing |
|
|
NeuroM |
warning |
Calls NeuroM |
|
yes |
Manual Radii Editing |
|
|
native |
warning |
Fails when any radius is above |
|
yes |
Auto Radii Editing |
Length And Geometry#
Key |
Issue title |
Source |
Severity |
How checked |
Params |
JSON |
Related tool |
|---|---|---|---|---|---|---|---|
|
|
native |
critical |
Uses segment-based section validity and fails on zero or invalid derived section length. |
none |
enabled/severity only |
Geometry Editing |
|
|
native |
critical |
Computes Euclidean parent-child distance and fails on non-finite or |
none |
enabled/severity only |
Geometry Editing |
|
|
NeuroM |
warning |
Calls NeuroM |
none |
enabled/severity only |
Geometry Editing |
|
|
NeuroM |
warning |
Calls NeuroM |
|
yes |
Geometry Editing |
|
|
native |
critical |
Fails only when the full |
none |
enabled/severity only |
Geometry Editing |
|
|
native |
warning |
Flags parent-child segments above a threshold derived from absolute, median-ratio, and MAD-based bounds. |
|
yes |
Geometry Editing |
Topology#
Key |
Issue title |
Source |
Severity |
How checked |
Params |
JSON |
Related tool |
|---|---|---|---|---|---|---|---|
|
|
native |
critical |
Fails on non-soma nodes with |
none |
enabled/severity only |
Geometry Editing |
|
|
native |
critical |
Fails when |
none |
enabled/severity only |
Geometry Editing |
|
|
NeuroM |
warning |
Calls NeuroM |
none |
enabled/severity only |
Geometry Editing |
|
|
NeuroM |
warning |
Calls NeuroM |
none |
enabled/severity only |
Geometry Editing |
|
|
NeuroM |
warning |
Calls NeuroM |
none |
enabled/severity only |
Geometry Editing |
Index Consistency#
Key |
Issue title |
Source |
Severity |
How checked |
Params |
JSON |
Related tool |
|---|---|---|---|---|---|---|---|
|
|
NeuroM |
critical |
Calls NeuroM |
|
yes |
Geometry Editing |
|
|
NeuroM |
critical |
Calls NeuroM |
|
yes |
Geometry Editing |
|
|
native |
warning |
Fails when a valid in-file parent ID is |
none |
enabled/severity only |
Index Clean |
|
|
native |
info |
Fails when sorted unique node IDs skip integers. |
none |
enabled/severity only |
Index Clean |
GUI-Only Issue Generators#
These are shown in the issue-driven workflow but are not entries in default.json.
Source key |
Title |
How generated |
Config source |
Related tool |
|---|---|---|---|---|
|
|
Grouped from validation rows that could not run because morphology building failed. |
none |
Validation or Manual Label Editing, depending on cause |
|
|
Runs the shared radii-cleaning engine and groups nodes the cleaner would change. |
|
Auto Radii Editing |
|
|
Runs the shared auto-typing engine and groups nodes where current type differs from suggested type. |
|
Auto Label Editing |
Issue Model#
Issues normalized in swcstudio/core/issues.py use these fields:
issue_idseveritycertaintydomaintitledescriptionnode_idssection_idstool_targetsuggested_fixstatussource_keysource_labelsource_categorysource_payload
Radii Cleaning Algorithm#
The suspicious radii issue and Auto Radii Editing use the same shared backend in swcstudio/core/radii_cleaning.py.
Current method#
The current cleaner is directed-path and fixed-point based:
build topology and directed branch paths
compute per-type sanity bounds
Pass 1: local outlier repairPass 2: taper enforcementPass 3: local polynomial smoothingre-apply taper
repeat until no issue-visible changes remain
Soma radii are always preserved.
Reasons recorded per changed node#
non_finitenon_positivebelow_type_minabove_type_maxlocal_outliertaper_cappost_smooth_taper_capaxon_floorsavitzky_golay
Current radii-clean config keys#
Main config file:
swcstudio/tools/batch_processing/configs/radii_cleaning.json
Current top-level rule groups:
small_radius_zero_onlysanity_bounds.globalsanity_bounds.per_typelocal_outliertaperaxon_floorsavgolfixed_pointreplacement
Important defaults:
local_outlier.window_nodes = 5local_outlier.max_percent_deviation = 0.5taper.slack = 0.05axon_floor.min_radius = 0.12savgol.window_nodes = 7savgol.polyorder = 2fixed_point.max_passes = 32fixed_point.min_effective_delta = 0.005
Auto Labeling Algorithm#
The suspicious label issue and Auto Label Editing run the same auto-typing engine, implemented in:
swcstudio/core/auto_typing/(engine package)swcstudio/tools/batch_processing/configs/auto_typing.json(user-editable runtime knobs)
Pipeline architecture#
Auto-labeling runs three groups of work in sequence: a QC gate that decides whether to label at all, a labeling model that assigns the per-node types, and flag scoring that highlights low- confidence labels for review.
Step |
Files |
What it produces |
|---|---|---|
QC gate |
|
Pass / reject decision plus a specific reason. Rejects malformed, disconnected, or out-of-distribution files before any labeling runs. Unlabeled type-0 inputs are allowed through. |
Cell typing |
|
Pyramidal vs interneuron. Uses a soft handoff: when confidence is low it runs subtree labeling for both cell types and picks the higher-confidence outcome. |
Subtree labeling |
|
Per-primary-subtree assignment as axon / basal / apical. |
Apical/basal GNN |
|
GraphSAGE re-decision over the branch graph for pyramidal dendrites. |
Apical/basal rescue |
|
Conservative GraphSAGE rescue head for the hardest pyramidal apical/basal cases. |
Topology refinement |
— |
Soma-boundary constraints applied (one primary axon, one primary apical), short islands flipped. |
Flag scoring |
|
Per-node score of how likely each predicted label is wrong. Surface in the GUI issue panel and in the CLI JSON output. |
flag_feature_mode controls flag-score features; both compact and
simple map to the bundled fast flagger.
Apical detection#
Apical labeling requires both a learned per-subtree score and a minimum subtree-root radius. Files without a qualifying apical subtree get 3-class output (soma / axon / basal); files with one get 4-class output (soma / axon / basal / apical). There are no class-selection flags exposed to the user.
Config keys#
The user-editable JSON at
swcstudio/tools/batch_processing/configs/auto_typing.json is small —
the engine’s behavior is set by the trained model files, not by
hand-tuned weights. Current keys:
model_dir— override the model search path (empty string means use the default search order: env var → user data dir → bundled)use_subtree_stage2— whether Stage 2 operates on full primary subtrees (defaulttrue)cell_type-unknownruns Stage 1;pyramidalorinterneuronbypasses Stage 1 with the user-provided typeflag_enabled- enable learned per-cell bad-label flag scoringflag_strictness- tune flagging from loose to conservativeflag_feature_mode- compatibility field; compact scoring is always used in SWC-Studioenabled— feature gate (defaulttrue)notes— free-form description; not consumed by the engine
To swap in your own trained models without editing this file, copy them
into the user data directory (%APPDATA%\swcstudio\models\ on Windows,
~/Library/Application Support/swcstudio/models/ on macOS, or
~/.local/share/swcstudio/models/ on Linux) and they take precedence
over the bundled defaults.
flag_feature_mode behavior:
compactis the bundled fast flagger and uses features the labeling stage already computed.simpleis accepted as an alias for compact.
How Checks Become GUI Issues#
Current conversion rules:
validation
passno issue
validation
warningwarningissue
validation
failcriticalissue
blocked or dependency-failed checks
collapsed into grouped blocked-check issues
suspicious radii changes
one aggregated
Outlier radii detectedissue
suspicious label changes
one aggregated
Likely wrong labelsissue
Where To Edit Behavior#
validation check enable/severity/params
swcstudio/tools/validation/configs/default.json
radii cleaning behavior
swcstudio/tools/batch_processing/configs/radii_cleaning.json
auto labeling behavior
swcstudio/tools/batch_processing/configs/auto_typing.json