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

Morphology check has_no_narrow_start raises Exception because a neurite's root node has only one point #1133

Open
ssssarah opened this issue Nov 4, 2024 · 1 comment

Comments

@ssssarah
Copy link

ssssarah commented Nov 4, 2024

Reproduction:

from morphio import Morphology
from neurom import load_morphology
from neurom.check import morphology_checks

# morphology_id: https://bbp.epfl.ch/neurosciencegraph/data/neuronmorphologies/ec4d9eae-5e0a-4409-a45d-ec5ec6dc3223
# morphology_self: https://bbp.epfl.ch/nexus/v1/resources/bbp-external/seu/_/https:%2F%2Fbbp.epfl.ch%2Fneurosciencegraph%2Fdata%2Fneuronmorphologies%2Fec4d9eae-5e0a-4409-a45d-ec5ec6dc3223
swc_path = ".../18455_00141.swc"

morphology = load_morphology(Morphology(swc_path), process_subtrees=True)

for neurite in morphology.neurites:
    r = neurite.root_node.points
    print(len(r))

# OUTPUT

# 104
# 9
# 467
# 58
# 6
# 25
# 23
# 1
# 1
# 3
# 132

fail = morphology_checks.has_no_narrow_start(morphology, frac=0.9)

Should all neurites' root node have at least 2 points?

@mgeplf
Copy link
Collaborator

mgeplf commented Nov 28, 2024

Sorry for the long delay, other things have had priority.

Should all neurites' root node have at least 2 points?

Yes, that is an invariant in MorphIO, it seems it's been broken.
I have a fix here: BlueBrain/MorphIO#516
You can get the artifcats here:
https://github.com/BlueBrain/MorphIO/actions/runs/12069198211

I would be interested to know if it modifies any other morphometrics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants