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

[0.4] BigBrain is not listed in supported_spaces of julich 2.9 and 2.5 parcellations #239

Closed
AhmetNSimsek opened this issue Jan 11, 2023 · 8 comments · Fixed by #635
Closed
Assignees
Labels
enhancement New feature or request maintenance Not a bug or breaking issue. Code maintenance related.

Comments

@AhmetNSimsek
Copy link
Collaborator

When supported spaces of parcellations julich 2.9 and 2.5 are asked, siibra (refactor_v0.4a25) does not list BigBrain.

import siibra
[s.name for s in siibra.parcellations["2.9"].supported_spaces]

current output:

['MNI 152 ICBM 2009c Nonlinear Asymmetric',
 'hcp32k',
 'MNI Colin 27',
 'fsaverage',
 'fsaverage6']
@xgui3783
Copy link
Member

xgui3783 commented Jan 11, 2023

Issue is likely due to https://github.com/FZJ-INM1-BDA/siibra-python/blob/abbecac/siibra/core/region.py#L422

A parcellation is considered supported in a space if and only if all of the children are mapped in that space.

It should be any IMO

edit: as a result, since some region in jba2.9 is not mapped in big brain, it is not returned as one of the supported regions

cc @dickscheid

@dickscheid
Copy link
Contributor

It is not clear to me wether this is the right solution. I would say that the parcellation does not support BigBrain space, since only some regions are available there. There is no access to a complete parcellation map in BigBrain. Is this a concrete problem in some application?

@dickscheid
Copy link
Contributor

Of course we could easily change the line, but then big brain will be considered to produce a representative parcellationmap, which it can't for the complete parcellation.

@AhmetNSimsek
Copy link
Collaborator Author

I was considering from the user perspective and was checking which maps are available through the the tools we have equipped users with the tutorials. While these maps are available, they are not accessible if one does not know about them.

@xgui3783
Copy link
Member

There is no access to a complete parcellation map in BigBrain. Is this a concrete problem in some application?

not so much a problem at the moment, but semantically looks strange, since it seems julich brain 2.9 is not supported in big brain (which we know is not the case)

I wonder if https://github.com/FZJ-INM1-BDA/siibra-python/blob/abbecac/siibra/core/region.py#L435 , instead of returning a boolean, should return an enum, MAP_COVERAGE, which can be FULL, PARTIAL, NONE.

we can then also overwrite the __bool__ method to map FULL to truthy , and rest to falsey to preserve current behaviour. User could iterate and find all partial matches, if they are interested.

@xgui3783 xgui3783 changed the title BigBrain is not listed in supported_spaces of julich 2.9 and 2.5 parcellations [0.4] BigBrain is not listed in supported_spaces of julich 2.9 and 2.5 parcellations Jan 17, 2023
@xgui3783 xgui3783 added bug Something isn't working 0.4 labels Jan 17, 2023
@AhmetNSimsek AhmetNSimsek removed bug Something isn't working 0.4 labels Jan 31, 2023
@AhmetNSimsek AhmetNSimsek changed the title [0.4] BigBrain is not listed in supported_spaces of julich 2.9 and 2.5 parcellations [0.5] BigBrain is not listed in supported_spaces of julich 2.9 and 2.5 parcellations Jan 31, 2023
@AhmetNSimsek AhmetNSimsek added enhancement New feature or request maintenance Not a bug or breaking issue. Code maintenance related. version 1.0 and removed version 1.0 labels Apr 18, 2023
@AhmetNSimsek
Copy link
Collaborator Author

What do you think of the following?

@property
def supported_spaces(self) -> Set[_space.Space]:
    """
    The set of spaces for which a mask could be extracted.
    Overwrites the corresponding method of AtlasConcept.
    """
    if self._supported_spaces is None:
        if isinstance(self, _parcellation.Parcellation):
            mapdf = parcellationmap.Map.registry().dataframe
            self._supported_spaces = set(
                mapdf[mapdf.parcellation == self.name].space.values
            )
        else:
            self._supported_spaces = {s for s in _space.Space.registry() if self.mapped_in_space(s)}
    return self._supported_spaces

@xgui3783
Copy link
Member

This is an interesting point.

With the recent decision that JBA parc is to be revised with the full ontology, the supported_spaces needs to be revisited.

@dickscheid is it still the case that

It is not clear to me wether this is the right solution. I would say that the parcellation does not support BigBrain space, since only some regions are available there. There is no access to a complete parcellation map in BigBrain. Is this a concrete problem in some application?

? if this is the case, then jba2.9 is not defined in any of the spaces, because there are always some regions that are not mapped

@AhmetNSimsek AhmetNSimsek changed the title [0.5] BigBrain is not listed in supported_spaces of julich 2.9 and 2.5 parcellations [0.4] BigBrain is not listed in supported_spaces of julich 2.9 and 2.5 parcellations Aug 2, 2023
@dickscheid
Copy link
Contributor

I am in favor of agreeing with you, but I have a feeling that there were downstream issues then (e.g. JBA supported by BigBrain). I think I remember something that it could pop up as a default and then provide an incomplete map. Can you please double- check where inside siibra this function is used? If only user facing, I agree with you that we should return as soon as a part of the regions are mapped.

an alternative would be to get rid of it alltogether, and rely on the function being defined for particular regions. for the parcellation, we could then rather return a measure (number of regions mapped in the space, or percentage of them...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request maintenance Not a bug or breaking issue. Code maintenance related.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants