I’ve worked a couple of hours on a pipeline to analyze neurites branching off, and I’d like to share it.
It still needs a bit of tweaking, but I think I’ve brought it a good way through.
I just got some questions to get me going:
How do I get rid of the speckles and spots without erasing the neurites? Even using tubeness or a tophat, they are still there, and when they touch the neurite, they generate a lot of branches when I skeletonize the image afterwards. I have thought of running an erosion on the tubeness image, afterwards IdentifyPrimaryObjects, filtering out all the small objects whose FormFactor is near 1, or which are very small, and later running a dilation/closing to stitch my objects back together again. I dont know why, but it felt rather clumsy to me. I’m sure there must be a better way.
When I run MeasureNeurons with the neuron graph relationship, it’s always giving me the same error:
Traceback (most recent call last):
File "/Applications/CellProfiler2.0.app/Contents/Resources/lib/python2.6/cellprofiler/pipeline.py", line 309, in run
File "/Applications/CellProfiler2.0.app/Contents/Resources/lib/python2.6/cellprofiler/modules/measureneurons.py", line 350, in run
File "/Applications/CellProfiler2.0.app/Contents/Resources/lib/python2.6/cellprofiler/modules/measureneurons.py", line 675, in make_neuron_graph
File "/Applications/CellProfiler2.0.app/Contents/Resources/lib/python2.6/cellprofiler/cpmath/cpmorphology.py", line 3648, in pairwise_permutations
File "/Applications/CellProfiler2.0.app/Contents/Resources/lib/python2.6/scipy/sparse/csc.py", line 156, in __getitem__
File "/Applications/CellProfiler2.0.app/Contents/Resources/lib/python2.6/scipy/sparse/csr.py", line 259, in __getitem__
File "/Applications/CellProfiler2.0.app/Contents/Resources/lib/python2.6/scipy/sparse/csr.py", line 197, in check_bounds
IndexError: index (24) out of range
The output of MeasureNeurons (i checked it on another pipeline, where it worked ok) doesnt give the angles of the branches when they cross or branch off, or if its a 3 or 4 branch point. This is precious information if you want to know whether the neurites just passed around each other, or if it’s a real branch. There are so many cross-overs that I have to flag, or else I won’t get the real distance of the neurite before the next ‘real’ branch. Should I work on python , extending the module, write an ImageJ script, or you know any better option? Pruning branches would be another important aspect.
Any other suggestions are very welcome! Pipeline and images attached. I haven’t found a ready to use pipeline for this analysis elsewhere in the forum or in the examples area in the cp website. Have I missed something?
Sorry if it got too long for a single question =)
Thanks in advance!
Archive.zip (1.96 MB)