Difference between revisions of "SNT: Analysis"

(Sholl Analysis)
(Measurements: improve)
 
(28 intermediate revisions by the same user not shown)
Line 4: Line 4:
  
 
=Sholl Analysis=
 
=Sholl Analysis=
 +
There are two [https://imagej.net/Sholl_Analysis Sholl Analysis] commands available in SNT's ''Analysis'' menu. The {{bc|Analysis|Shuoll Analysis...}} option provides a set of pre-defined focal points the user can choose from. Note for the morphology-based focal points (e.g., ''Soma'', ''Root node(s): Primary apical dendrite(s)'') , the relevant morphology tag(s) must be assigned to the set of paths considered by the analysis. To select a focal point manually, see the following section.
 +
==Sholl Analysis (by Focal Point)==
 
[[Image:Snt-Sholl-Coarse-Intructions.png|right|thumb|200px|Initiating Sholl Analysis: coarse method]]
 
[[Image:Snt-Sholl-Coarse-Intructions.png|right|thumb|200px|Initiating Sholl Analysis: coarse method]]
To initiate [https://imagej.net/Sholl_Analysis Sholl Analysis], you must select a focal point. You can do it coarsely by right-clicking near a node and choosing ''Sholl Analysis at Nearest Node'' from the contextual menu (Shortcut: {{key|Alt}} + {{key|Shift}} + {{key|A}}.   
+
It is also possible to initiate [https://imagej.net/Sholl_Analysis Sholl Analysis] on a tracing in the canvas by manually selecting a focal point. You can do it coarsely by right-clicking near a node and choosing ''Sholl Analysis at Nearest Node'' from the contextual menu (Shortcut: {{key|Alt}} + {{key|Shift}} + {{key|A}}.   
  
 
Alternatively, for precise positioning of the center of analysis:
 
Alternatively, for precise positioning of the center of analysis:
Line 15: Line 17:
 
<li style="display:inline-block;"> [[Image:Snt-Sholl-Precise-Step-1.png|none|thumb|200px|1) Select path]] </li>
 
<li style="display:inline-block;"> [[Image:Snt-Sholl-Precise-Step-1.png|none|thumb|200px|1) Select path]] </li>
 
<li style="display:inline-block;"> [[Image:Snt-Sholl-Precise-Step-2.png|none|thumb|200px|2) Snap cursor to node]] </li>
 
<li style="display:inline-block;"> [[Image:Snt-Sholl-Precise-Step-2.png|none|thumb|200px|2) Snap cursor to node]] </li>
<li style="display:inline-block;"> [[Image:Snt-Sholl-Precise-Step-3.png|none|thumb|350px|3) Press "Alt+Shift+A"]] </li>
+
<li style="display:inline-block;"> [[Image:Snt-Sholl-Precise-Step-3.png|none|thumb|146px|3) Sholl dialog]] </li>
 
</ul>
 
</ul>
 
</div>
 
</div>
 
{{clear}}
 
{{clear}}
The Sholl dialog created by this approach differs slightly from the dialog created by running the {{bc|Analyze|Sholl|Sholl Analysis (From Tracings)...}} plugin in the main Fiji menu. First, the center of analysis is automatically taken from the nearest (or exact) node where the user clicks. Another advantage is that the display canvas allows the radius step size to be previewed visually. To do this, toggle on the ''Preview'' checkbox under the ''Sampling'' section and experiment with different step sizes.
+
The Sholl dialog created by this approach differs slightly from the dialog created by running the {{bc|Analyze|Sholl|Sholl Analysis (From Tracings)...}} plugin in the main Fiji menu. First, the center of analysis is automatically taken from the nearest (or exact) node where the user clicks. In addition to morphology and custom tag filters, the ''Path filtering'' drop-down menu provides an additional option to restrict the analysis to the subset of paths selected in the Path Manager. Another advantage is that the display canvas allows the radius step size to be previewed visually. To do this, toggle on the ''Preview'' checkbox under the ''Sampling'' section and experiment with different step sizes.
 
<div align="center">
 
<div align="center">
 
<ul>  
 
<ul>  
 
<li style="display:inline-block;"> [[Image:Snt-Sholl-preview-step-size-1.png|none|thumb|200px|Step Size = 0]] </li>
 
<li style="display:inline-block;"> [[Image:Snt-Sholl-preview-step-size-1.png|none|thumb|200px|Step Size = 0]] </li>
 
<li style="display:inline-block;"> [[Image:Snt-Sholl-preview-step-size-2.png|none|thumb|200px|Step Size = 5]] </li>
 
<li style="display:inline-block;"> [[Image:Snt-Sholl-preview-step-size-2.png|none|thumb|200px|Step Size = 5]] </li>
 +
</ul>
 +
</div>
 +
In addition to the Sholl Profile plot and table, the output of the analysis can be visualized as a color mapping of the reconstruction and as a [https://imagej.net/Simple_Neurite_Tracer:_Sholl_analysis#Sholl_Image Sholl Image]. To color code the tracing, choose ''Color coded paths'' from the ''Annotations'' drop-down menu and select a Lut from the ''Annotations Lut'' drop-down menu before pressing ''Run Analysis''.  To output the Sholl Image, choose ''3D viewer labels image'' from the ''Annotations'' drop-down menu and select the desired Lut before running the analysis.
 +
<div align="center">
 +
<ul>
 +
<li style="display:inline-block;"> [[Image:Snt-Sholl-Profile-Plot-New.png|none|thumb|305px|Sholl Profile Plot]] </li>
 +
<li style="display:inline-block;"> [[Image:Snt-Sholl-Profile-Table-New.png|none|thumb|230px|Sholl Profile Table]] </li>
 +
<li style="display:inline-block;"> [[Image:Snt-Sholl-Color-Map.png|none|thumb|200px|Color Coded Tracing - Ice Lut]] </li>
 +
<li style="display:inline-block;"> [[Image:Snt-Sholl-Color-Map-Mask.png|none|thumb|200px|Sholl Image - Ice Lut]] </li>
 +
</ul>
 +
</div>
 +
=Strahler Analysis=
 +
To conduct [https://imagej.net/Strahler_Analysis Strahler Analysis] on the current contents of the Path Manager, choose the {{bc|Utilities|Strahler Analysis}} command in the main SNT dialog. This command will output the results of the analysis as a table and plot. These figures contain morphometric statistics on the group of paths associated with each Horton-Strahler Number. Note that this feature analyzes traced reconstructions. To run Strahler analysis on images, use the {{bc|Analyze|Skeleton|Strahler Analysis...}} plugin in the main Fiji dialog.
 +
<div align="left">
 +
<ul>
 +
<li style="display:inline-block;"> [[Image:SNT-Strahler-Analysis-Table.png|none|thumb|200px|Strahler Analysis table]] </li>
 +
<li style="display:inline-block;"> [[Image:SNT-Strahler-Analysis-Plot.png|none|thumb|200px|Strahler Analysis plot]] </li>
 +
</ul>
 +
</div>
 +
 +
=Path Order Analysis=
 +
Found at {{bc|Analysis|Path Order Analysis}} in the main SNT dialog, this option analyzes the Paths in the Path Manager based on [https://www.mbfbioscience.com/help/nx11/Content/Branch%20order/Branch_Order.htm Branch Order]. Produces a table of results and a plot similar to the ''Strahler Analysis'' option, with morphometric statistics on the group of paths associated with each Branch Order.
 +
 +
<div align="left">
 +
<ul>
 +
<li style="display:inline-block;"> [[Image:SNT-Path-Order-Analysis-Table.png|none|thumb|200px|Path Order Analysis table]] </li>
 +
<li style="display:inline-block;"> [[Image:SNT-Path-Order-Analysis-Plot.png|none|thumb|200px|Path Order Analysis plot]] </li>
 +
</ul>
 +
</div>
 +
 +
=Measurements=
 +
[[Image:Snt-Measurements-List.png|right|thumb|120px|''Measure...'' dialog]]
 +
SNT provides several ways to measure reconstructions. A comprehensive selection of measurements can be found by going to {{bc|Analysis|Measure...}}. in the main SNT dialog. Note that for this option, if multiple rooted tree structures exist in the Path Manger, you will be prompted to choose one for analysis.
 +
 +
To quickly measure all existing paths with a common set of statistics, choose {{bc|Analysis|Quick Measurements}}. In both cases the results of the measurements are displayed in a table.
 +
 +
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 choose either command from the  {{bc|Analyze}} menu in the Path Manager.
 +
 +
Batch measurements of reconstructions can be accomplished via scripting. See ''Measure_Multiple_Files.py'' in the SNT [https://imagej.net/SNT:_Scripting#Script_Templates Script Templates] for a basic example.
 +
[[Image:Snt-Measure-Results-Table.png|none|thumb|1000px|''Measure...''
 +
results]]
 +
{{clear}}
 +
 +
=Dendrogram Viewer=
 +
[[Image:Snt-Dendrogram-Shortcuts.png|right|thumb|140px|Dendrogram Viewer shortcuts]]
 +
Found at {{bc|Utilities|Create Dendrogram}}, this option generates a [https://en.wikipedia.org/wiki/Dendrogram Dendrogram] from one connected component (i.e., a single rooted tree structure) in the Path Manager, providing a high-level overview of neurite branching topology. Note that if multiple rooted trees exist in the Path Manager, you will be prompted to choose one of them.
 +
 +
The viewer provides controls for orientation, zoom level, panning, vertex editing and traversal as well as options to display vertex labels and edge weights (which by default are the euclidean distances between adjacent vertices). To see the available key shortcuts, right click on the viewer and choose ''Available Shortcuts...''. The plot may be exported in several file formats, including HTML, PNG and SVG.
 +
 +
Fine-grained programmatic control over SNT's Graph objects is achieved using the [https://jgrapht.org/javadoc/ JGraphT API] in a script.  Also relevant is the [http://fiji.github.io/SNT/sc/fiji/snt/analysis/graph/package-frame.html sc.fiji.snt.analysis.graph] package which provides high-level tools for Graph creation and conversion. See ''Graph_Analysis.py'' in the SNT [https://imagej.net/SNT:_Scripting#Script_Templates Script Templates] for a basic example.
 +
[[Image:Snt-Dendrogram-Viewer.png|none|thumb|300px|Dendrogram Viewer]]
 +
 +
=Comparing Reconstructions=
 +
The {{bc|Utilities|Compare Reconstructions...}} command will bring up a prompt which gives the user the option to compare two single reconstruction files against multiple metrics, or multiple groups of reconstruction files against a single metric.
 +
 +
[[Image:Snt-Compare-Reconstructions-Single-Or-Group-Choice.png|none|thumb|200px|]]
 +
 +
If you select, ''Compare two files'' and press ''OK'', a file chooser dialog will appear allowing the user to select two SWC files and their respective colors for display in Reconstruction Viewer.
 +
 +
[[Image:Snt-Compare-Reconstructions-Single-File-Chooser.png|none|thumb|200px|]]
 +
 +
[[Image:Snt-Compare-Reconstructions-Single-3DViewer-Result.png|right|thumb|200px|]]
 +
 +
Use the ''Browse'' button to select the two files and press 'OK' to run the analysis. The results will include a table containing results of the ''Quick Measurements'' function for both reconstructions, as well as an instance of the 3D Reconstruction Viewer displaying both reconstructions.
 +
[[Image:Snt-Compare-Reconstructions-Single-Measurements-Table.png|left|thumb|900px|]]
 +
{{clear}}
 +
To instead compare multiple groups of reconstruction files against a single metric, choose ''Compare groups of cells (two or more)'' in the initial prompt.
 +
 +
[[Image:Snt-Compare-Reconstructions-Group-File-Chooser.png|none|thumb|200px|]]
 +
 +
The file selection prompt for this option allows selection of up to four directories containing SWC files. The metric to compare against is chosen from the ''Metric'' drop-down menu. Optionally, the user may restrict the analysis to specific neurite compartments. After making your selections, press ''OK'' to run the analysis. The result include multi-panel figure(s) rendering up to ten reconstructions from each group, a window with the metric statistics on each group, a box-plot and a histogram. These figures can all be exported as PNG or SVG.
 +
 +
<div align="center">
 +
<ul>
 +
<li style="display:inline-block;"> [[Image:Snt-Compare-Reconstruction-Group-Render1.png|none|thumb|350px|]] </li>
 +
<li style="display:inline-block;"> [[Image:Snt-Compare-Reconstruction-Group-Render2.png|none|thumb|350px|]] </li>
 +
</ul>
 +
</div>
 +
<div align="center">
 +
<ul>
 +
<li style="display:inline-block;"> [[Image:Snt-Compare-Reconstruction-Group-Statistics-Window.png|none|thumb|300px]] </li>
 +
<li style="display:inline-block;"> [[Image:Snt-Compare-Reconstruction-Group-Box-Plot.png|none|thumb|200px|]] </li>
 +
<li style="display:inline-block;"> [[Image:Snt-Compare-Reconstruction-Group-Histogram.png|none|thumb|300px|]] </li>
 
</ul>
 
</ul>
 
</div>
 
</div>
  
In addition to the Sholl Profile plot and table, the output of the analysis can be visualized as a color mapping of the reconstruction and as a [https://imagej.net/Simple_Neurite_Tracer:_Sholl_analysis#Sholl_Image Sholl Image]. To color code the tracing, choose ''Color coded paths'' from the ''Annotations'' drop-down menu and select a Lut from the ''Annotations Lut'' drop-down menu before pressing ''Run Analysis''.  To output the Sholl Image, choose ''3D viewer labels image'' from the ''Annotations'' drop-down menu and select the desired Lut before running the analysis.
+
=Custom Analyses=
 +
It is possible to script your own analysis routines. See [https://imagej.net/SNT:_Scripting SNT:_Scripting] for the link to SNT's API as well as script templates demonstrating a range of analysis possibilities.
  
 
{{SNTNavBar}}
 
{{SNTNavBar}}

Latest revision as of 18:48, 12 January 2020

Home Manual Walk-throughs Screencasts Shortcuts Analysis Rec. Viewer SciView Cx3D Scripting FAQ


Sholl Analysis

There are two Sholl Analysis commands available in SNT's Analysis menu. The Analysis › Shuoll Analysis... option provides a set of pre-defined focal points the user can choose from. Note for the morphology-based focal points (e.g., Soma, Root node(s): Primary apical dendrite(s)) , the relevant morphology tag(s) must be assigned to the set of paths considered by the analysis. To select a focal point manually, see the following section.

Sholl Analysis (by Focal Point)

Initiating Sholl Analysis: coarse method

It is also possible to initiate Sholl Analysis on a tracing in the canvas by manually selecting a focal point. You can do it coarsely by right-clicking near a node and choosing Sholl Analysis at Nearest Node from the contextual menu (Shortcut: Alt + Shift + A.

Alternatively, for precise positioning of the center of analysis:

  1. Mouse over the path of interest. Press G to activate it.
  2. Press Alt+ Shift to select a node along the path.
  3. Press Alt+ Shift+A to start analysis.
  • 1) Select path
  • 2) Snap cursor to node
  • 3) Sholl dialog


The Sholl dialog created by this approach differs slightly from the dialog created by running the Analyze › Sholl › Sholl Analysis (From Tracings)... plugin in the main Fiji menu. First, the center of analysis is automatically taken from the nearest (or exact) node where the user clicks. In addition to morphology and custom tag filters, the Path filtering drop-down menu provides an additional option to restrict the analysis to the subset of paths selected in the Path Manager. Another advantage is that the display canvas allows the radius step size to be previewed visually. To do this, toggle on the Preview checkbox under the Sampling section and experiment with different step sizes.

  • Step Size = 0
  • Step Size = 5

In addition to the Sholl Profile plot and table, the output of the analysis can be visualized as a color mapping of the reconstruction and as a Sholl Image. To color code the tracing, choose Color coded paths from the Annotations drop-down menu and select a Lut from the Annotations Lut drop-down menu before pressing Run Analysis. To output the Sholl Image, choose 3D viewer labels image from the Annotations drop-down menu and select the desired Lut before running the analysis.

  • Sholl Profile Plot
  • Sholl Profile Table
  • Color Coded Tracing - Ice Lut
  • Sholl Image - Ice Lut

Strahler Analysis

To conduct Strahler Analysis on the current contents of the Path Manager, choose the Utilities › Strahler Analysis command in the main SNT dialog. This command will output the results of the analysis as a table and plot. These figures contain morphometric statistics on the group of paths associated with each Horton-Strahler Number. Note that this feature analyzes traced reconstructions. To run Strahler analysis on images, use the Analyze › Skeleton › Strahler Analysis... plugin in the main Fiji dialog.

  • Strahler Analysis table
  • Strahler Analysis plot

Path Order Analysis

Found at Analysis › Path Order Analysis in the main SNT dialog, this option analyzes the Paths in the Path Manager based on Branch Order. Produces a table of results and a plot similar to the Strahler Analysis option, with morphometric statistics on the group of paths associated with each Branch Order.

  • Path Order Analysis table
  • Path Order Analysis plot

Measurements

Measure... dialog

SNT provides several ways to measure reconstructions. A comprehensive selection of measurements can be found by going to Analysis › Measure.... in the main SNT dialog. Note that for this option, if multiple rooted tree structures exist in the Path Manger, you will be prompted to choose one for analysis.

To quickly measure all existing paths with a common set of statistics, choose Analysis › Quick Measurements. In both cases the results of the measurements are displayed in a table.

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 choose either command from the Analyze menu in the Path Manager.

Batch measurements of reconstructions can be accomplished via scripting. See Measure_Multiple_Files.py in the SNT Script Templates for a basic example.

Measure... results


Dendrogram Viewer

Dendrogram Viewer shortcuts

Found at Utilities › Create Dendrogram, this option generates a Dendrogram from one connected component (i.e., a single rooted tree structure) in the Path Manager, providing a high-level overview of neurite branching topology. Note that if multiple rooted trees exist in the Path Manager, you will be prompted to choose one of them.

The viewer provides controls for orientation, zoom level, panning, vertex editing and traversal as well as options to display vertex labels and edge weights (which by default are the euclidean distances between adjacent vertices). To see the available key shortcuts, right click on the viewer and choose Available Shortcuts.... The plot may be exported in several file formats, including HTML, PNG and SVG.

Fine-grained programmatic control over SNT's Graph objects is achieved using the JGraphT API in a script. Also relevant is the sc.fiji.snt.analysis.graph package which provides high-level tools for Graph creation and conversion. See Graph_Analysis.py in the SNT Script Templates for a basic example.

Dendrogram Viewer

Comparing Reconstructions

The Utilities › Compare Reconstructions... command will bring up a prompt which gives the user the option to compare two single reconstruction files against multiple metrics, or multiple groups of reconstruction files against a single metric.

Snt-Compare-Reconstructions-Single-Or-Group-Choice.png

If you select, Compare two files and press OK, a file chooser dialog will appear allowing the user to select two SWC files and their respective colors for display in Reconstruction Viewer.

Snt-Compare-Reconstructions-Single-File-Chooser.png
Snt-Compare-Reconstructions-Single-3DViewer-Result.png

Use the Browse button to select the two files and press 'OK' to run the analysis. The results will include a table containing results of the Quick Measurements function for both reconstructions, as well as an instance of the 3D Reconstruction Viewer displaying both reconstructions.

Snt-Compare-Reconstructions-Single-Measurements-Table.png


To instead compare multiple groups of reconstruction files against a single metric, choose Compare groups of cells (two or more) in the initial prompt.

Snt-Compare-Reconstructions-Group-File-Chooser.png

The file selection prompt for this option allows selection of up to four directories containing SWC files. The metric to compare against is chosen from the Metric drop-down menu. Optionally, the user may restrict the analysis to specific neurite compartments. After making your selections, press OK to run the analysis. The result include multi-panel figure(s) rendering up to ten reconstructions from each group, a window with the metric statistics on each group, a box-plot and a histogram. These figures can all be exported as PNG or SVG.

  • Snt-Compare-Reconstruction-Group-Render1.png
  • Snt-Compare-Reconstruction-Group-Render2.png
  • Snt-Compare-Reconstruction-Group-Statistics-Window.png
  • Snt-Compare-Reconstruction-Group-Box-Plot.png
  • Snt-Compare-Reconstruction-Group-Histogram.png

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.

Home Manual Walk-throughs Screencasts Shortcuts Analysis Rec. Viewer SciView Cx3D Scripting FAQ