-
Notifications
You must be signed in to change notification settings - Fork 36
/
bidsmap.yaml
472 lines (461 loc) · 20.5 KB
/
bidsmap.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
# --------------------------------------------------------------------------------
# This is a bidsmap YAML file with the key-value mappings for the different BIDS
# datatypes (anat, func, dwi, etc). The datatype attributes are the keys that map
# onto the BIDS labels. The bidsmap data-structure should be 5 levels deep:
#
# dict : dict : list : dict : dict
# dataformat : datatype : run-item : bidsmapping : mapping-data
#
# NB:
# 1) Edit the bidsmap file to your needs before feeding it to bidscoiner.py
# 2) (Institute) users may create their own bidsmap_[template].yaml or
# bidsmap_[sample].yaml file
#
# For more information, see: https://bidscoin.readthedocs.io
# --------------------------------------------------------------------------------
$schema: schema.json
Options:
# --------------------------------------------------------------------------------
# General options and plugins
# --------------------------------------------------------------------------------
bidscoin:
version: 4.3.2+qt5 # BIDScoin version (should correspond with the version in pyproject.toml)
bidsignore: mrs/;extra_data/ # Semicolon-separated list of entries that are added to the .bidsignore file (for more info, see BIDS specifications), e.g. extra_data/;pet/;myfile.txt;yourfile.csv
subprefix: sub- # The subject prefix of the source data
sesprefix: ses- # The session prefix of the source data
unknowntypes: [mrs, extra_data] # A list of datatypes that are converted to BIDS-like datatype folders
ignoretypes: [exclude] # A list of datatypes that are excluded / not converted to BIDS
notderivative: [] # A list of suffixes that should not be considered as a derivative datatype
unzip: # Wildcard pattern to select tarballed/zip-files in the sourcefolders that need to be unzipped (in a tempdir) to expose the data, e.g. '*.tar.gz'
plugins: # List of plugins with plugin-specific key-value pairs (that can be used by the plugin)
dcm2niix2bids: # See dcm2niix -h and https://www.nitrc.org/plugins/mwiki/index.php/dcm2nii:MainPage#General_Usage for more info
command: dcm2niix # Command to run dcm2niix, e.g. "module add dcm2niix/1.0.20180622; dcm2niix" or "PATH=/opt/dcm2niix/bin:$PATH; dcm2niix" or /opt/dcm2niix/bin/dcm2niix or 'C:\"Program Files"\dcm2niix\dcm2niix.exe' (use quotes to deal with whitespaces in the path)
args: -b y -z y -i n -l n # Argument string that is passed to dcm2niix. Tip: SPM users may want to use '-z n' (which produces unzipped nifti's, see dcm2niix -h for more information)
anon: y # Set this anonymization flag to 'y' to round off age and discard acquisition date from the meta data
meta: [.json, .tsv, .tsv.gz] # The file extensions of the equally named metadata sourcefiles that are copied over to the BIDS sidecar files
fallback: y # Appends unhandled dcm2niix suffixes to the `acq` label if 'y' (recommended, else the suffix data is discarded)
spec2nii2bids: # The settings for the spec2nii2bids plugin
command: spec2nii # Command to run spec2nii, e.g. "module add spec2nii; spec2nii" or "PATH=/opt/spec2nii/bin:$PATH; spec2nii" or /opt/spec2nii/bin/spec2nii or 'C:\"Program Files"\spec2nii\spec2nii.exe' (note the quotes to deal with the whitespace)
args: # Argument string that is passed to spec2nii (see spec2nii -h for more information)
anon: y # Set this anonymization flag to 'y' to round off age and discard acquisition date from the meta data
meta: [.json, .tsv, .tsv.gz] # The file extensions of the equally named metadata sourcefiles that are copied over to the BIDS sidecar files
multiraid: 2 # The mapVBVD argument for selecting the multiraid Twix file to load (default = 2, i.e. 2nd file)
DICOM:
# --------------------------------------------------------------------------------
# DICOM key-value heuristics (DICOM fields that are mapped to the BIDS labels)
# --------------------------------------------------------------------------------
subject: <<filepath:.*/raw/sub-(.*?)/>> # This filesystem property extracts the subject label from the source directory. NB: Any property or attribute can be used as subject-label, e.g. <PatientID>
session: <<filepath:.*/raw/sub-.*?/ses-(.*?)/>> # This filesystem property extracts the subject label from the source directory. NB: Any property or attribute can be used as session-label, e.g. <StudyID>
anat: # ----------------------- All anatomical runs --------------------
- provenance: /Users/galassiae/Projects/bidscoin/bidscointutorial/raw/sub-001/ses-01/007-t1_mprage_sag_ipat2_1p0iso/00001_1.3.12.2.1107.5.2.43.66068.2020042808523182387402502.IMA
properties:
filepath: ''
filename: ''
filesize: ''
nrfiles: ''
attributes:
ProtocolName: t1_mprage_sag_ipat2_1p0iso
MRAcquisitionType: 3D
Modality: MR
SeriesDescription: t1_mprage_sag_ipat2_1p0iso
ImageType: "['ORIGINAL', 'PRIMARY', 'M', 'ND', 'NORM']"
SequenceName: .tfl3d1_16ns
SequenceVariant: "['SK', 'SP', 'MP']"
ScanningSequence: "['GR', 'IR']"
SliceThickness: '1'
FlipAngle: '8'
EchoNumbers: '1'
EchoTime: '3.03'
RepetitionTime: '2300'
PhaseEncodingDirection: ''
bids:
task:
acq: t1mpragesagipat21p0iso
ce:
rec:
run: <<>>
echo:
part: ['', mag, phase, real, imag, 0]
chunk:
suffix: T1w
meta: {}
func: # ----------------------- All functional runs --------------------
- provenance: /Users/galassiae/Projects/bidscoin/bidscointutorial/raw/sub-001/ses-01/047-cmrr_2p4iso_mb8_TR0700_SBRef/00001_1.3.12.2.1107.5.2.43.66068.2020042810531713998841564.IMA
properties:
filepath: ''
filename: ''
filesize: ''
nrfiles: ''
attributes:
SeriesDescription: cmrr_2p4iso_mb8_TR0700_SBRef
Modality: MR
ProtocolName: cmrr_2p4iso_mb8_TR0700
ImageType: "['ORIGINAL', 'PRIMARY', 'M', 'ND', 'NORM', 'MOSAIC']"
SequenceName: epfid2d1_88
SequenceVariant: "['SK', 'SS']"
ScanningSequence: EP
MRAcquisitionType: 2D
SliceThickness: '2.4000000953674'
FlipAngle: '52'
EchoNumbers: '1'
EchoTime: '39'
RepetitionTime: '700'
PhaseEncodingDirection: ''
bids:
suffix: sbref
task: cmrr2p4isomb8TR0700
acq:
ce:
dir:
rec:
run: <<>>
echo: '1'
part: &id001 ['', mag, phase, real, imag, 0]
chunk:
meta:
TaskName:
B0FieldSource:
B0FieldIdentifier:
- provenance: /Users/galassiae/Projects/bidscoin/bidscointutorial/raw/sub-001/ses-01/048-cmrr_2p4iso_mb8_TR0700/00001_1.3.12.2.1107.5.2.43.66068.2020042810531742256741694.IMA
properties:
filepath: ''
filename: ''
filesize: ''
nrfiles: ''
attributes:
ProtocolName: cmrr_2p4iso_mb8_TR0700
Modality: MR
SeriesDescription: cmrr_2p4iso_mb8_TR0700
ImageType: "['ORIGINAL', 'PRIMARY', 'M', 'MB', 'ND', 'NORM', 'MOSAIC']"
SequenceName: epfid2d1_88
SequenceVariant: "['SK', 'SS']"
ScanningSequence: EP
MRAcquisitionType: 2D
SliceThickness: '2.4000000953674'
FlipAngle: '52'
EchoNumbers: '1'
EchoTime: '39'
RepetitionTime: '700'
PhaseEncodingDirection: ''
bids:
task: cmrr2p4isomb8TR0700
acq:
ce:
dir:
rec:
run: <<>>
echo: '1'
part: 'real'
chunk:
suffix: bold
meta:
TaskName:
B0FieldSource:
B0FieldIdentifier:
- provenance: /Users/galassiae/Projects/bidscoin/bidscointutorial/raw/sub-001/ses-01/059-cmrr_2p5iso_mb3me3_TR1500_SBRef/00001_1.3.12.2.1107.5.2.43.66068.2020042810585076294853155.IMA
properties:
filepath: ''
filename: ''
filesize: ''
nrfiles: ''
attributes:
SeriesDescription: cmrr_2p5iso_mb3me3_TR1500_SBRef
Modality: MR
ProtocolName: cmrr_2p5iso_mb3me3_TR1500
ImageType: "['ORIGINAL', 'PRIMARY', 'M', 'TE1', 'ND', 'NORM', 'MOSAIC']"
SequenceName: epfid2d3_84
SequenceVariant: "['SK', 'SS']"
ScanningSequence: EP
MRAcquisitionType: 2D
SliceThickness: '2.5'
FlipAngle: '75'
EchoNumbers: '1'
EchoTime: '13.4'
RepetitionTime: '1500'
PhaseEncodingDirection: ''
bids:
suffix: sbref
task: cmrr2p5isomb3me3TR1500
acq:
ce:
dir:
rec:
run: <<>>
echo: '1'
part:
chunk:
meta:
TaskName:
B0FieldSource:
B0FieldIdentifier:
- provenance: /Users/galassiae/Projects/bidscoin/bidscointutorial/raw/sub-001/ses-01/060-cmrr_2p5iso_mb3me3_TR1500/00001_1.3.12.2.1107.5.2.43.66068.2020042810585131207753573.IMA
properties:
filepath: ''
filename: ''
filesize: ''
nrfiles: ''
attributes:
ProtocolName: cmrr_2p5iso_mb3me3_TR1500
Modality: MR
SeriesDescription: cmrr_2p5iso_mb3me3_TR1500
ImageType: "['ORIGINAL', 'PRIMARY', 'M', 'MB', 'TE1', 'ND', 'NORM', 'MOSAIC']"
SequenceName: epfid2d3_84
SequenceVariant: "['SK', 'SS']"
ScanningSequence: EP
MRAcquisitionType: 2D
SliceThickness: '2.5'
FlipAngle: '75'
EchoNumbers: '1'
EchoTime: '13.4'
RepetitionTime: '1500'
PhaseEncodingDirection: ''
bids:
task: cmrr2p5isomb3me3TR1500
acq:
ce:
dir:
rec:
run: <<>>
echo: '1'
part: *id001
chunk:
suffix: bold
meta:
TaskName:
B0FieldSource:
B0FieldIdentifier:
perf: [] # ----------------------- All perfusion runs ---------------------
dwi: [] # ----------------------- All diffusion runs ---------------------
fmap: # ----------------------- All fieldmap runs ----------------------
- provenance: /Users/galassiae/Projects/bidscoin/bidscointutorial/raw/sub-001/ses-01/049-field_map_2p4iso/00001_1.3.12.2.1107.5.2.43.66068.2020042810545563732043000.IMA
properties:
filepath: ''
filename: ''
filesize: ''
nrfiles: ''
attributes:
ProtocolName: field_map_2p4iso
ScanningSequence: GR
EchoNumbers: '1'
ImageType: "['ORIGINAL', 'PRIMARY', 'M', 'ND']"
Modality: MR
SeriesDescription: field_map_2p4iso
SequenceName: .fm2d2
SequenceVariant: SP
MRAcquisitionType: 2D
SliceThickness: '2.4000000953674'
FlipAngle: '60'
EchoTime: '4.92'
RepetitionTime: '614'
PhaseEncodingDirection: ''
bids:
suffix: magnitude1
acq: fieldmap2p4iso
run: <<>>
chunk:
meta:
B0FieldIdentifier:
IntendedFor:
- provenance: /Users/galassiae/Projects/bidscoin/bidscointutorial/raw/sub-001/ses-01/050-field_map_2p4iso/00001_1.3.12.2.1107.5.2.43.66068.2020042810545625307043255.IMA
properties:
filepath: ''
filename: ''
filesize: ''
nrfiles: ''
attributes:
ProtocolName: field_map_2p4iso
ScanningSequence: GR
EchoNumbers: '2'
ImageType: "['ORIGINAL', 'PRIMARY', 'P', 'ND']"
Modality: MR
SeriesDescription: field_map_2p4iso
SequenceName: .fm2d2
SequenceVariant: SP
MRAcquisitionType: 2D
SliceThickness: '2.4000000953674'
FlipAngle: '60'
EchoTime: '7.38'
RepetitionTime: '614'
PhaseEncodingDirection: ''
bids:
suffix: phasediff
acq: fieldmap2p4iso
run: <<>>
chunk:
meta:
B0FieldIdentifier:
IntendedFor:
- provenance: /Users/galassiae/Projects/bidscoin/bidscointutorial/raw/sub-001/ses-01/061-field_map_2p5iso/00001_1.3.12.2.1107.5.2.43.66068.2020042811000180097857226.IMA
properties:
filepath: ''
filename: ''
filesize: ''
nrfiles: ''
attributes:
ProtocolName: field_map_2p5iso
ScanningSequence: GR
EchoNumbers: '1'
ImageType: "['ORIGINAL', 'PRIMARY', 'M', 'ND']"
Modality: MR
SeriesDescription: field_map_2p5iso
SequenceName: .fm2d2
SequenceVariant: SP
MRAcquisitionType: 2D
SliceThickness: '2.5'
FlipAngle: '60'
EchoTime: '2.6'
RepetitionTime: '380'
PhaseEncodingDirection: ''
bids:
suffix: magnitude1
acq: fieldmap2p5iso
run: <<>>
chunk:
meta:
B0FieldIdentifier:
IntendedFor:
- provenance: /Users/galassiae/Projects/bidscoin/bidscointutorial/raw/sub-001/ses-01/062-field_map_2p5iso/00001_1.3.12.2.1107.5.2.43.66068.2020042811000218155657429.IMA
properties:
filepath: ''
filename: ''
filesize: ''
nrfiles: ''
attributes:
ProtocolName: field_map_2p5iso
ScanningSequence: GR
EchoNumbers: '2'
ImageType: "['ORIGINAL', 'PRIMARY', 'P', 'ND']"
Modality: MR
SeriesDescription: field_map_2p5iso
SequenceName: .fm2d2
SequenceVariant: SP
MRAcquisitionType: 2D
SliceThickness: '2.5'
FlipAngle: '60'
EchoTime: '5.06'
RepetitionTime: '380'
PhaseEncodingDirection: ''
bids:
suffix: phasediff
acq: fieldmap2p5iso
run: <<>>
chunk:
meta:
B0FieldIdentifier:
IntendedFor:
pet: [] # ----------------------- All PET runs ---------------------------
eeg: [] # ----------------------- All EEG data ---------------------------
ieeg: [] # ----------------------- All iEEG data --------------------------
extra_data: [] # ----------------------- All extra data -------------------------
exclude: # ----------------------- Data that will be left out -------------
- provenance: /Users/galassiae/Projects/bidscoin/bidscointutorial/raw/sub-001/ses-01/001-localizer_32ch-head/00001_1.3.12.2.1107.5.2.43.66068.2020042808460132520200538.IMA
properties:
filepath: ''
filename: ''
filesize: ''
nrfiles: ''
attributes:
ProtocolName: localizer_32ch-head
Modality: MR
SeriesDescription: localizer_32ch-head
ImageType: "['ORIGINAL', 'PRIMARY', 'M', 'ND', 'NORM']"
SequenceName: .fl2d1
SequenceVariant: "['SP', 'OSP']"
ScanningSequence: GR
MRAcquisitionType: 2D
SliceThickness: '7'
FlipAngle: '20'
EchoNumbers: '1'
EchoTime: '4'
RepetitionTime: '8.6'
PhaseEncodingDirection: ''
bids:
acq: localizer32chhead
rec: ORIGINALPRIMARYMNDNORM
task: localizer32chhead
echo: '1'
mod: 2D
suffix: GR
meta: {}
- provenance: /Users/galassiae/Projects/bidscoin/bidscointutorial/raw/sub-001/ses-01/002-AAHead_Scout_32ch-head/00001_1.3.12.2.1107.5.2.43.66068.202004280846254557100752.IMA
properties:
filepath: ''
filename: ''
filesize: ''
nrfiles: ''
attributes:
ProtocolName: AAHead_Scout_32ch-head
Modality: MR
SeriesDescription: AAHead_Scout_32ch-head
ImageType: "['ORIGINAL', 'PRIMARY', 'M', 'ND', 'NORM']"
SequenceName: .fl3d1_ns
SequenceVariant: SP
ScanningSequence: GR
MRAcquisitionType: 3D
SliceThickness: '1.6000000238419'
FlipAngle: '8'
EchoNumbers: '1'
EchoTime: '1.37'
RepetitionTime: '3.15'
PhaseEncodingDirection: ''
bids:
acq: AAHeadScout32chhead
rec: ORIGINALPRIMARYMNDNORM
task: AAHeadScout32chhead
echo: '1'
mod: 3D
suffix: GR
meta: {}
PAR:
# --------------------------------------------------------------------------------
# PAR key-value heuristics (Philips PAR fields that are mapped to the BIDS labels)
# --------------------------------------------------------------------------------
subject: <<filepath:.*/raw/sub-(.*?)/>> # This filesystem property extracts the subject label from the source directory. NB: Any property or attribute can be used as subject-label, e.g. <PatientID>
session: <<filepath:.*/raw/sub-.*?/ses-(.*?)/>> # This filesystem property extracts the subject label from the source directory. NB: Any property or attribute can be used as session-label, e.g. <StudyID>
anat: [] # ----------------------- All anatomical runs --------------------
func: [] # ----------------------- All functional runs --------------------
perf: [] # ----------------------- All perfusion runs ---------------------
dwi: [] # ----------------------- All diffusion runs ---------------------
fmap: [] # ----------------------- All fieldmap runs ----------------------
extra_data: [] # ----------------------- All extra data -------------------------
exclude: [] # ----------------------- Data that will be left out -------------
SPAR:
# ---------------------------------------------------------------------------------
# SPAR key-value heuristics (Philips MRS fields that are mapped to the BIDS labels)
# ---------------------------------------------------------------------------------
subject: <<filepath:.*/raw/sub-(.*?)/>> # This filesystem property extracts the subject label from the source directory. NB: Any property or attribute can be used as subject-label, e.g. <PatientID>
session: <<filepath:.*/raw/sub-.*?/ses-(.*?)/>> # This filesystem property extracts the subject label from the source directory. NB: Any property or attribute can be used as session-label, e.g. <StudyID>
mrs: [] # ---------------------- All spectroscopy runs ------------------
extra_data: [] # ----------------------- All extra data -------------------------
exclude: [] # ----------------------- Data that will be left out -------------
Twix:
# ---------------------------------------------------------------------------------
# SPAR key-value heuristics (Philips MRS fields that are mapped to the BIDS labels)
# ---------------------------------------------------------------------------------
subject: <<filepath:.*/raw/sub-(.*?)/>> # This filesystem property extracts the subject label from the source directory. NB: Any property or attribute can be used as subject-label, e.g. <PatientID>
session: <<filepath:.*/raw/sub-.*?/ses-(.*?)/>> # This filesystem property extracts the subject label from the source directory. NB: Any property or attribute can be used as session-label, e.g. <StudyID>
mrs: [] # ---------------------- All spectroscopy runs ------------------
extra_data: [] # ----------------------- All extra data -------------------------
exclude: [] # ----------------------- Data that will be left out -------------
Pfile:
# ------------------------------------------------------------------------------
# P-file key-value heuristics (GE MRS fields that are mapped to the BIDS labels)
# ------------------------------------------------------------------------------
subject: <<filepath:.*/raw/sub-(.*?)/>> # This filesystem property extracts the subject label from the source directory. NB: Any property or attribute can be used as subject-label, e.g. <PatientID>
session: <<filepath:.*/raw/sub-.*?/ses-(.*?)/>> # This filesystem property extracts the subject label from the source directory. NB: Any property or attribute can be used as session-label, e.g. <StudyID>
mrs: [] # ---------------------- All spectroscopy runs ------------------
extra_data: [] # ----------------------- All extra data -------------------------
exclude: [] # ----------------------- Data that will be left out -------------
Nibabel:
# --------------------------------------------------------------------------------
# Nibabel key-value heuristics (header fields that are mapped to the BIDS labels)
# --------------------------------------------------------------------------------
subject: <<filepath:.*/raw/sub-(.*?)/>> # This filesystem property extracts the subject label from the source directory. NB: Any property or attribute can be used as subject-label, e.g. <PatientID>
session: <<filepath:.*/raw/sub-.*?/ses-(.*?)/>> # This filesystem property extracts the subject label from the source directory. NB: Any property or attribute can be used as session-label, e.g. <StudyID>
anat: [] # ----------------------- All anatomical runs --------------------
func: [] # ----------------------- All functional runs --------------------
perf: [] # ----------------------- All perfusion runs ---------------------
dwi: [] # ----------------------- All diffusion runs ---------------------
fmap: [] # ----------------------- All fieldmap runs ----------------------
extra_data: [] # ----------------------- All extra data -------------------------
exclude: [] # ----------------------- Data that will be left out -------------