[0.4] BigBrain is not listed in `supported_spaces` of julich 2.9 and 2.5 parcellations
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']
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
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?
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.
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.
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.
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
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
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...)