siibra 0.4a80__tar.gz → 0.4a82__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of siibra might be problematic. Click here for more details.
- {siibra-0.4a80/siibra.egg-info → siibra-0.4a82}/PKG-INFO +1 -1
- siibra-0.4a82/siibra/VERSION +1 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/configuration/factory.py +14 -2
- {siibra-0.4a80 → siibra-0.4a82}/siibra/core/atlas.py +3 -2
- {siibra-0.4a80 → siibra-0.4a82}/siibra/core/concept.py +13 -3
- {siibra-0.4a80 → siibra-0.4a82}/siibra/core/parcellation.py +3 -1
- {siibra-0.4a80 → siibra-0.4a82}/siibra/core/region.py +3 -1
- {siibra-0.4a80 → siibra-0.4a82}/siibra/core/space.py +2 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/features/connectivity/regional_connectivity.py +2 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/features/feature.py +16 -5
- {siibra-0.4a80 → siibra-0.4a82}/siibra/features/image/image.py +3 -1
- {siibra-0.4a80 → siibra-0.4a82}/siibra/features/tabular/cell_density_profile.py +3 -1
- {siibra-0.4a80 → siibra-0.4a82}/siibra/features/tabular/cortical_profile.py +4 -2
- {siibra-0.4a80 → siibra-0.4a82}/siibra/features/tabular/layerwise_cell_density.py +3 -1
- {siibra-0.4a80 → siibra-0.4a82}/siibra/features/tabular/receptor_density_fingerprint.py +3 -1
- {siibra-0.4a80 → siibra-0.4a82}/siibra/features/tabular/receptor_density_profile.py +3 -1
- {siibra-0.4a80 → siibra-0.4a82}/siibra/features/tabular/regional_timeseries_activity.py +4 -2
- {siibra-0.4a80 → siibra-0.4a82}/siibra/features/tabular/tabular.py +4 -2
- {siibra-0.4a80 → siibra-0.4a82}/siibra/livequeries/bigbrain.py +34 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/retrieval/datasets.py +4 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/volumes/parcellationmap.py +3 -1
- {siibra-0.4a80 → siibra-0.4a82}/siibra/volumes/sparsemap.py +3 -1
- {siibra-0.4a80 → siibra-0.4a82}/siibra/volumes/volume.py +13 -0
- {siibra-0.4a80 → siibra-0.4a82/siibra.egg-info}/PKG-INFO +1 -1
- siibra-0.4a80/siibra/VERSION +0 -1
- {siibra-0.4a80 → siibra-0.4a82}/LICENSE +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/MANIFEST.in +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/README.rst +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/setup.cfg +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/setup.py +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/__init__.py +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/commons.py +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/configuration/__init__.py +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/configuration/configuration.py +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/core/__init__.py +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/core/relation_qualification.py +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/explorer/__init__.py +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/explorer/url.py +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/explorer/util.py +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/features/__init__.py +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/features/anchor.py +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/features/connectivity/__init__.py +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/features/connectivity/functional_connectivity.py +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/features/connectivity/streamline_counts.py +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/features/connectivity/streamline_lengths.py +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/features/connectivity/tracing_connectivity.py +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/features/dataset/__init__.py +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/features/dataset/ebrains.py +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/features/image/__init__.py +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/features/image/sections.py +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/features/image/volume_of_interest.py +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/features/tabular/__init__.py +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/features/tabular/bigbrain_intensity_profile.py +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/features/tabular/gene_expression.py +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/features/tabular/layerwise_bigbrain_intensities.py +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/livequeries/__init__.py +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/livequeries/allen.py +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/livequeries/ebrains.py +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/livequeries/query.py +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/locations/__init__.py +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/locations/boundingbox.py +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/locations/location.py +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/locations/point.py +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/locations/pointset.py +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/retrieval/__init__.py +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/retrieval/cache.py +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/retrieval/exceptions/__init__.py +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/retrieval/repositories.py +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/retrieval/requests.py +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/vocabularies/__init__.py +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/vocabularies/gene_names.json +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/vocabularies/receptor_symbols.json +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/vocabularies/region_aliases.json +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/volumes/__init__.py +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/volumes/gifti.py +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/volumes/neuroglancer.py +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra/volumes/nifti.py +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra.egg-info/SOURCES.txt +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra.egg-info/dependency_links.txt +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra.egg-info/requires.txt +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/siibra.egg-info/top_level.txt +0 -0
- {siibra-0.4a80 → siibra-0.4a82}/test/test_siibra.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: siibra
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4a82
|
|
4
4
|
Summary: siibra - Software interfaces for interacting with brain atlases
|
|
5
5
|
Home-page: https://github.com/FZJ-INM1-BDA/siibra-python
|
|
6
6
|
Author: Big Data Analytics Group, Forschungszentrum Juelich, Institute of Neuroscience and Medicine (INM-1)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.4a82
|
|
@@ -187,6 +187,7 @@ class Factory:
|
|
|
187
187
|
modality=spec.get("modality"),
|
|
188
188
|
publications=spec.get("publications", []),
|
|
189
189
|
datasets=cls.extract_datasets(spec),
|
|
190
|
+
prerelease=spec.get("prerelease", False),
|
|
190
191
|
)
|
|
191
192
|
|
|
192
193
|
@classmethod
|
|
@@ -200,6 +201,7 @@ class Factory:
|
|
|
200
201
|
datasets=cls.extract_datasets(spec),
|
|
201
202
|
rgb=spec.get("rgb", None),
|
|
202
203
|
spec=spec,
|
|
204
|
+
prerelease=spec.get("prerelease", False),
|
|
203
205
|
)
|
|
204
206
|
|
|
205
207
|
@classmethod
|
|
@@ -222,6 +224,7 @@ class Factory:
|
|
|
222
224
|
modality=spec.get('modality', ""),
|
|
223
225
|
publications=spec.get("publications", []),
|
|
224
226
|
datasets=cls.extract_datasets(spec),
|
|
227
|
+
prerelease=spec.get("prerelease", False),
|
|
225
228
|
)
|
|
226
229
|
|
|
227
230
|
# add version object, if any is specified
|
|
@@ -299,7 +302,8 @@ class Factory:
|
|
|
299
302
|
description=spec.get("description"),
|
|
300
303
|
modality=spec.get("modality"),
|
|
301
304
|
publications=spec.get("publications", []),
|
|
302
|
-
datasets=cls.extract_datasets(spec)
|
|
305
|
+
datasets=cls.extract_datasets(spec),
|
|
306
|
+
prerelease=spec.get("prerelease", False),
|
|
303
307
|
)
|
|
304
308
|
|
|
305
309
|
@classmethod
|
|
@@ -352,6 +356,7 @@ class Factory:
|
|
|
352
356
|
tsvfile=spec['file'],
|
|
353
357
|
anchor=cls.extract_anchor(spec),
|
|
354
358
|
datasets=cls.extract_datasets(spec),
|
|
359
|
+
prerelease=spec.get("prerelease", False),
|
|
355
360
|
)
|
|
356
361
|
|
|
357
362
|
@classmethod
|
|
@@ -362,6 +367,7 @@ class Factory:
|
|
|
362
367
|
layerfiles=spec['layerfiles'],
|
|
363
368
|
anchor=cls.extract_anchor(spec),
|
|
364
369
|
datasets=cls.extract_datasets(spec),
|
|
370
|
+
prerelease=spec.get("prerelease", False),
|
|
365
371
|
)
|
|
366
372
|
|
|
367
373
|
@classmethod
|
|
@@ -372,6 +378,7 @@ class Factory:
|
|
|
372
378
|
tsvfile=spec['file'],
|
|
373
379
|
anchor=cls.extract_anchor(spec),
|
|
374
380
|
datasets=cls.extract_datasets(spec),
|
|
381
|
+
prerelease=spec.get("prerelease", False),
|
|
375
382
|
)
|
|
376
383
|
|
|
377
384
|
@classmethod
|
|
@@ -383,6 +390,7 @@ class Factory:
|
|
|
383
390
|
url=spec['file'],
|
|
384
391
|
anchor=cls.extract_anchor(spec),
|
|
385
392
|
datasets=cls.extract_datasets(spec),
|
|
393
|
+
prerelease=spec.get("prerelease", False),
|
|
386
394
|
)
|
|
387
395
|
|
|
388
396
|
@classmethod
|
|
@@ -395,6 +403,7 @@ class Factory:
|
|
|
395
403
|
"space_spec": vol._space_spec,
|
|
396
404
|
"providers": vol._providers.values(),
|
|
397
405
|
"datasets": cls.extract_datasets(spec),
|
|
406
|
+
"prerelease": spec.get("prerelease", False),
|
|
398
407
|
}
|
|
399
408
|
modality = spec.get('modality', "")
|
|
400
409
|
if modality == "cell body staining":
|
|
@@ -412,6 +421,7 @@ class Factory:
|
|
|
412
421
|
"space_spec": vol._space_spec,
|
|
413
422
|
"providers": vol._providers.values(),
|
|
414
423
|
"datasets": cls.extract_datasets(spec),
|
|
424
|
+
"prerelease": spec.get("prerelease", False),
|
|
415
425
|
}
|
|
416
426
|
modality = spec.get('modality', "")
|
|
417
427
|
if modality == "cell body staining":
|
|
@@ -461,6 +471,7 @@ class Factory:
|
|
|
461
471
|
"anchor": cls.extract_anchor(spec),
|
|
462
472
|
"description": spec.get("description", ""),
|
|
463
473
|
"datasets": cls.extract_datasets(spec),
|
|
474
|
+
"prerelease": spec.get("prerelease", False),
|
|
464
475
|
}
|
|
465
476
|
if modality == "StreamlineCounts":
|
|
466
477
|
return connectivity.StreamlineCounts(**kwargs)
|
|
@@ -491,7 +502,8 @@ class Factory:
|
|
|
491
502
|
"anchor": cls.extract_anchor(spec),
|
|
492
503
|
"description": spec.get("description", ""),
|
|
493
504
|
"datasets": cls.extract_datasets(spec),
|
|
494
|
-
"timestep": spec.get("timestep", ("1 no_unit"))
|
|
505
|
+
"timestep": spec.get("timestep", ("1 no_unit")),
|
|
506
|
+
"prerelease": spec.get("prerelease", False),
|
|
495
507
|
}
|
|
496
508
|
if modality == "Regional BOLD signal":
|
|
497
509
|
kwargs["paradigm"] = spec.get("paradigm", "")
|
|
@@ -30,14 +30,15 @@ class Atlas(concept.AtlasConcept, configuration_folder="atlases"):
|
|
|
30
30
|
spaces, as well as common functionalities of those.
|
|
31
31
|
"""
|
|
32
32
|
|
|
33
|
-
def __init__(self, identifier: str, name: str, species: Species):
|
|
33
|
+
def __init__(self, identifier: str, name: str, species: Species, prerelease: bool = False):
|
|
34
34
|
"""Construct an empty atlas object with a name and identifier."""
|
|
35
35
|
|
|
36
36
|
concept.AtlasConcept.__init__(
|
|
37
37
|
self,
|
|
38
38
|
identifier=identifier,
|
|
39
39
|
name=name,
|
|
40
|
-
species=species
|
|
40
|
+
species=species,
|
|
41
|
+
prerelease=prerelease
|
|
41
42
|
)
|
|
42
43
|
self._parcellation_ids: List[str] = []
|
|
43
44
|
self._space_ids: List[str] = []
|
|
@@ -51,7 +51,8 @@ class AtlasConcept:
|
|
|
51
51
|
modality: str = "",
|
|
52
52
|
publications: List[TypePublication] = [],
|
|
53
53
|
datasets: List['TypeDataset'] = [],
|
|
54
|
-
spec=None
|
|
54
|
+
spec=None,
|
|
55
|
+
prerelease: bool = False,
|
|
55
56
|
):
|
|
56
57
|
"""
|
|
57
58
|
Construct a new atlas concept base object.
|
|
@@ -78,7 +79,7 @@ class AtlasConcept:
|
|
|
78
79
|
The preconfigured specification.
|
|
79
80
|
"""
|
|
80
81
|
self._id = identifier
|
|
81
|
-
self.name = name
|
|
82
|
+
self.name = name if not prerelease else f"[PRERELEASE] {name}"
|
|
82
83
|
self._species_cached = None if species is None \
|
|
83
84
|
else Species.decode(species) # overwritable property implementation below
|
|
84
85
|
self.shortname = shortname
|
|
@@ -87,6 +88,7 @@ class AtlasConcept:
|
|
|
87
88
|
self._publications = publications
|
|
88
89
|
self.datasets = datasets
|
|
89
90
|
self._spec = spec
|
|
91
|
+
self._prerelease = prerelease
|
|
90
92
|
|
|
91
93
|
@property
|
|
92
94
|
def description(self):
|
|
@@ -99,7 +101,15 @@ class AtlasConcept:
|
|
|
99
101
|
|
|
100
102
|
@property
|
|
101
103
|
def LICENSE(self) -> str:
|
|
102
|
-
|
|
104
|
+
licenses = []
|
|
105
|
+
for ds in self.datasets:
|
|
106
|
+
if ds.LICENSE is None or ds.LICENSE == "No license information is found.":
|
|
107
|
+
continue
|
|
108
|
+
if isinstance(ds.LICENSE, str):
|
|
109
|
+
licenses.append(ds.LICENSE)
|
|
110
|
+
if isinstance(ds.LICENSE, list):
|
|
111
|
+
licenses.extend(ds.LICENSE)
|
|
112
|
+
return '\n'.join(licenses)
|
|
103
113
|
|
|
104
114
|
@property
|
|
105
115
|
def doi_or_url(self) -> str:
|
|
@@ -82,6 +82,7 @@ class Parcellation(region.Region, configuration_folder="parcellations"):
|
|
|
82
82
|
modality: str = None,
|
|
83
83
|
publications: list = [],
|
|
84
84
|
datasets: list = [],
|
|
85
|
+
prerelease: bool = False,
|
|
85
86
|
):
|
|
86
87
|
"""
|
|
87
88
|
Constructs a new parcellation object.
|
|
@@ -118,7 +119,8 @@ class Parcellation(region.Region, configuration_folder="parcellations"):
|
|
|
118
119
|
description=description,
|
|
119
120
|
publications=publications,
|
|
120
121
|
datasets=datasets,
|
|
121
|
-
modality=modality
|
|
122
|
+
modality=modality,
|
|
123
|
+
prerelease=prerelease,
|
|
122
124
|
)
|
|
123
125
|
self._species_cached = Species.decode(species)
|
|
124
126
|
self._id = identifier
|
|
@@ -82,6 +82,7 @@ class Region(anytree.NodeMixin, concept.AtlasConcept):
|
|
|
82
82
|
datasets: list = [],
|
|
83
83
|
rgb: str = None,
|
|
84
84
|
spec=None,
|
|
85
|
+
prerelease: bool = False,
|
|
85
86
|
):
|
|
86
87
|
"""
|
|
87
88
|
Constructs a new Region object.
|
|
@@ -119,7 +120,8 @@ class Region(anytree.NodeMixin, concept.AtlasConcept):
|
|
|
119
120
|
modality=modality,
|
|
120
121
|
publications=publications,
|
|
121
122
|
datasets=datasets,
|
|
122
|
-
spec=spec
|
|
123
|
+
spec=spec,
|
|
124
|
+
prerelease=prerelease,
|
|
123
125
|
)
|
|
124
126
|
|
|
125
127
|
# anytree node will take care to use this appropriately
|
|
@@ -39,6 +39,7 @@ class Space(AtlasConcept, configuration_folder="spaces"):
|
|
|
39
39
|
modality: str = "",
|
|
40
40
|
publications: list = [],
|
|
41
41
|
datasets: list = [],
|
|
42
|
+
prerelease: bool = False,
|
|
42
43
|
):
|
|
43
44
|
"""
|
|
44
45
|
Constructs a new parcellation object.
|
|
@@ -76,6 +77,7 @@ class Space(AtlasConcept, configuration_folder="spaces"):
|
|
|
76
77
|
modality=modality,
|
|
77
78
|
publications=publications,
|
|
78
79
|
datasets=datasets,
|
|
80
|
+
prerelease=prerelease,
|
|
79
81
|
)
|
|
80
82
|
self.volumes = volumes
|
|
81
83
|
for v in self.volumes:
|
|
@@ -51,6 +51,7 @@ class RegionalConnectivity(Feature):
|
|
|
51
51
|
anchor: _anchor.AnatomicalAnchor,
|
|
52
52
|
description: str = "",
|
|
53
53
|
datasets: list = [],
|
|
54
|
+
prerelease: bool = False,
|
|
54
55
|
):
|
|
55
56
|
"""
|
|
56
57
|
Construct a parcellation-averaged connectivity matrix.
|
|
@@ -84,6 +85,7 @@ class RegionalConnectivity(Feature):
|
|
|
84
85
|
description=description or '\n'.join({ds.description for ds in datasets}),
|
|
85
86
|
anchor=anchor,
|
|
86
87
|
datasets=datasets,
|
|
88
|
+
prerelease=prerelease,
|
|
87
89
|
)
|
|
88
90
|
self.cohort = cohort.upper()
|
|
89
91
|
self._connector = connector
|
|
@@ -26,8 +26,8 @@ from collections import defaultdict
|
|
|
26
26
|
from zipfile import ZipFile
|
|
27
27
|
|
|
28
28
|
if TYPE_CHECKING:
|
|
29
|
-
from ..retrieval.datasets import
|
|
30
|
-
TypeDataset =
|
|
29
|
+
from ..retrieval.datasets import EbrainsBaseDataset
|
|
30
|
+
TypeDataset = EbrainsBaseDataset
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
class ParseLiveQueryIdException(Exception):
|
|
@@ -92,7 +92,8 @@ class Feature:
|
|
|
92
92
|
modality: str,
|
|
93
93
|
description: str,
|
|
94
94
|
anchor: _anchor.AnatomicalAnchor,
|
|
95
|
-
datasets: List['TypeDataset'] = []
|
|
95
|
+
datasets: List['TypeDataset'] = [],
|
|
96
|
+
prerelease: bool = False,
|
|
96
97
|
):
|
|
97
98
|
"""
|
|
98
99
|
Parameters
|
|
@@ -109,6 +110,7 @@ class Feature:
|
|
|
109
110
|
self._description = description
|
|
110
111
|
self._anchor_cached = anchor
|
|
111
112
|
self.datasets = datasets
|
|
113
|
+
self._prerelease = prerelease
|
|
112
114
|
|
|
113
115
|
@property
|
|
114
116
|
def modality(self):
|
|
@@ -162,7 +164,15 @@ class Feature:
|
|
|
162
164
|
|
|
163
165
|
@property
|
|
164
166
|
def LICENSE(self) -> str:
|
|
165
|
-
|
|
167
|
+
licenses = []
|
|
168
|
+
for ds in self.datasets:
|
|
169
|
+
if ds.LICENSE is None or ds.LICENSE == "No license information is found.":
|
|
170
|
+
continue
|
|
171
|
+
if isinstance(ds.LICENSE, str):
|
|
172
|
+
licenses.append(ds.LICENSE)
|
|
173
|
+
if isinstance(ds.LICENSE, list):
|
|
174
|
+
licenses.extend(ds.LICENSE)
|
|
175
|
+
return '\n'.join(licenses)
|
|
166
176
|
|
|
167
177
|
@property
|
|
168
178
|
def doi_or_url(self) -> str:
|
|
@@ -183,7 +193,8 @@ class Feature:
|
|
|
183
193
|
@property
|
|
184
194
|
def name(self):
|
|
185
195
|
"""Returns a short human-readable name of this feature."""
|
|
186
|
-
|
|
196
|
+
name_ = f"{self.__class__.__name__} ({self.modality}) anchored at {self.anchor}"
|
|
197
|
+
return name_ if not self._prerelease else f"[PRERELEASE] {name_}"
|
|
187
198
|
|
|
188
199
|
@classmethod
|
|
189
200
|
def get_instances(cls, **kwargs) -> List['Feature']:
|
|
@@ -62,13 +62,15 @@ class Image(feature.Feature, _volume.Volume):
|
|
|
62
62
|
providers: List[_volume.VolumeProvider],
|
|
63
63
|
region: str = None,
|
|
64
64
|
datasets: List = [],
|
|
65
|
+
prerelease: bool = False,
|
|
65
66
|
):
|
|
66
67
|
feature.Feature.__init__(
|
|
67
68
|
self,
|
|
68
69
|
modality=modality,
|
|
69
70
|
description=None, # lazy implementation below!
|
|
70
71
|
anchor=None, # lazy implementation below!
|
|
71
|
-
datasets=datasets
|
|
72
|
+
datasets=datasets,
|
|
73
|
+
prerelease=prerelease,
|
|
72
74
|
)
|
|
73
75
|
|
|
74
76
|
_volume.Volume.__init__(
|
|
@@ -67,7 +67,8 @@ class CellDensityProfile(
|
|
|
67
67
|
patch: int,
|
|
68
68
|
url: str,
|
|
69
69
|
anchor: _anchor.AnatomicalAnchor,
|
|
70
|
-
datasets: list = []
|
|
70
|
+
datasets: list = [],
|
|
71
|
+
prerelease: bool = False,
|
|
71
72
|
):
|
|
72
73
|
"""
|
|
73
74
|
Generate a cell density profile from a URL to a cloud folder
|
|
@@ -80,6 +81,7 @@ class CellDensityProfile(
|
|
|
80
81
|
unit="detected cells / 0.1mm3",
|
|
81
82
|
anchor=anchor,
|
|
82
83
|
datasets=datasets,
|
|
84
|
+
prerelease=prerelease,
|
|
83
85
|
)
|
|
84
86
|
self._step = 0.01
|
|
85
87
|
self._url = url
|
|
@@ -52,7 +52,8 @@ class CorticalProfile(tabular.Tabular):
|
|
|
52
52
|
values: Union[list, np.ndarray] = None,
|
|
53
53
|
unit: str = None,
|
|
54
54
|
boundary_positions: Dict[Tuple[int, int], float] = None,
|
|
55
|
-
datasets: list = []
|
|
55
|
+
datasets: list = [],
|
|
56
|
+
prerelease: bool = False,
|
|
56
57
|
):
|
|
57
58
|
"""Initialize profile.
|
|
58
59
|
|
|
@@ -92,7 +93,8 @@ class CorticalProfile(tabular.Tabular):
|
|
|
92
93
|
description=description,
|
|
93
94
|
anchor=anchor,
|
|
94
95
|
data=None, # lazy loader below
|
|
95
|
-
datasets=datasets
|
|
96
|
+
datasets=datasets,
|
|
97
|
+
prerelease=prerelease,
|
|
96
98
|
)
|
|
97
99
|
|
|
98
100
|
def _check_sanity(self):
|
|
@@ -56,6 +56,7 @@ class LayerwiseCellDensity(
|
|
|
56
56
|
layerfiles: list,
|
|
57
57
|
anchor: _anchor.AnatomicalAnchor,
|
|
58
58
|
datasets: list = [],
|
|
59
|
+
prerelease: bool = False,
|
|
59
60
|
):
|
|
60
61
|
tabular.Tabular.__init__(
|
|
61
62
|
self,
|
|
@@ -63,7 +64,8 @@ class LayerwiseCellDensity(
|
|
|
63
64
|
modality="Cell body density",
|
|
64
65
|
anchor=anchor,
|
|
65
66
|
datasets=datasets,
|
|
66
|
-
data=None # lazy loading below
|
|
67
|
+
data=None, # lazy loading below
|
|
68
|
+
prerelease=prerelease,
|
|
67
69
|
)
|
|
68
70
|
self.unit = "# detected cells/0.1mm3"
|
|
69
71
|
self._filepairs = list(zip(segmentfiles, layerfiles))
|
|
@@ -42,7 +42,8 @@ class ReceptorDensityFingerprint(
|
|
|
42
42
|
self,
|
|
43
43
|
tsvfile: str,
|
|
44
44
|
anchor: _anchor.AnatomicalAnchor,
|
|
45
|
-
datasets: list = []
|
|
45
|
+
datasets: list = [],
|
|
46
|
+
prerelease: bool = False,
|
|
46
47
|
):
|
|
47
48
|
""" Generate a receptor fingerprint from a URL to a .tsv file
|
|
48
49
|
formatted according to the structure used by Palomero-Gallagher et al.
|
|
@@ -54,6 +55,7 @@ class ReceptorDensityFingerprint(
|
|
|
54
55
|
anchor=anchor,
|
|
55
56
|
data=None, # lazy loading below
|
|
56
57
|
datasets=datasets,
|
|
58
|
+
prerelease=prerelease,
|
|
57
59
|
)
|
|
58
60
|
self._loader = requests.HttpRequest(tsvfile)
|
|
59
61
|
|
|
@@ -39,7 +39,8 @@ class ReceptorDensityProfile(
|
|
|
39
39
|
receptor: str,
|
|
40
40
|
tsvfile: str,
|
|
41
41
|
anchor: _anchor.AnatomicalAnchor,
|
|
42
|
-
datasets: list = []
|
|
42
|
+
datasets: list = [],
|
|
43
|
+
prerelease: bool = False,
|
|
43
44
|
):
|
|
44
45
|
"""Generate a receptor density profile from a URL to a .tsv file
|
|
45
46
|
formatted according to the structure used by Palomero-Gallagher et al.
|
|
@@ -50,6 +51,7 @@ class ReceptorDensityProfile(
|
|
|
50
51
|
modality=f"{receptor} receptor density",
|
|
51
52
|
anchor=anchor,
|
|
52
53
|
datasets=datasets,
|
|
54
|
+
prerelease=prerelease,
|
|
53
55
|
)
|
|
54
56
|
self.type = receptor
|
|
55
57
|
self._data_cached = None
|
|
@@ -47,7 +47,8 @@ class RegionalTimeseriesActivity(tabular.Tabular):
|
|
|
47
47
|
timestep: str,
|
|
48
48
|
description: str = "",
|
|
49
49
|
datasets: list = [],
|
|
50
|
-
paradigm: str = ""
|
|
50
|
+
paradigm: str = "",
|
|
51
|
+
prerelease: bool = False,
|
|
51
52
|
):
|
|
52
53
|
"""
|
|
53
54
|
"""
|
|
@@ -57,7 +58,8 @@ class RegionalTimeseriesActivity(tabular.Tabular):
|
|
|
57
58
|
description=description or '\n'.join({ds.description for ds in datasets}),
|
|
58
59
|
anchor=anchor,
|
|
59
60
|
datasets=datasets,
|
|
60
|
-
data=None # lazy loading below
|
|
61
|
+
data=None, # lazy loading below
|
|
62
|
+
prerelease=prerelease
|
|
61
63
|
)
|
|
62
64
|
self.cohort = cohort.upper()
|
|
63
65
|
self._connector = connector
|
|
@@ -44,14 +44,16 @@ class Tabular(feature.Feature):
|
|
|
44
44
|
modality: str,
|
|
45
45
|
anchor: _anchor.AnatomicalAnchor,
|
|
46
46
|
data: pd.DataFrame, # sample x feature dimension
|
|
47
|
-
datasets: list = []
|
|
47
|
+
datasets: list = [],
|
|
48
|
+
prerelease: bool = False,
|
|
48
49
|
):
|
|
49
50
|
feature.Feature.__init__(
|
|
50
51
|
self,
|
|
51
52
|
modality=modality,
|
|
52
53
|
description=description,
|
|
53
54
|
anchor=anchor,
|
|
54
|
-
datasets=datasets
|
|
55
|
+
datasets=datasets,
|
|
56
|
+
prerelease=prerelease,
|
|
55
57
|
)
|
|
56
58
|
self._data_cached = data
|
|
57
59
|
|
|
@@ -21,6 +21,7 @@ from ..commons import logger
|
|
|
21
21
|
from ..locations import point, pointset
|
|
22
22
|
from ..core import region
|
|
23
23
|
from ..retrieval import requests, cache
|
|
24
|
+
from ..retrieval.datasets import GenericDataset
|
|
24
25
|
|
|
25
26
|
import numpy as np
|
|
26
27
|
from typing import List
|
|
@@ -36,6 +37,37 @@ class WagstylProfileLoader:
|
|
|
36
37
|
_profiles = None
|
|
37
38
|
_vertices = None
|
|
38
39
|
_boundary_depths = None
|
|
40
|
+
DATASET = GenericDataset(
|
|
41
|
+
name="HIBALL workshop on cortical layers",
|
|
42
|
+
contributors=[
|
|
43
|
+
'Konrad Wagstyl',
|
|
44
|
+
'Stéphanie Larocque',
|
|
45
|
+
'Guillem Cucurull',
|
|
46
|
+
'Claude Lepage',
|
|
47
|
+
'Joseph Paul Cohen',
|
|
48
|
+
'Sebastian Bludau',
|
|
49
|
+
'Nicola Palomero-Gallagher',
|
|
50
|
+
'Lindsay B. Lewis',
|
|
51
|
+
'Thomas Funck',
|
|
52
|
+
'Hannah Spitzer',
|
|
53
|
+
'Timo Dickscheid',
|
|
54
|
+
'Paul C. Fletcher',
|
|
55
|
+
'Adriana Romero',
|
|
56
|
+
'Karl Zilles',
|
|
57
|
+
'Katrin Amunts',
|
|
58
|
+
'Yoshua Bengio',
|
|
59
|
+
'Alan C. Evans'
|
|
60
|
+
],
|
|
61
|
+
url="https://github.com/kwagstyl/cortical_layers_tutorial/",
|
|
62
|
+
description="Cortical profiles of BigBrain staining intensities computed by Konrad Wagstyl, "
|
|
63
|
+
"as described in the publication 'Wagstyl, K., et al (2020). BigBrain 3D atlas of "
|
|
64
|
+
"cortical layers: Cortical and laminar thickness gradients diverge in sensory and "
|
|
65
|
+
"motor cortices. PLoS Biology, 18(4), e3000678. "
|
|
66
|
+
"http://dx.doi.org/10.1371/journal.pbio.3000678."
|
|
67
|
+
"The data is taken from the tutorial at "
|
|
68
|
+
"https://github.com/kwagstyl/cortical_layers_tutorial. Each vertex is "
|
|
69
|
+
"assigned to the regional map when queried."
|
|
70
|
+
)
|
|
39
71
|
|
|
40
72
|
def __init__(self):
|
|
41
73
|
if self._profiles is None:
|
|
@@ -174,6 +206,7 @@ class BigBrainProfileQuery(query.LiveQuery, args=[], FeatureType=bigbrain_intens
|
|
|
174
206
|
boundaries=boundary_depths[i, :],
|
|
175
207
|
location=point.Point(coords[i, :], 'bigbrain') # points are warped into BigBrain
|
|
176
208
|
)
|
|
209
|
+
prof.datasets = [WagstylProfileLoader.DATASET]
|
|
177
210
|
result.append(prof)
|
|
178
211
|
|
|
179
212
|
return result
|
|
@@ -216,6 +249,7 @@ class LayerwiseBigBrainIntensityQuery(query.LiveQuery, args=[], FeatureType=laye
|
|
|
216
249
|
stds=[matched_profiles[layer_labels == layer].std() for layer in range(1, 7)],
|
|
217
250
|
)
|
|
218
251
|
assert fp.matches(subregion) # to create an assignment result
|
|
252
|
+
fp.datasets = [WagstylProfileLoader.DATASET]
|
|
219
253
|
result.append(fp)
|
|
220
254
|
|
|
221
255
|
return result
|
|
@@ -56,6 +56,10 @@ class EbrainsBaseDataset(ABC):
|
|
|
56
56
|
def name(self) -> str:
|
|
57
57
|
raise NotImplementedError
|
|
58
58
|
|
|
59
|
+
@abstractproperty
|
|
60
|
+
def LICENSE(self) -> List[str]:
|
|
61
|
+
raise NotImplementedError
|
|
62
|
+
|
|
59
63
|
@abstractproperty
|
|
60
64
|
def urls(self) -> List[EbrainsDatasetUrl]:
|
|
61
65
|
raise NotImplementedError
|
|
@@ -87,6 +87,7 @@ class Map(concept.AtlasConcept, configuration_folder="maps"):
|
|
|
87
87
|
modality: str = None,
|
|
88
88
|
publications: list = [],
|
|
89
89
|
datasets: list = [],
|
|
90
|
+
prerelease: bool = False,
|
|
90
91
|
):
|
|
91
92
|
"""
|
|
92
93
|
Constructs a new parcellation object.
|
|
@@ -131,7 +132,8 @@ class Map(concept.AtlasConcept, configuration_folder="maps"):
|
|
|
131
132
|
description=description,
|
|
132
133
|
publications=publications,
|
|
133
134
|
datasets=datasets,
|
|
134
|
-
modality=modality
|
|
135
|
+
modality=modality,
|
|
136
|
+
prerelease=prerelease,
|
|
135
137
|
)
|
|
136
138
|
|
|
137
139
|
# Since the volumes might include 4D arrays, where the actual
|
|
@@ -225,7 +225,8 @@ class SparseMap(parcellationmap.Map):
|
|
|
225
225
|
description: str = "",
|
|
226
226
|
modality: str = None,
|
|
227
227
|
publications: list = [],
|
|
228
|
-
datasets: list = []
|
|
228
|
+
datasets: list = [],
|
|
229
|
+
prerelease: bool = False,
|
|
229
230
|
):
|
|
230
231
|
parcellationmap.Map.__init__(
|
|
231
232
|
self,
|
|
@@ -240,6 +241,7 @@ class SparseMap(parcellationmap.Map):
|
|
|
240
241
|
publications=publications,
|
|
241
242
|
datasets=datasets,
|
|
242
243
|
volumes=volumes,
|
|
244
|
+
prerelease=prerelease,
|
|
243
245
|
)
|
|
244
246
|
self._sparse_index_cached = None
|
|
245
247
|
|
|
@@ -202,6 +202,19 @@ class Volume:
|
|
|
202
202
|
else:
|
|
203
203
|
raise ValueError(f"Invalid format requested: {format}")
|
|
204
204
|
|
|
205
|
+
# ensure the voi is inside the template
|
|
206
|
+
voi = kwargs.get("voi", None)
|
|
207
|
+
if isinstance(voi, _boundingbox.BoundingBox) and voi.space is not None:
|
|
208
|
+
tmplt_bbox = voi.space.get_template().boundingbox
|
|
209
|
+
intersection_bbox = voi.intersection(tmplt_bbox)
|
|
210
|
+
if intersection_bbox is None:
|
|
211
|
+
raise RuntimeError(f"voi provided ({voi}) lies out side the voxel space of the {voi.space.name} template.")
|
|
212
|
+
if intersection_bbox.minpoint != voi.minpoint or intersection_bbox.maxpoint != voi.maxpoint:
|
|
213
|
+
logger.info(
|
|
214
|
+
f"Since provided voi lies outside the template ({voi.space}) it is clipped as: {intersection_bbox}"
|
|
215
|
+
)
|
|
216
|
+
kwargs["voi"] = intersection_bbox
|
|
217
|
+
|
|
205
218
|
# try the selected format only
|
|
206
219
|
for try_count in range(6):
|
|
207
220
|
try:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: siibra
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4a82
|
|
4
4
|
Summary: siibra - Software interfaces for interacting with brain atlases
|
|
5
5
|
Home-page: https://github.com/FZJ-INM1-BDA/siibra-python
|
|
6
6
|
Author: Big Data Analytics Group, Forschungszentrum Juelich, Institute of Neuroscience and Medicine (INM-1)
|
siibra-0.4a80/siibra/VERSION
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0.4a80
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|