Automize labelling of segments in simple neurite tracer plugin

imagej
neuroanatomy
segmentation
strahler-analysis
simpleneuritetracer
tracing
snt

#1

Hello,
I’m currently working on characterizing the physiology of Purkinje neurons form rat cerebellum (dissociated cell culture) when treated with different compounds.

I am using the simple neurite tracer plugin, and it is working very well for my purpose. What I need from the plugin is to count how many orders or dendrite segments there are for each neuron (viewed nicely in the hierarchy of the segments in the “all paths” window), as well as knowing how long the segments are. The goal is to determine if there is a difference in number of branching/orders of dendrites in control vs treated cultures (and if they get longer or shorter).

The problem arises when I save the data as a csv file, and import it to Excel where I make my graphs. It would take too much time figuring out which segment is of what order only looking at which other segments they are attached to (which is how the data is presented). To solve this, I have manually renamed the segments in the “all paths” window to follow a labelling code as follows:
Segment of primary order: a number (1 for primary) and a letter (to differentiate from other primary neurons) for example: 1a, 1b and so on.
Segment of higher orders: a number (2 for secondary - means it sprouts from a primary segment, 3 for tertiary, and so on), a letter (to identify which primary segment it belongs to) and another number (to see how many segments of this particular order that belong to the primary segment) for example: 2a01, 3a01, 3a02 (where 2a01 sprouts from 1a, and 3a01 and 3a02 sprout from 2a01).
When I save this and open it in Excel, I can sort the data by segment order, and easily use the data I need; but this is a quite time consuming method.
My question therefore is:

Is there any way I can automatize the labelling of the dendrite segments?

Cheers,
Ida


#2

Welcome to the forum @Ida!

You shouldn’t have to do such a tedious approach. There are mainly two issues here:

For truly bulk labeling, you will have to script SNT. However the IJ2 version of SNT has several features that will likely do most of the heavy lifting. See the recent announcement for details on how to obtain the pre-release:

The new Path Manager allows you to tag paths and create selection groups based on such tags (regex filtering is supported). You can then retrieve morphometric properties of such groups from within the Manager (look for the Measure command).

What you are trying to do is called Strahler classification, and the Neuroanatomy update site already features the Strahler plugin. However, as of this writing, it only accepts an image skeleton as input, not SNT traces. One would have to so some modifications to allow it. (It would be great if you want to give it a try, I’m more than welcome to give you some pointers. Otherwise I will try to have a look at it, once I manage to have some free time). As a workaround, you could:

  1. Convert your paths into skeletons (look for the respective command in the Path Manager)
  2. Run the Strahler plugin on such skeletons (without forgetting to mark the soma with a ROI ( Path Manager’s ROI converter command can also help here)

Do let us know how it goes


#3

Thank you so much for the helpful answer!

The SNT with the labelling option in the Path manager window is very helpful! The only thing I would like to know: Is there any way to make several custom tags and name them differently? (I see there is one “custom” tag, but cannot change its name, or make new ones).

Other than that I have managed to make it work very nicely by exporting the csv file with the labelling info into excel, and save a lot of time.

I also tried my hand at the Strahler plugin, but it doesn’t seem to work that well when the dendrites are overlapping (even when using the z-stack skeleton), which happens often in my experiments - but I think the new SNT is working well enough for my purposes.

Thank you again,
Ida


#4

Yes, see below. I’m uploading a newer pre-release to the Neuroanatomy update site. It has several commands that are likely to help:

  1. Path Manager’s Tag>Custom Tags> menu allows you to tag paths with an arbitrary number of labels

  2. Path Manager’s Tag>Branch Order Tags> menu now allows you to append the branching order of a path to its name. You can then use the filtering box to select groups of paths sharing the same order

  3. The new Path Manager’s Plugin>Color Coding… allows you to color-code paths according to they branching order

but you probably will not use any of the above. The new Utilities>Strahler Analysis command, does a detailed Horton-Strahler analysis of a traced arbor. Here is how it looks:

However, I did not have time to test it thoroughly. It would be important if you could ensure the results are valid. Also, it is becoming harder to document SNT’s new features. It would also be important if you could help updating the existing documentation on the wiki. Please don’t be shy about it: Any changes you do can always be reverted, and any type of documentation is better than no documentation at all!