Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.
This repository was archived by the owner on Feb 26, 2025. It is now read-only.

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

@ssssarah

Description

@ssssarah

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions