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

Incorrect segment groups imported from NML #1456

Closed
thorstenhater opened this issue Mar 24, 2021 · 3 comments
Closed

Incorrect segment groups imported from NML #1456

thorstenhater opened this issue Mar 24, 2021 · 3 comments
Labels
arbor IO IO support in arborio bug neuroml NeuroML support in Arbor

Comments

@thorstenhater
Copy link
Contributor

The points/morphology is getting imported fine, but the segment groups are not correct, e.g. the soma is going in the dendrite_group too, etc.

See NeuroML/NeuroML2#144

@thorstenhater thorstenhater added bug arbor IO IO support in arborio neuroml NeuroML support in Arbor labels Mar 24, 2021
@noraabiakar
Copy link
Contributor

noraabiakar commented Mar 24, 2021

I was playing with this the other day and it seemed to be working fine.

>>> import arbor
>>> tmp = arbor.neuroml("BallAndStick.cell.nml")
>>> morph = tmp.cell_morphology("BallAndStick")
>>> ns = morph.groups()
>>> print(ns)
(label_dict (region  "all" (join (join (join (join (join (join (join (join (join (join (join nil (join nil (segment 0))) (join nil (segment 1))) (join nil (segment 2))) (join nil (segment 3))) (join nil (segment 4))) (join nil (segment 5))) (join nil (segment 6))) (join nil (segment 7))) (join nil (segment 8))) (join nil (segment 9))) (join nil (segment 10)))) (region  "soma_group" (join nil (join nil (segment 0)))) (region  "dendrite_group" (join (join (join (join (join (join (join (join (join (join nil (join nil (segment 1))) (join nil (segment 2))) (join nil (segment 3))) (join nil (segment 4))) (join nil (segment 5))) (join nil (segment 6))) (join nil (segment 7))) (join nil (segment 8))) (join nil (segment 9))) (join nil (segment 10)))))

Simplified region expressions:

(label_dict 
 (region  "all" (join (segment 0) (segment 1) (segment 2) (segment 3) (segment 4) (segment 5) (segment 6) (segment 7) (segment 8) (segment 9) (segment 10))) 
 (region  "soma_group" (segment 0)) 
 (region  "dendrite_group" (join (segment 1) (segment 2) (segment 3) (segment 4) (segment 5) (segment 6) (segment 7) (segment 8) (segment 9) (segment 10))))

Edit: the following also appears correct:

>>> ns = morph.group_segments
>>> print(ns)
{'dendrite_group': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 'soma_group': [0], 'all': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]}

@thorstenhater
Copy link
Contributor Author

Here's the result I see when loading in the GUI:

Dendrite Group

(join (join (join (join (join (join (join (join (join (join nil (join nil (segment 1))) (join nil (segment 2))) (join nil (segment 3))) (join nil (segment 4))) (join nil (segment 5))) (join nil (segment 6))) (join nil (segment 7))) (join nil (segment 8))) (join nil (segment 9))) (join nil (segment 10)))

flattening into a list this is segments [1-10]
Soma Group

(join nil (join nil (segment 0)))

which is just [0]. So, identical to your results.

In the GUI it appears that segments [0, 1] are in the groups Soma, Dendrite, All.

@thorstenhater
Copy link
Contributor Author

This turned out to be a feature, not a bug.

See thorstenhater/arbor-gui#31

akuesters pushed a commit to akuesters/arbor that referenced this issue Aug 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arbor IO IO support in arborio bug neuroml NeuroML support in Arbor
Projects
None yet
Development

No branches or pull requests

2 participants