Simple Neurite Tracer: Split Path between branch points and between branch and terminal points

Dear List,
I am importing in SNT v3.1.101 some Swc files that were traced in Neutube to perform some measurements.
Yet I’ve two problems,

  1. We tagged processes with different type determinants but this information is apparently lost in SNT (both in path manager and exported CSV file).

  2. Our cells have a number of small lateral processes (here a simple example with only two of them) that stem from a primary dendrites and we would like measure their numbers, lenght etc. We would also like to measure the inter-process distance.
    Yet impored swc are subdivided into paths that always continue past the branch point along one bifurcation, without caring about post-branch path lenght ( I guess they simply follow the order of nodes in the swc file). Rather we would like to split each path between branching points to divide them in segments (branch to branch or branch to termini)

A manual method would be useful (I could not yet figure it out!)
However, as we have many cells and many processes a hint on how to do that programmatically would be much appreciated!

Thank you very much


P.S. I may have inavertently duplicated this message… in case, I apologize for that!


@tferr Any thoughts?

Dear Curtis,
Thank you very much for your clarification! I’ll keep posting my questions here.
Everibody is busy! I totally udnerstand that



1 Like

Hi @fluzzati, sorry for the late reply. One way to accomplish #2 using the SNT API in a Jython script:

from sc.fiji.snt import Tree
from sc.fiji.snt.analysis import TreeAnalyzer

tree = Tree(swc_filepath)
analyzer = TreeAnalyzer(tree)
branch_list = analyzer.getBranches()

This decomposes the Tree into a list of segments (Path objects) which are either root -> branch point, branch point -> branch point, or branch point -> endpoint. One can then measure branch properties by calling Path methods on the elements of branch_list such as getLength(), getMeanRadius(), e.g., branch_list[0].getContraction(). Note that TreeAnalyzer(tree).getBranches() does not return a new Tree, but simply a list of Paths. The StrahlerAnalyzer class may also interest you. As for #1, I am not sure what the issue is there, @tferr would be more able to assist.

just to followup on SWC tags: SNT follows established convention, namely:
0 - undefined
1 - soma
2 - axon
3 - (basal) dendrite
4 - apical dendrite
5 - fork point (unused, interpreted as undefined)
6 - end point (unused, interpreted as undefined)
7 - custom

Neutube seems to adopt this nomenclature, so I’m not sure what the issue would be. But nevertheless, you should note that if you use any other non-standard neutube tag (example) it would not be recognized. In such cases, the best way would be to edit the SWC file, and replace such tags with the closest entry from the list above.

Dear @arshadic, Dear @tferr
Thank you all for your suggestions.
In the end we obtained the data we were looking for (and much more…) using L-measure.
But I’ll certainly try again SNT in the future!



1 Like