siibra 0.4a81__tar.gz → 0.4a83__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.

Files changed (82) hide show
  1. {siibra-0.4a81/siibra.egg-info → siibra-0.4a83}/PKG-INFO +1 -1
  2. siibra-0.4a83/siibra/VERSION +1 -0
  3. {siibra-0.4a81 → siibra-0.4a83}/siibra/configuration/factory.py +8 -0
  4. {siibra-0.4a81 → siibra-0.4a83}/siibra/core/concept.py +9 -1
  5. {siibra-0.4a81 → siibra-0.4a83}/siibra/features/connectivity/regional_connectivity.py +2 -0
  6. {siibra-0.4a81 → siibra-0.4a83}/siibra/features/feature.py +17 -2
  7. {siibra-0.4a81 → siibra-0.4a83}/siibra/features/image/image.py +2 -0
  8. {siibra-0.4a81 → siibra-0.4a83}/siibra/features/tabular/cell_density_profile.py +2 -0
  9. {siibra-0.4a81 → siibra-0.4a83}/siibra/features/tabular/cortical_profile.py +2 -0
  10. {siibra-0.4a81 → siibra-0.4a83}/siibra/features/tabular/layerwise_cell_density.py +2 -0
  11. {siibra-0.4a81 → siibra-0.4a83}/siibra/features/tabular/receptor_density_fingerprint.py +2 -0
  12. {siibra-0.4a81 → siibra-0.4a83}/siibra/features/tabular/receptor_density_profile.py +2 -0
  13. {siibra-0.4a81 → siibra-0.4a83}/siibra/features/tabular/regional_timeseries_activity.py +3 -1
  14. {siibra-0.4a81 → siibra-0.4a83}/siibra/features/tabular/tabular.py +2 -0
  15. {siibra-0.4a81 → siibra-0.4a83}/siibra/retrieval/datasets.py +4 -0
  16. {siibra-0.4a81 → siibra-0.4a83/siibra.egg-info}/PKG-INFO +1 -1
  17. siibra-0.4a81/siibra/VERSION +0 -1
  18. {siibra-0.4a81 → siibra-0.4a83}/LICENSE +0 -0
  19. {siibra-0.4a81 → siibra-0.4a83}/MANIFEST.in +0 -0
  20. {siibra-0.4a81 → siibra-0.4a83}/README.rst +0 -0
  21. {siibra-0.4a81 → siibra-0.4a83}/setup.cfg +0 -0
  22. {siibra-0.4a81 → siibra-0.4a83}/setup.py +0 -0
  23. {siibra-0.4a81 → siibra-0.4a83}/siibra/__init__.py +0 -0
  24. {siibra-0.4a81 → siibra-0.4a83}/siibra/commons.py +0 -0
  25. {siibra-0.4a81 → siibra-0.4a83}/siibra/configuration/__init__.py +0 -0
  26. {siibra-0.4a81 → siibra-0.4a83}/siibra/configuration/configuration.py +0 -0
  27. {siibra-0.4a81 → siibra-0.4a83}/siibra/core/__init__.py +0 -0
  28. {siibra-0.4a81 → siibra-0.4a83}/siibra/core/atlas.py +0 -0
  29. {siibra-0.4a81 → siibra-0.4a83}/siibra/core/parcellation.py +0 -0
  30. {siibra-0.4a81 → siibra-0.4a83}/siibra/core/region.py +0 -0
  31. {siibra-0.4a81 → siibra-0.4a83}/siibra/core/relation_qualification.py +0 -0
  32. {siibra-0.4a81 → siibra-0.4a83}/siibra/core/space.py +0 -0
  33. {siibra-0.4a81 → siibra-0.4a83}/siibra/explorer/__init__.py +0 -0
  34. {siibra-0.4a81 → siibra-0.4a83}/siibra/explorer/url.py +0 -0
  35. {siibra-0.4a81 → siibra-0.4a83}/siibra/explorer/util.py +0 -0
  36. {siibra-0.4a81 → siibra-0.4a83}/siibra/features/__init__.py +0 -0
  37. {siibra-0.4a81 → siibra-0.4a83}/siibra/features/anchor.py +0 -0
  38. {siibra-0.4a81 → siibra-0.4a83}/siibra/features/connectivity/__init__.py +0 -0
  39. {siibra-0.4a81 → siibra-0.4a83}/siibra/features/connectivity/functional_connectivity.py +0 -0
  40. {siibra-0.4a81 → siibra-0.4a83}/siibra/features/connectivity/streamline_counts.py +0 -0
  41. {siibra-0.4a81 → siibra-0.4a83}/siibra/features/connectivity/streamline_lengths.py +0 -0
  42. {siibra-0.4a81 → siibra-0.4a83}/siibra/features/connectivity/tracing_connectivity.py +0 -0
  43. {siibra-0.4a81 → siibra-0.4a83}/siibra/features/dataset/__init__.py +0 -0
  44. {siibra-0.4a81 → siibra-0.4a83}/siibra/features/dataset/ebrains.py +0 -0
  45. {siibra-0.4a81 → siibra-0.4a83}/siibra/features/image/__init__.py +0 -0
  46. {siibra-0.4a81 → siibra-0.4a83}/siibra/features/image/sections.py +0 -0
  47. {siibra-0.4a81 → siibra-0.4a83}/siibra/features/image/volume_of_interest.py +0 -0
  48. {siibra-0.4a81 → siibra-0.4a83}/siibra/features/tabular/__init__.py +0 -0
  49. {siibra-0.4a81 → siibra-0.4a83}/siibra/features/tabular/bigbrain_intensity_profile.py +0 -0
  50. {siibra-0.4a81 → siibra-0.4a83}/siibra/features/tabular/gene_expression.py +0 -0
  51. {siibra-0.4a81 → siibra-0.4a83}/siibra/features/tabular/layerwise_bigbrain_intensities.py +0 -0
  52. {siibra-0.4a81 → siibra-0.4a83}/siibra/livequeries/__init__.py +0 -0
  53. {siibra-0.4a81 → siibra-0.4a83}/siibra/livequeries/allen.py +0 -0
  54. {siibra-0.4a81 → siibra-0.4a83}/siibra/livequeries/bigbrain.py +0 -0
  55. {siibra-0.4a81 → siibra-0.4a83}/siibra/livequeries/ebrains.py +0 -0
  56. {siibra-0.4a81 → siibra-0.4a83}/siibra/livequeries/query.py +0 -0
  57. {siibra-0.4a81 → siibra-0.4a83}/siibra/locations/__init__.py +0 -0
  58. {siibra-0.4a81 → siibra-0.4a83}/siibra/locations/boundingbox.py +0 -0
  59. {siibra-0.4a81 → siibra-0.4a83}/siibra/locations/location.py +0 -0
  60. {siibra-0.4a81 → siibra-0.4a83}/siibra/locations/point.py +0 -0
  61. {siibra-0.4a81 → siibra-0.4a83}/siibra/locations/pointset.py +0 -0
  62. {siibra-0.4a81 → siibra-0.4a83}/siibra/retrieval/__init__.py +0 -0
  63. {siibra-0.4a81 → siibra-0.4a83}/siibra/retrieval/cache.py +0 -0
  64. {siibra-0.4a81 → siibra-0.4a83}/siibra/retrieval/exceptions/__init__.py +0 -0
  65. {siibra-0.4a81 → siibra-0.4a83}/siibra/retrieval/repositories.py +0 -0
  66. {siibra-0.4a81 → siibra-0.4a83}/siibra/retrieval/requests.py +0 -0
  67. {siibra-0.4a81 → siibra-0.4a83}/siibra/vocabularies/__init__.py +0 -0
  68. {siibra-0.4a81 → siibra-0.4a83}/siibra/vocabularies/gene_names.json +0 -0
  69. {siibra-0.4a81 → siibra-0.4a83}/siibra/vocabularies/receptor_symbols.json +0 -0
  70. {siibra-0.4a81 → siibra-0.4a83}/siibra/vocabularies/region_aliases.json +0 -0
  71. {siibra-0.4a81 → siibra-0.4a83}/siibra/volumes/__init__.py +0 -0
  72. {siibra-0.4a81 → siibra-0.4a83}/siibra/volumes/gifti.py +0 -0
  73. {siibra-0.4a81 → siibra-0.4a83}/siibra/volumes/neuroglancer.py +0 -0
  74. {siibra-0.4a81 → siibra-0.4a83}/siibra/volumes/nifti.py +0 -0
  75. {siibra-0.4a81 → siibra-0.4a83}/siibra/volumes/parcellationmap.py +0 -0
  76. {siibra-0.4a81 → siibra-0.4a83}/siibra/volumes/sparsemap.py +0 -0
  77. {siibra-0.4a81 → siibra-0.4a83}/siibra/volumes/volume.py +0 -0
  78. {siibra-0.4a81 → siibra-0.4a83}/siibra.egg-info/SOURCES.txt +0 -0
  79. {siibra-0.4a81 → siibra-0.4a83}/siibra.egg-info/dependency_links.txt +0 -0
  80. {siibra-0.4a81 → siibra-0.4a83}/siibra.egg-info/requires.txt +0 -0
  81. {siibra-0.4a81 → siibra-0.4a83}/siibra.egg-info/top_level.txt +0 -0
  82. {siibra-0.4a81 → siibra-0.4a83}/test/test_siibra.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: siibra
3
- Version: 0.4a81
3
+ Version: 0.4a83
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.4a83
@@ -357,6 +357,7 @@ class Factory:
357
357
  anchor=cls.extract_anchor(spec),
358
358
  datasets=cls.extract_datasets(spec),
359
359
  prerelease=spec.get("prerelease", False),
360
+ id=spec.get("@id", None),
360
361
  )
361
362
 
362
363
  @classmethod
@@ -368,6 +369,7 @@ class Factory:
368
369
  anchor=cls.extract_anchor(spec),
369
370
  datasets=cls.extract_datasets(spec),
370
371
  prerelease=spec.get("prerelease", False),
372
+ id=spec.get("@id", None),
371
373
  )
372
374
 
373
375
  @classmethod
@@ -379,6 +381,7 @@ class Factory:
379
381
  anchor=cls.extract_anchor(spec),
380
382
  datasets=cls.extract_datasets(spec),
381
383
  prerelease=spec.get("prerelease", False),
384
+ id=spec.get("@id", None),
382
385
  )
383
386
 
384
387
  @classmethod
@@ -391,6 +394,7 @@ class Factory:
391
394
  anchor=cls.extract_anchor(spec),
392
395
  datasets=cls.extract_datasets(spec),
393
396
  prerelease=spec.get("prerelease", False),
397
+ id=spec.get("@id", None),
394
398
  )
395
399
 
396
400
  @classmethod
@@ -404,6 +408,7 @@ class Factory:
404
408
  "providers": vol._providers.values(),
405
409
  "datasets": cls.extract_datasets(spec),
406
410
  "prerelease": spec.get("prerelease", False),
411
+ "id": spec.get("@id", None),
407
412
  }
408
413
  modality = spec.get('modality', "")
409
414
  if modality == "cell body staining":
@@ -422,6 +427,7 @@ class Factory:
422
427
  "providers": vol._providers.values(),
423
428
  "datasets": cls.extract_datasets(spec),
424
429
  "prerelease": spec.get("prerelease", False),
430
+ "id": spec.get("@id", None),
425
431
  }
426
432
  modality = spec.get('modality', "")
427
433
  if modality == "cell body staining":
@@ -472,6 +478,7 @@ class Factory:
472
478
  "description": spec.get("description", ""),
473
479
  "datasets": cls.extract_datasets(spec),
474
480
  "prerelease": spec.get("prerelease", False),
481
+ "id": spec.get("@id", None),
475
482
  }
476
483
  if modality == "StreamlineCounts":
477
484
  return connectivity.StreamlineCounts(**kwargs)
@@ -504,6 +511,7 @@ class Factory:
504
511
  "datasets": cls.extract_datasets(spec),
505
512
  "timestep": spec.get("timestep", ("1 no_unit")),
506
513
  "prerelease": spec.get("prerelease", False),
514
+ "id": spec.get("@id", None),
507
515
  }
508
516
  if modality == "Regional BOLD signal":
509
517
  kwargs["paradigm"] = spec.get("paradigm", "")
@@ -101,7 +101,15 @@ class AtlasConcept:
101
101
 
102
102
  @property
103
103
  def LICENSE(self) -> str:
104
- return '\n'.join([ds.LICENSE for ds in self.datasets])
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)
105
113
 
106
114
  @property
107
115
  def doi_or_url(self) -> str:
@@ -52,6 +52,7 @@ class RegionalConnectivity(Feature):
52
52
  description: str = "",
53
53
  datasets: list = [],
54
54
  prerelease: bool = False,
55
+ id: str = None,
55
56
  ):
56
57
  """
57
58
  Construct a parcellation-averaged connectivity matrix.
@@ -86,6 +87,7 @@ class RegionalConnectivity(Feature):
86
87
  anchor=anchor,
87
88
  datasets=datasets,
88
89
  prerelease=prerelease,
90
+ id=id,
89
91
  )
90
92
  self.cohort = cohort.upper()
91
93
  self._connector = connector
@@ -94,6 +94,8 @@ class Feature:
94
94
  anchor: _anchor.AnatomicalAnchor,
95
95
  datasets: List['TypeDataset'] = [],
96
96
  prerelease: bool = False,
97
+ id: str = None,
98
+
97
99
  ):
98
100
  """
99
101
  Parameters
@@ -111,6 +113,7 @@ class Feature:
111
113
  self._anchor_cached = anchor
112
114
  self.datasets = datasets
113
115
  self._prerelease = prerelease
116
+ self._id = id
114
117
 
115
118
  @property
116
119
  def modality(self):
@@ -164,7 +167,15 @@ class Feature:
164
167
 
165
168
  @property
166
169
  def LICENSE(self) -> str:
167
- return '\n'.join([ds.LICENSE for ds in self.datasets])
170
+ licenses = []
171
+ for ds in self.datasets:
172
+ if ds.LICENSE is None or ds.LICENSE == "No license information is found.":
173
+ continue
174
+ if isinstance(ds.LICENSE, str):
175
+ licenses.append(ds.LICENSE)
176
+ if isinstance(ds.LICENSE, list):
177
+ licenses.extend(ds.LICENSE)
178
+ return '\n'.join(licenses)
168
179
 
169
180
  @property
170
181
  def doi_or_url(self) -> str:
@@ -247,12 +258,16 @@ class Feature:
247
258
 
248
259
  @property
249
260
  def id(self):
261
+ if self._id:
262
+ return self._id
263
+
250
264
  prefix = ''
251
265
  for ds in self.datasets:
252
266
  if hasattr(ds, "id"):
253
267
  prefix = ds.id + '--'
254
268
  break
255
- return prefix + md5(self.name.encode("utf-8")).hexdigest()
269
+ name_ = self.name.lstrip("[PRERELEASE] ")
270
+ return prefix + md5(name_.encode("utf-8")).hexdigest()
256
271
 
257
272
  def _export(self, fh: ZipFile):
258
273
  """
@@ -63,6 +63,7 @@ class Image(feature.Feature, _volume.Volume):
63
63
  region: str = None,
64
64
  datasets: List = [],
65
65
  prerelease: bool = False,
66
+ id: str = None,
66
67
  ):
67
68
  feature.Feature.__init__(
68
69
  self,
@@ -71,6 +72,7 @@ class Image(feature.Feature, _volume.Volume):
71
72
  anchor=None, # lazy implementation below!
72
73
  datasets=datasets,
73
74
  prerelease=prerelease,
75
+ id=id,
74
76
  )
75
77
 
76
78
  _volume.Volume.__init__(
@@ -69,6 +69,7 @@ class CellDensityProfile(
69
69
  anchor: _anchor.AnatomicalAnchor,
70
70
  datasets: list = [],
71
71
  prerelease: bool = False,
72
+ id: str = None,
72
73
  ):
73
74
  """
74
75
  Generate a cell density profile from a URL to a cloud folder
@@ -82,6 +83,7 @@ class CellDensityProfile(
82
83
  anchor=anchor,
83
84
  datasets=datasets,
84
85
  prerelease=prerelease,
86
+ id=id,
85
87
  )
86
88
  self._step = 0.01
87
89
  self._url = url
