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

allow for neurites to be attached to neurites #977

Closed
wants to merge 3 commits into from

Conversation

arnaudon
Copy link
Contributor

@arnaudon arnaudon commented Dec 8, 2021

Proposal for #975

@arnaudon
Copy link
Contributor Author

arnaudon commented Dec 8, 2021

I'm not sure why trunk angle stuff is breaking... I'm looking

@arnaudon
Copy link
Contributor Author

arnaudon commented Dec 8, 2021

Test are passing but I'll add a little test for coverage later. Not convinced about the only_root option, to be discussed.

@eleftherioszisis
Copy link
Contributor

The idea that is presented here of traversing the trees to specify the heterogeneous types is in the right direction. However, our goal is towards a solution that doesn't mutate the Morphology or add extra properties just to serve a very specific use case.

NeuroM Morphology should be seen as a "view" of the MorphIO Morphology, therefore it should be a very thin layer on top of it, adapting the data so that NeuroM can consume it without changing it significantly.

Your approach makes perfect sense, however, I believe it is implemented in the wrong place. Instead, it should be during the feature calculation, where the careful handling of the subtrees is performed without changing the Morphology.

@mgeplf
Copy link
Collaborator

mgeplf commented Dec 8, 2021

I agree w/ @eleftherioszisis; I wonder if adding something to the Section in morphio would help: is_heterogenous(bool towards_root=false). Thus, s.is_heterogenous() would say if any downstream sections are of a different type than the current one, and s.is_heterogenous(true) would check the same, but towards the root.

Then, we can augment NeuroM traversals to check this property, and depending on the behavior we want (from a scientific point of view) the correct behavior is performed.

To me, the code side of things is different from an agreement on what is required from a scientific point of view - once that is decided, we can hash out the details of the implementation.

@arnaudon
Copy link
Contributor Author

arnaudon commented Dec 8, 2021

Imo it is still a view of MorphIO, and in fact, the current implementation is wrong.
A neurite is defined as:
Neurite: collection of consecutive sections of the same SectionType .

If SectionType changes along a branch in MorphIO, this definition is not correct anymore (thus this https://github.com/BlueBrain/NeuroR/blob/master/neuror/sanitize.py#L36). This PR provides a correct implementation of a Neurite object, as a particular view of what MorphIO represents.

@arnaudon
Copy link
Contributor Author

arnaudon commented Dec 8, 2021

@mgeplf I don't understand why we would need heterogeneous? Do you agree with def of Neurite in my previous message? If yes, I don't see why we need to mix NeuriteTypes at all.

@mgeplf
Copy link
Collaborator

mgeplf commented Dec 8, 2021

@arnaudon: Neurite: collection of consecutive sections of the same SectionType .

Yeah, that's the definition we need relax, as @lidakanari mentioned in #975 (comment):

This is a real effect, it cannot be considered as an error. In some rodent brain regions this can be as frequent as 70% of the data! So imo this should not be removed / sanitized.

@arnaudon
Copy link
Contributor Author

arnaudon commented Dec 8, 2021

So this is the correct definition, right? What do you mean relax? From what def to what def?

@mgeplf
Copy link
Collaborator

mgeplf commented Dec 8, 2021

ahhhh; I think I see where the confusion is coming in; I see a neurite is as something that grows off the soma of a cell. Thus, a neurite can start as a dendrite, coming off the soma, and then bifurcate into subtrees that have different types: one that continues as a dendrite, and part that is an axon.

Thus, the neurite is heterogenous, and the relaxation is that they are no longer all the same type.

Again, I'm not a scientist, just trying to understand.

@eleftherioszisis
Copy link
Contributor

As @mgeplf says we will need to bring the Neurite closer to what it represents in biology. That means we should allow different section types per neurite to cover the cases where the axon starts from the basal dendrite. We had the convention that a neurite has a single type, but as it is apparent it is not a correct one as it doesn't cover all cases in biology.

@arnaudon
Copy link
Contributor Author

arnaudon commented Dec 8, 2021

So the real question is: can we call an axon emerging from a basal, a Neurite. If yes, my implementation is valid, if no, your heterogeneous proposal is valid. Let me enquire.

@mgeplf
Copy link
Collaborator

mgeplf commented Dec 8, 2021

can we call an axon emerging from a basal, a Neurite. If yes, my implementation is valid, if no, your heterogeneous proposal is valid. Let me enquire.

I think there's more nuance to it:
a) Can a neurite be composed of heterogeneous section types?
b) must a neurite emerge from the soma, and what do we call a subtree of a neurite? Are people careful with this language?

@arnaudon
Copy link
Contributor Author

arnaudon commented Dec 8, 2021

To me:
a) yes, if you are interested in subtypes, such as trunk/obliques, etc... not if you are considering 'main' types axon/basal/apical.
b) according to standard definition yes, but these ABD are not standard at all (let see what Jean-marc says, he is one expert on these types of neurons). A subtree has a pretty clear and unique definition, no? All downward sections from a starting section, downward defined as opposite direction to the root node (cell body).

@mgeplf
Copy link
Collaborator

mgeplf commented Dec 8, 2021

Clearing up a) about the main types is important, so that should be the question posed. Also, I'm leery of mixing top level types (axon/dendrite) w/ the concept of trunk/oblique. The later are properties of sections, and there is ambiguity with them as different ppl have different definitions.

as for b: but these ABD are not standard at all, I interpret In some rodent brain regions this can be as frequent as 70% from @lidakanari as suggesting this is quite common. Perhaps not the ABD, but the heterogeneous neurites (ie: tree rooted at the soma composed of dendrite and axon

@lidakanari
Copy link
Contributor

lidakanari commented Dec 8, 2021

Clearing up a) about the main types is important, so that should be the question posed. Also, I'm leery of mixing top level types (axon/dendrite) w/ the concept of trunk/oblique. The later are properties of sections, and there is ambiguity with them as different ppl have different definitions.

I totally agree with this.

as for b: but these ABD are not standard at all, I interpret In some rodent brain regions this can be as frequent as 70% from @lidakanari as suggesting this is quite common. Perhaps not the ABD, but the heterogeneous neurites (ie: tree rooted at the soma composed of dendrite and axon

Indeed, this is quite common depending on species, brain region. They are actually called ACD, Axon-Carrying Dendrites. Here is a small reference:
https://www.sciencedirect.com/science/article/pii/S0896627314006886

In addition, @wvangeit, @mzbili can comment on this property with respect to functional implications.

@arnaudon
Copy link
Contributor Author

arnaudon commented Dec 8, 2021

Yes, here is another ref: https://www.frontiersin.org/articles/10.3389/fncel.2019.00570/full in 'misbheaving neurons'

Mickael told me he does not know if we can call such axon a Neurite, and does not care, as long as it can be differentiated from the other neurites.

@arnaudon
Copy link
Contributor Author

arnaudon commented Dec 8, 2021

Figure 4 of the paper cited by lida is good in fact, to know how to model these guys.

@mgeplf
Copy link
Collaborator

mgeplf commented Dec 8, 2021

Agreed that Fig 4 is key:
image

The question to me is; how many neurites are represented by the red and blue regions?
What do you think, @lidakanari, @wvangeit?

@mzbili
Copy link

mzbili commented Dec 8, 2021

Clearing up a) about the main types is important, so that should be the question posed. Also, I'm leery of mixing top level types (axon/dendrite) w/ the concept of trunk/oblique. The later are properties of sections, and there is ambiguity with them as different ppl have different definitions.

I totally agree with this.

