Page history Edit this page How do I edit this website?

SNT › Analysis

Brain Area Analysis

See Graph-based Analysis.

Convex Hull Analysis

Convex hull commands (in SNT main dialog, Rec. viewer and Rec. plotter) compute the 2D or 3D convex hull of a reconstruction (i.e., the smallest convex polygon/polyhedron that contains the nodes of its paths). Convex hull measurements are defined in Metrics.

Measurements

SNT provides a couple ways to measure reconstructions. To measure complete cells use AnalysisMeasure… in the main SNT dialog (or Analyze & Measure in Reconstruction Viewer). A simplified Quick Measurements variant of this command also exists, in which common metrics are immediately retrieved using default settings. To get measurements only on a select group of Paths, first select or filter for the Paths you want to measure in the Path Manager, then use the commands in the Path Manager’s AnalyzeMeasurements menu.

/media/plugins/snt/snt-measurements-prompt.png

The measurements dialog features an offline guide accessible through the Gear menu.

The reason for distinguish between branch-based (i.e., cell-based) and path-based measurements is flexibility: Path-based measurements can be performed on any structures, even those with loops, while branch-based measurements require the structure to be a graph-theoretic tree. The bulk of SNT measurements is described in Metrics. Measurements available in the GUI are typically single-value metrics. Many others measurements are available via scripting.

Batch measurements of reconstructions can be accomplished via scripting. See, e.g., the bundled template script Measure_Multiple_Files.py, and related batch scripts for examples.

Note on Fitted Paths:
Some branch-based metrics may not be available when mixing fitted and un-fitted paths because paths are fitted independently of one another and may not be aware of the original connectivity. When this happens, metrics may be reported as NaN and related errors reported to the Console (when running in Debug mode). If this becomes an issue, consider fitting paths in situ using the Replace existing nodes option instead. Also, remember that you can also use the Path Manager’s Edit>Rebuild… command to re-compute relationships between paths

Statistics

SNT assembles comparison reports and simple statistical reports (two-sample t-test/one-way ANOVA) for up to six groups of cells. This is described in Comparing Reconstructions. In addition, descriptive statistics are commonly reported in histograms from Frequency/Distribution Analysis commands.

/media/plugins/snt/snt-combined-histograms.png

Example of histograms obtained from the Path Manager’s Branch-based Distributions… command.

Graph-based Analysis

Analyses based on graph-theory are better performed via the scripting. However, SNT features a quite-capable Graph Viewer that has many built-in options for handling graph objects.

The viewer provides controls for orientation, zoom level, panning, vertex editing and traversal as well as options to customize the display vertices (shape and labels) and edges (shape and weight labels). Basic support for themes (including dark, light and formal) are also supported. The_Graph Viewer_ canvas may be exported in several file formats, including HTML, PNG and SVG.

Typically, the most common types of graphs handled by Graph Viewer are:

  • Dendrograms: Dendrograms can be obtained from single rooted tree structure, and provide a high-level overview of neurite branching topology. In the GUI, dendrograms can be created from UtilitiesCreate Dendrogram in the main SNT dialog or Analyze & MeasureCreate Dendrogram in Reconstruction Viewer.

  • Annotation Graphs These rely on brain annotations (i.e., neuropil labels) and are typically used to summarize projectomes or relationships between brain areas, including ferris-wheel diagrams. Note that annotation graphs can be generated for a single cell or groups of cells.

Two other type of Brain Area Analysis visualizations relying on graph-based analysis (but not Graph Viewer) include boxplots and Sankey (flow) diagrams reporting innervation across brain areas/neuropil regions:

Ultimately, fine-grained programmatic control over SNT’s Graph objects is achieved via scripting. Relevant resources:

  • JGraphT: The underlying library handling graph theory data structures and algorithms with JAVA and Python APIs
  • SNT graph package: High-level tools for graph creation within SNT
  • SNT Demo Scripts: See e.g., Graph_Analysis.py and Flow_and_Ferris-Wheel_Diagrams_Demo.groovy, two SNT demo scripts
  • Python notebooks: For pyimagej examples, have a look at the Hemisphere Analysis notebook

Sholl Analysis

There are several entry points to Sholl Analysis in SNT. You can find those in the Neuroanatomy Shortcuts panel (PluginsNeuroanatomy or “SNT” icon in Fiji’s toolbar):

  1. Sholl Analysis (Image): Direct parsing of images, bypassing tracing
  2. Sholl Analysis (Tracings): Parsing of reconstructions
  3. Sholl Analysis Scripts: These handle batch processing of files, specialized analysis, and misc. utilities

Sholl Analysis has a dedicated documentation page detailing parameters, plots, and metrics.

In the main SNT dialog, Sholl commands are available in the Analysis menu and image contextual menu and include:

  • Sholl Analysis… Analyzes cells based on a set of pre-defined, morphology-based focal points (e.g., Soma, Root node(s): Primary apical dendrite(s)). Note that this assumes the relevant morphology tag(s) have been assigned to the set of paths being analyzed. Since the center of analysis is only determined after the prompt has been dismissed, preview of sampling shells may not be available.

  • Sholl Analysis (by Focal Point)… Analyzes cells on an exact, user-defined focal point. It is described on the following section.

  • Sholl Analysis at Nearest Node Coarser alternative to Sholl Analysis (by Focal Point)…, run from the image contextual menu by right-clicking near a node (Shortcut: ⌥ Alt + ⇧ Shift + A.

Sholl Analysis (by Focal Point)

For precise positioning of the center of analysis:

  1. Mouse over the path of interest. Press G to activate it
  2. Then, select the node to be used as focal point. This can be done in one of two ways:
    1. Select a node along the path as you would for forking operation: i.e., by pressing ⌥ Alt + ⇧ Shift while moving the cursor along the path (Note the “Fork Point” label appearing near the cursor on non-display canvases). With ⌥ Alt + ⇧ Shift still pressed, press A to start the analysis
    2. Make the path editable (right-click on the image and choose Edit Path from the contextual menu). Move the cursor along the path until the desired node is highlighted. Press ⌥ Alt + ⇧ Shift + A to start the analysis

NB: The default ⌥ Alt + ⇧ Shift modifier can be simplified in the Options tab of the main dialog.

The Sholl dialog created by this approach is a variant of the dialog created by running the ShollSholl Analysis (From Tracings)… from the Neuroanatomy Shortcuts panel, with a couple of changes:

  1. Since the center of analysis is defined precisely on an image, radius step size can be previewed
  2. The Path filtering drop-down menu provides additional options to restrict the analysis to the subset of paths selected in the Path Manager
  3. The type of annotations is more specialized and includes:
    • Color coded nodes Intersection counts will be color mapped into path nodes under the annotation LUT.
    • 3D viewer labels image This generates a synthetic image holding the number of intersections at each distance from the center under annotation LUT. This image can then be fed to the “Apply Color Labels” action of the legacy 3D viewer, to “overlay” the mapping on the legacy 3D viewer scene.

Note that plots and tables can be directly saved to disk by selecting Save and specifying a valid directory in the dialog. The remaining options in the dialog are described in the Sholl documentation page.

/media/plugins/snt/sholl-analysis-outputs.png

Overview of Sholl analysis outputs: Linear and log-log profile (Sholl decay calculation), detailed and summary tables. Note that ‘traditional’ plots are obtained by disabling curve-fitting altogether.

Strahler Analysis

Similarly to Sholl Analysis, there are several entry points to Strahler Analysis in SNT. You can find those in the Neuroanatomy Shortcuts panel (PluginsNeuroanatomy or “SNT” icon in Fiji’s toolbar):

  1. Strahler Analysis (Image)… Direct parsing of images, bypassing tracing
  2. Strahler Analysis (Tracings)… Parsing of reconstructions
  3. Strahler Analysis Scripts: These handle batch processing of files

Strahler Analysis (Image) has a dedicated documentation page with details on the classification.

To conduct Strahler Analysis on the current contents of the Path Manager, choose the AnalysisStrahler Analysis… in the main SNT dialog. This command will output the results of the analysis as a table and plot(s). These figures contain morphometric statistics of branches at each Horton-Strahler number. Refer to the Strahler Analysis (Image) documentation for details on the classification.

/media/plugins/snt/strahler-analysis-from-reconstructions.png

Strahler Analysis detailed output.

Path Order Analysis

Found at AnalysisPath Order Analysis in the main SNT dialog, this option is a variant of Strahler with the following differences:

  • Classification is based on Path Order: Paths are the scope of classification (not branches)
  • Ranking of orders is reversed relatively to Strahler analysis (reversed Strahler orders), with primary paths having order 1 and terminal paths having the highest order
  • Classification accepts any structure: Since classification is path-based, there are no topological constrains in the analysis. While Strahler requires structures to be valid mathematical trees, Path order analysis can be performed on any structures, even those with loops

Persistence Analysis

Currently, persistence analysis is only available via scripting. See e.g., the Persistence Landscape notebook.

Comparing Reconstructions

SNT can compare up to six groups of cells. The entry point for this type of comparison is twofold:

  • UtilitiesCompare Reconstructions/Cell Groups… in the main SNT dialog. This includes a convenience option to compare single reconstruction files.
  • Neuronal arborsLoad & Compare Groups… in Reconstruction Viewer, allowing groups to be tagged, and imported into a common scene while being compared.

The dialog prompt for this feature allows selection of up to six directories containing reconstruction files (SWC, TRACES, JSON, NDF). The metric to compare against is chosen from the Metric drop-down menu. Optionally, it is possible to restrict the analysis to specific neurite compartments. After making your selections, press OK to run the analysis. The result typically includes:

  • A simple statistical report, including descriptive statistics and a two-sample t-test (when comparing two groups) or one-way ANOVA (when comparing three or more groups)
  • Comparison plots for the chosen metric: Grouped histogram and boxplot
  • Montages of groups. These are multi-panel vignettes of up to 10 group exemplars. These can all be exported as PNG or SVG.
/media/plugins/snt/snt-compare-reconstructions-overview.png

Comparing No. of branches between two cell groups: Overview of outputs.

SNT performs statistical tests without verifying if samples fulfill basic test-criteria (e.g., normality, variance homogeneity, sample size, etc.)

Custom Analyses

It is possible to script your own analysis routines. See SNT Scripting for the link to SNT’s API as well as script templates demonstrating a range of analysis possibilities.