@@ -54,6 +54,7 @@ class CorticalProfile(tabular.Tabular):
54
54
  boundary_positions: Dict[Tuple[int, int], float] = None,
55
55
  datasets: list = [],
56
56
  prerelease: bool = False,
57
+ id: str = None,
57
58
  ):
58
59
  """Initialize profile.
59
60
 
@@ -95,6 +96,7 @@ class CorticalProfile(tabular.Tabular):
95
96
  data=None, # lazy loader below
96
97
  datasets=datasets,
97
98
  prerelease=prerelease,
99
+ id=id,
98
100
  )
99
101
 
100
102
  def _check_sanity(self):
@@ -57,6 +57,7 @@ class LayerwiseCellDensity(
57
57
  anchor: _anchor.AnatomicalAnchor,
58
58
  datasets: list = [],
59
59
  prerelease: bool = False,
60
+ id: str = None,
60
61
  ):
61
62
  tabular.Tabular.__init__(
62
63
  self,
@@ -66,6 +67,7 @@ class LayerwiseCellDensity(
66
67
  datasets=datasets,
67
68
  data=None, # lazy loading below
68
69
  prerelease=prerelease,
70
+ id=id,
69
71
  )
70
72
  self.unit = "# detected cells/0.1mm3"
71
73
  self._filepairs = list(zip(segmentfiles, layerfiles))
@@ -44,6 +44,7 @@ class ReceptorDensityFingerprint(
44
44
  anchor: _anchor.AnatomicalAnchor,
45
45
  datasets: list = [],
46
46
  prerelease: bool = False,
47
+ id: str = None,
47
48
  ):
48
49
  """ Generate a receptor fingerprint from a URL to a .tsv file
49
50
  formatted according to the structure used by Palomero-Gallagher et al.
@@ -56,6 +57,7 @@ class ReceptorDensityFingerprint(
56
57
  data=None, # lazy loading below
57
58
  datasets=datasets,
58
59
  prerelease=prerelease,
60
+ id=id,
59
61
  )
60
62
  self._loader = requests.HttpRequest(tsvfile)
61
63
 
@@ -41,6 +41,7 @@ class ReceptorDensityProfile(
41
41
  anchor: _anchor.AnatomicalAnchor,
42
42
  datasets: list = [],
43
43
  prerelease: bool = False,
44
+ id: str = None,
44
45
  ):
45
46
  """Generate a receptor density profile from a URL to a .tsv file
46
47
  formatted according to the structure used by Palomero-Gallagher et al.
@@ -52,6 +53,7 @@ class ReceptorDensityProfile(
52
53
  anchor=anchor,
53
54
  datasets=datasets,
54
55
  prerelease=prerelease,
56
+ id=id
55
57
  )
56
58
  self.type = receptor
57
59
  self._data_cached = None
@@ -49,6 +49,7 @@ class RegionalTimeseriesActivity(tabular.Tabular):
49
49
  datasets: list = [],
50
50
  paradigm: str = "",
51
51
  prerelease: bool = False,
52
+ id: str = None,
52
53
  ):
53
54
  """
54
55
  """
@@ -59,7 +60,8 @@ class RegionalTimeseriesActivity(tabular.Tabular):
59
60
  anchor=anchor,
60
61
  datasets=datasets,
61
62
  data=None, # lazy loading below
62
- prerelease=prerelease
63
+ prerelease=prerelease,
64
+ id=id,
63
65
  )
64
66
  self.cohort = cohort.upper()
65
67
  self._connector = connector
@@ -46,6 +46,7 @@ class Tabular(feature.Feature):
46
46
  data: pd.DataFrame, # sample x feature dimension
47
47
  datasets: list = [],
48
48
  prerelease: bool = False,
49
+ id: str = None,
49
50
  ):
50
51
  feature.Feature.__init__(
51
52
  self,
@@ -54,6 +55,7 @@ class Tabular(feature.Feature):
54
55
  anchor=anchor,
55
56
  datasets=datasets,
56
57
  prerelease=prerelease,
58
+ id=id,
57
59
  )
58
60
  self._data_cached = data
59
61
 
@@ -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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: siibra
3
- Version: 0.4a81
3
+ Version: 0.4a83
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)
@@ -1 +0,0 @@
1
- 0.4a81
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