as for b: but these ABD are not standard at all, I interpret In some rodent brain regions this can be as frequent as 70% from @lidakanari as suggesting this is quite common. Perhaps not the ABD, but the heterogeneous neurites (ie: tree rooted at the soma composed of dendrite and axon

Indeed, this is quite common depending on species, brain region. They are actually called ACD, Axon-Carrying Dendrites. Here is a small reference: https://www.sciencedirect.com/science/article/pii/S0896627314006886

In addition, @wvangeit, @mzbili can comment on this property with respect to functional implications.

Hi, I am not an expert on ABD but I know it is a growing field. If I understand well, the major functional impact to take into account ABD in the models in the fact the the ABD present different electrophysiological properties than non-ABD. To be clear, it means that to model ABD one has to differenciates dendrite and axon but also to differenciates dendrite that carries axon from all the other dendrites (and have different ephys properties in the dendrite that carries axon than in other dendrites). I am not sure that is the kind of precision the models from BBP wants to have...

@eleftherioszisis
Copy link
Contributor

eleftherioszisis commented Dec 8, 2021

If the AcD dendrite is fundamentally different than a basal_dendrite, then we could introduce a new section type axon_carrying_dendrite in MorphIO (the axon subtree sections would still be of section type axon). NeuroM would deduce the respective neurite type as axon_carrying_dendrite, in which case we could easily target these neurites to perform separate morphometric analysis to their subtrees.

@lidakanari
Copy link
Contributor

I agree that these use cases should be handled different from regular dendrites and axons (so the is_heterogenous proposal is certainly of interest).

So we have two points that need to be taken into account:

  1. What is the impact on the axon (we already have some info on this from above reference). If axon starts from dendrite we need to consider a different AIS and the initial diameter is not the one we see on the soma surface!
  2. What is the impact on the dendrite (because we fully simulate the dendrites but only AIS this is even more important for simulations). We cannot compute morphometrics including the axon, so this part needs to be a "different" neurite. I assume the initial / trunk diameter that should be considered in the one on the soma and not the one on the first bifurcation.

So to reply to @mgeplf we need to have two neurites: one axon (blue) starting from the dendrite, one dendrite (red) starting from the soma but excluding the axon. These are just suggestions from my side, I think the impact on morphometrics will be important but the impact on electrical models might be even more significant so let's see what they think.

@mzbili
Copy link

mzbili commented Dec 8, 2021

If the AcD dendrite is fundamentally different than a basal_dendrite, then we could introduce a new section type axon_carrying_dendrite in MorphIO (the axon subtree sections would still be of section type axon). NeuroM would deduce the respective neurite type as axon_carrying_dendrite, in which case we could easily target these neurites to perform separate morphometric analysis to their subtrees.

Hi, I think that scientifically it could be really interesting. In fact, some people have shown that AcD might present a bigger number of branches than non-AcD. Again, it depends on the precision we want for the models

@arnaudon
Copy link
Contributor Author

arnaudon commented Dec 8, 2021

So to reply to @mgeplf we need to have two neurites: one axon (blue) starting from the dendrite, one dendrite (red) starting from the soma but excluding the axon. These are just suggestions from my side, I think the impact on morphometrics will be important but the impact on electrical models might be even more significant so let's see what they think.

Isn't this exactly what this PR does?

Remember, simulations don't need neurom, only morphological features depend on neurom.
I agree, we can somehow flag the ABD, or add a special filter in neurom. We can just extract the list of basals which have an axon on them in the feature computation.

@eleftherioszisis
Copy link
Contributor

eleftherioszisis commented Dec 8, 2021

So to reply to @mgeplf we need to have two neurites: one axon (blue) starting from the dendrite, one dendrite (red) starting from the soma but excluding the axon. These are just suggestions from my side, I think the impact on morphometrics will be important but the impact on electrical models might be even more significant so let's see what they think.

Just to clarify in case this is an issue of different definitions: Given that by definition a cell neurite starts from the soma, imho we need a dedicated neurite type that would reflect these compound neurites as a whole and not make a Morphology have separate neurite objects for each subtree.

@arnaudon
Copy link
Contributor Author

arnaudon commented Dec 8, 2021

The only issue I see for neurom is for trunk angles, because angles between normal neurites and this axon don't make sense anymore. We could add a neurite attribute .at_soma or something to filter these out in some feature computations (or only retain them). The path lengths will be the length from the basal/axon bif, but that's fine, no? Imho, we should just make the user aware he/she is dealing with this special case, so he/she needs to know how to interpret some features.

@arnaudon
Copy link
Contributor Author

BlueBrain/MorphIO#361 so asc files don't allow for this axon bearing dendrites, right?

@arnaudon
Copy link
Contributor Author

As just noticed with @annakristinkaufmann on the SEU morphologies, we are a bit stuck with this:
we have to run sanitize on the original .swc, but we get hit by: https://github.com/BlueBrain/NeuroR/blob/master/neuror/sanitize.py#L36 which should not raise but be handled properly with our codes. It does not even seem we can pass this hurdle by converting go .asc (BlueBrain/MorphIO#361). So these morphologies are not currently usable by us.

@eleftherioszisis
Copy link
Contributor

As just noticed with @annakristinkaufmann on the SEU morphologies, we are a bit stuck with this:
we have to run sanitize on the original .swc, but we get hit by: https://github.com/BlueBrain/NeuroR/blob/master/neuror/sanitize.py#L36 which should not raise but be handled properly with our codes. It does not even seem we can pass this hurdle by converting go .asc (BlueBrain/MorphIO#361). So these morphologies are not currently usable by us.

Could you please move that to an issue in NeuroR so that we can keep track of it?

@arnaudon
Copy link
Contributor Author

sovled here for mcar: BlueBrain/morphology-workflows#62

@arnaudon arnaudon closed this Sep 22, 2022
@arnaudon arnaudon deleted the axon_bearing_dendrites branch September 22, 2022 14:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants