Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug loading morphologies in release #192

Open
lmanubens opened this issue Sep 7, 2023 · 5 comments
Open

Bug loading morphologies in release #192

lmanubens opened this issue Sep 7, 2023 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@lmanubens
Copy link

lmanubens commented Sep 7, 2023

Thank you for this amazing tool!

I tried to install both in Mac and CentOS Blender version 3.5 with the provided script, but it usually found issues with package versions in pip.
The only solution I got left was to use the release version. However, I noticed I was missing fragments of my SWCs.

After digging a bit in the code of the release, I found a bug in the function "update_section_parenting" in "2.80/scripts/addons/neuromorphovis/nmv/skeleton/ops/skeleton_construction_ops.py".

As it is in the released code, lines 58 and 66 compare the last and first indices of different sections and check if they are the same.
But the function should check whether the index and parent index of consecutive sections are the same.

Thus, modifying the mentioned lines to:
58: if section.samples[-1].index == i_section.samples[0].parent_index:
66: if section.samples[0].parent_index == i_section.samples[-1].index:
solves the issue.

@marwan-abdellah marwan-abdellah self-assigned this Sep 7, 2023
@marwan-abdellah marwan-abdellah added the bug Something isn't working label Sep 7, 2023
@marwan-abdellah
Copy link
Member

@lmanubens Thanks for the ticket. I understand indeed the pip issues, that's why I am working on a new version that should automate the installation of the dependencies ONLY when needed, so you don't have to make any installations up front. For the proposed solution, I will test it, but you please share the morphology that made the issue?

Thanks,

@lmanubens
Copy link
Author

Of course, I noticed it when comparing axon branches in e.g. Vaa3D and when importing the morphology in Neuromorphovis. I assume all subtrees were not being loaded.

I also assume this problem is not there with the morphio importer of latest versions.

Thanks again!

17302_00113_toprint_centered_2.swc.zip

@marwan-abdellah
Copy link
Member

@lmanubens I have managed loading your morphology without any issues with the latest version of the tool 1.9 (currently on master). As stated in the documentation, when I lforst oad the morphology I load only part of the axon (brnahcing order 2) so it doesn't look so cluttered. But then in the Morphology Toolbox, you can increaser the branching order as indicated in the following images.

morph-1 morph-2

Would you please confirm if you can get the same result to close the ticket.

@lmanubens
Copy link
Author

I see, I went through the documentation for input-output and don't recall seeing any mention of this.
I just tested with the release version I used (1.4.5, the only one on the releases page) and indeed it works as expected. Apologies for having missed that, but I would suggest adding this info to the input-output documentation page. This information is a bit hard to find if you don't know where to search it for.

@lmanubens
Copy link
Author

Another edit that may be considered is to increase the default branching order for axons also, as it is a bit counterintuitive to get a subset of the neuron as a default. It may make more sense to ask the user to input parameters for visualizing a subset rather than requiring them for visualizing the complete structure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

No branches or pull requests

2 participants