Skip to content

Commit 7c33ed7

Browse files
authored
Merge branch 'master' into bep022
2 parents 0a87fce + fe6f06a commit 7c33ed7

26 files changed

+376
-33
lines changed

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -188,12 +188,13 @@ TABLE BELOW IS GENERATED AUTOMATICALLY.
188188
DO NOT EDIT DIRECTLY.
189189
-->
190190

191-
| name | description | datatypes | suffixes | link to full data | maintained by |
192-
|:------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------|:-----------------------------|:--------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------|:---------------------------------------------|
193-
| [eeg_ds003645s_hed_demo](https://github.com/bids-standard/bids-examples/tree/master/eeg_ds003645s_hed_demo) | Shows usage of Hierarchical Event Descriptor (HED) in .tsv files | anat, beh, eeg, micr, motion | KSSSleep, SPIM, beh, channels, coordsystem, defacemask, eeg, electrodes, events, headshape, motion, photo, samples, scans | [link](https://openneuro.org/datasets/ds003645) | [@VisLab](https://github.com/VisLab) |
194-
| [micr_SEM](https://github.com/bids-standard/bids-examples/tree/master/micr_SEM) | Example SEM dataset in PNG format with 1 sample imaged over 2 sessions | micr | SEM, photo, samples, sessions | [link](https://doi.org/10.5281/zenodo.5498378) | [@jcohenadad](https://github.com/jcohenadad) |
195-
| [micr_SEMzarr](https://github.com/bids-standard/bids-examples/tree/master/micr_SEMzarr) | Example SEM dataset in PNG and OME-ZARR format with 1 sample imaged over 2 sessions | micr | SEM, SPIM, samples, sessions | n/a | [@TheChymera](https://github.com/TheChymera) |
196-
| [micr_SPIM](https://github.com/bids-standard/bids-examples/tree/master/micr_SPIM) | Example SPIM dataset in OME-TIFF format with 2 samples from the same subject with 4 chunks each | micr | SPIM, photo, samples | [link](https://doi.org/10.5281/zenodo.5517223) | [@jcohenadad](https://github.com/jcohenadad) |
191+
| name | description | datatypes | suffixes | link to full data | maintained by |
192+
|:------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------|:-----------------------------|:--------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------|:---------------------------------------------|
193+
| [eeg_ds003645s_hed_demo](https://github.com/bids-standard/bids-examples/tree/master/eeg_ds003645s_hed_demo) | Shows usage of Hierarchical Event Descriptor (HED) in .tsv files | anat, beh, eeg, micr, motion | KSSSleep, SPIM, beh, channels, coordsystem, defacemask, eeg, electrodes, events, headshape, motion, photo, samples, scans | [link](https://openneuro.org/datasets/ds003645) | [@VisLab](https://github.com/VisLab) |
194+
| [micr_SEM](https://github.com/bids-standard/bids-examples/tree/master/micr_SEM) | Example SEM dataset in PNG format with 1 sample imaged over 2 sessions | micr | SEM, photo, samples, sessions | [link](https://doi.org/10.5281/zenodo.5498378) | [@jcohenadad](https://github.com/jcohenadad) |
195+
| [micr_SEMzarr](https://github.com/bids-standard/bids-examples/tree/master/micr_SEMzarr) | Example SEM dataset in PNG and OME-ZARR format with 1 sample imaged over 2 sessions | micr | SEM, SPIM, samples, sessions | n/a | [@TheChymera](https://github.com/TheChymera) |
196+
| [micr_SPIM](https://github.com/bids-standard/bids-examples/tree/master/micr_SPIM) | Example SPIM dataset in OME-TIFF format with 2 samples from the same subject with 4 chunks each | micr | SPIM, photo, samples | [link](https://doi.org/10.5281/zenodo.5517223) | [@jcohenadad](https://github.com/jcohenadad) |
197+
| [micr_XPCTzarr](https://github.com/bids-standard/bids-examples/tree/master/micr_XPCTzarr) | Example XPCT dataset in OME-ZARR format with 1 sample imaged | micr | XPCT, photo, samples, sessions | [link](https://human-organ-atlas.esrf.eu/datasets/572252538) | [@chourroutm](https://github.com/chourroutm) |
197198

198199
### Motion
199200

dataset_listing.tsv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ pet005 T1w, PET [@mnoergaard](https://github.com/mnoergaard) anat, pet T1w, eve
5959
micr_SEM Example SEM dataset in PNG format with 1 sample imaged over 2 sessions [link](https://doi.org/10.5281/zenodo.5498378) [@jcohenadad](https://github.com/jcohenadad) micr SEM, photo, samples, sessions
6060
micr_SEMzarr Example SEM dataset in PNG and OME-ZARR format with 1 sample imaged over 2 sessions [@TheChymera](https://github.com/TheChymera) micr SEM, SPIM, samples, sessions
6161
micr_SPIM Example SPIM dataset in OME-TIFF format with 2 samples from the same subject with 4 chunks each [link](https://doi.org/10.5281/zenodo.5517223) [@jcohenadad](https://github.com/jcohenadad) micr SPIM, photo, samples
62+
micr_XPCTzarr Example XPCT dataset in OME-ZARR format with 1 sample imaged [link](https://human-organ-atlas.esrf.eu/datasets/572252538) [@chourroutm](https://github.com/chourroutm) micr XPCT, photo, samples, sessions
6263
fnirs_tapping Example fNIRS measurement with three conditions from five subjects [link](https://doi.org/10.5281/zenodo.5529797) [@rob-luke](https://github.com/rob-luke) nirs channels, coordsystem, events, nirs, optodes, scans
6364
fnirs_automaticity 24 subjects performing (non-)automatic finger tapping and foot stepping [link](https://doi.org/10.34973/vesb-mh30) [@robertoostenveld](https://github.com/robertoostenveld) nirs channels, coordsystem, events, nirs, optodes, practicelogbook, scans
6465
motion_systemvalidation Example dataset of two different motion captured system recorded almost simultaneously, but no brain data [link](https://doi.org/10.6084/m9.figshare.20238006.v2) [@JuliusWelzel](https://github.com/JuliusWelzel) motion channels, motion, scans

genetics_ukbb/.bids-validator-config.json

Lines changed: 0 additions & 3 deletions
This file was deleted.
File renamed without changes.

micr_XPCTzarr/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
1 human brain sample imaged over 1 session.
2+
Example dataset with empty images containing X-ray phase-contrast tomography (XPCT) data to illustrate BIDS convention.
3+
Using NGFF nested directory format example
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
from pathlib import Path
2+
import zarr.convenience
3+
import dask.array
4+
import ome_zarr, ome_zarr.io, ome_zarr.writer
5+
from numcodecs import Blosc, Delta
6+
import time
7+
8+
"""
9+
You may use the following command to prepare a Python 3.8+ environment for the download of the dataset: `pip install -r data_retrieval_reqs.txt`
10+
"""
11+
12+
data_path = Path("../sub-LADAF-2020-31/ses-01/micr/") # path to session
13+
data_path.mkdir(exist_ok=True) # create directory
14+
15+
# short utility function
16+
def zarr_array(url,selector):
17+
print('Retrieving data from', url)
18+
n5_store = zarr.N5FSStore(url)
19+
root = zarr.group(store=n5_store)
20+
return dask.array.from_zarr(root[selector])
21+
22+
dataset_full = zarr_array("gs://ucl-hip-ct-35a68e99feaae8932b1d44da0358940b/LADAF-2020-31/brain/25.08um_complete-organ_bm05/","s0") # get a dask.array.Array that points to the whole N5 dataset
23+
24+
# default filters and compressors made the script crash; the ones below work:
25+
filters = [Delta(dtype='i4')]
26+
compressor = Blosc(cname='zstd', clevel=1, shuffle=Blosc.SHUFFLE)
27+
28+
path_roi = data_path / "sub-LADAF-2020-31_ses-01_sample-brain_XPCT.ome.zarr" # full name of the dataset following BIDS specification
29+
30+
print('Writing in', str(path_roi))
31+
32+
tic = time.time()
33+
34+
store = ome_zarr.io.parse_url(path_roi,mode="a").store # NB: `mode="a"` should allow overwrite but it does not at the moment, see https://github.com/ome/ome-zarr-py/issues/376
35+
root = zarr.group(store=store)
36+
ome_zarr.writer.write_image(image=dataset_full,
37+
group=root,
38+
scaler=None,
39+
axes=[
40+
{
41+
"name": "z",
42+
"type": "space",
43+
"units": "micrometer" # voxel size is an isotropic 25.08 um
44+
},
45+
{
46+
"name": "y",
47+
"type": "space",
48+
"units": "micrometer" # voxel size is an isotropic 25.08 um
49+
},
50+
{
51+
"name": "x",
52+
"type": "space",
53+
"units": "micrometer" # voxel size is an isotropic 25.08 um
54+
}
55+
], # axis order of the dataset following BIDS specification
56+
coordinate_transformations=[
57+
[
58+
{
59+
"scale": [
60+
25.08,
61+
25.08,
62+
25.08
63+
], # voxel size is an isotropic 25.08 um
64+
"type": "scale"
65+
}
66+
]
67+
],
68+
storage_options=dict(
69+
chunks=(512,512,512), # this chunk size may be altered depending on someone's needs
70+
filters=filters, # default filters made the script crash
71+
compressor=compressor # default compressors made the script crash
72+
)
73+
)
74+
75+
toc = time.time()
76+
77+
print('Writing completed in', (toc - tic)/60, 'min!')
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
dask[complete]
2+
zarr
3+
ome-zarr
4+
numcodecs
5+
gcsfs
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import urllib.request
2+
import json
3+
4+
"""
5+
You may use the following command to prepare a Python 3.8+ environment for the download of the dataset: `pip install -r metadata_formatter_reqs.txt`
6+
"""
7+
8+
# The following metadata file can be downloaded from https://human-organ-atlas.esrf.eu/datasets/572252538
9+
metadata_txt_file_uri = 'https://ids.esrf.fr/ids/getData?sessionId=182d0a3b-de3b-4602-8caf-9bd91dc5b0e5&datafileIds=572252539' # This URI expires quite often
10+
11+
req = urllib.request.urlopen(metadata_txt_file_uri)
12+
13+
json_dict = {}
14+
15+
for line in urllib.request.urlopen(metadata_txt_file_uri):
16+
text = line.decode('utf-8')
17+
if text.startswith('#') or text == '\r\n':
18+
pass
19+
else:
20+
s = text.replace('\t','').replace('\r\n','').replace('"', '').replace('N.A.', 'n/a').split('=')
21+
22+
try:
23+
s[1] = int(s[1])
24+
except:
25+
try:
26+
s[1] = float(s[1])
27+
except:
28+
pass
29+
json_dict[s[0]] = s[1]
30+
json_obj = json.dumps(json_dict)
31+
print(json_obj)
32+
33+
"""
34+
The metadata has been split into several files:
35+
- micr_XPCTzarr/samples.json
36+
- micr_XPCTzarr/sub-LADAF-2020-31/sub-LADAF-2020-31_sessions.tsv
37+
- micr_XPCTzarr/sub-LADAF-2020-31/ses-01/micr/sub-LADAF-2020-31_ses-01_sample-brain_XPCT.json
38+
Note that some fields are redundant.
39+
"""
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
urllib3
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
# Bash script to truncate all the files containing the binary chunked data as per ../../CONTRIBUTING.md
3+
# Modified from ../../CONTRIBUTING.md
4+
5+
find ../sub-LADAF-2020-31/ses-01/micr/sub-LADAF-2020-31_ses-01_sample-brain_XPCT.ome.zarr/ -type f -regex ".*/[0-9]*" -exec truncate -s 0 {} +

0 commit comments

Comments
 (0)