Size: 5104
Comment:
|
Size: 5317
Comment: Minor edits, for clarification.
|
Deletions are marked like this. | Additions are marked like this. |
Line 2: | Line 2: |
''Author: Martin Cousineau'' | ''Author: Martin Cousineau, with minor edits by Sylvain Baillet.'' |
Line 4: | Line 4: |
It is now possible to export your raw files in the [[http://bids.neuroimaging.io/|Brain Imaging Data Structure (BIDS)]] format. | Brainstorm can export raw files following the standard organization of the [[http://bids.neuroimaging.io/|Brain Imaging Data Structure (BIDS)]]. |
Line 6: | Line 6: |
'''Note:''' For the time being, only MEG data files in CTF format can be exported in the BIDS format. | '''Note:''' Only MEG data files in CTF format are supported for now. MEG-BIDS export of other MEG formats will be supported shortly. We will also support EEG and e-phys BIDS exports when the specifications for those data types are finalized by the BIDS community. |
Line 11: | Line 11: |
* First, select the raw files you would like to export and drag them in the process box. | * Select one or several raw files you would like to export and drag them in the process box. |
Line 18: | Line 18: |
* '''Output folder''': An empty folder where a BIDS folder organization will be created by the process, or an existing BIDS-formatted folder where new recordings will be appended. * '''Subject names''': The naming convention to use for subjects (sub-XXXX) * __Custom names__: The Brainstorm subject names will be kept, with non-alphanumeric characters removed. For example, if your subject name in brainstorm is Subject01, the BIDS-formatted name for this subject will be sub-Subject01. * __Number index__: An auto-incremented 4 digit index number will be automatically assigned to each subject based on their alphabetical order. For example, Subject01 will be sub-0001. If the output folder specificed above is an existing BIDS-formatted folder, numbering will start from the last subject ID. * '''Session names''': The naming convention to use for sessions (ses-XXXX) * __Acquisition date__: The acquisition date extracted from the raw file metadata, or the date the data was imported in Brainstorm if that fails, will be used for session names (e.g. ses-20181023). This is the default behavior for the emptyroom subject regardless of the value of this option. * __Number index__: An auto-incremented 4 digit index number will be automatically assigned to each session of a subject, ordered by their acquisition date. For example, if Subject01 has two sessions recorded at 10AM and 2PM the same day, the 10AM session will be ses-0001 and the 2PM session will be ses-0002. If the output folder specified aboveis an existing BIDS-formatted folder with previous sessions of the same subject already present, the numbering will start from the last session ID. * '''Keywords to detect empty room recordings''': In order to properly assign empty room recordings to the special emptyroom subject, the process will look for these comma-separated keywords in the condition name (raw folder). If you would like not to have an emptyroom subject, leave this blank. * '''Overwrite existing files''': If the output folder provided above is an existing BIDS-formatted folder, this option specifies whether to overwrite existing raw files or not. If not checked, the process will skip existing files. |
* '''Output folder''': An empty folder where BIDS data will stored, or an existing BIDS-formatted folder where the selected recordings will be appended. * '''Subject names''': The naming convention for subjects (sub-XXXX) * __Custom names__: Choose this option to preserve Brainstorm's subject labels: non-alphanumeric characters will removed for compliance with MEG-BIDS. For example, if you have a subject label in Brainstorm as Subject01, the BIDS-formatted name for this subject will become sub-Subject01. * __Number index__: An auto-incremented 4 digit index number will be automatically assigned to each subject based on their alphabetical order. For example, Subject01 will become sub-0001. If the output folder is already an existing BIDS-formatted folder, numbering will start after the last subject ID found in the existing BIDS folder (no overwriting). * '''Session names''': The naming convention used for sessions (ses-XXXX) * __Acquisition date__: The acquisition date extracted from the raw file metadata, or the date the data was imported in Brainstorm if the latter fails (e.g., ses-20181023). This is the default behavior for the emptyroom subject regardless of the value of this option. * __Number index__: An auto-incremented 4-digit index number will be automatically assigned to each session of a subject, ordered by acquisition date. For example, if Subject01 has two sessions recorded at 10AM and 2PM the same day, the 10AM session will be labelled ses-0001 and the 2PM session will be labelled ses-0002. If the output folder is an existing BIDS-formatted folder with previous sessions of the same subject already present, the numbering will start after the last session ID. * '''Keywords to detect empty-room recordings''': In order to properly register empty-room recordings with the special empty-room subject, the process will look for specificied comma-separated keywords in the condition name (raw folder). If you don't need to feature an empty-room subject, please leave this blank. * '''Overwrite existing files''': If the output folder is an existing BIDS-formatted folder, this option specifies whether to overwrite existing raw files or not. If not checked, the process will skip (not overwrite) existing files. |
Line 29: | Line 29: |
The BIDS specification has some required fields in both the general dataset description JSON file and the specific MEG sidecard JSON files. Using the raw files metadata, this process is able to detect most fields required by the BIDS specification. However, two fields cannot be detected and need to be specified by the user in the process options. | The BIDS specification has required fields in both the general dataset description JSON file and the specific MEG sidecar JSON files. Using the raw files metadata, Brainstorm detects and specifies most of these required fields. However, two fields cannot be detected automatically and need to be specified by the user via these process options: |
Line 31: | Line 31: |
* '''Power line frequency''': The frequency of the power line at the acquisition site (typically 50 Hz in Europe, 60 Hz in North America). | * '''Power line frequency''': The frequency of the power line at the acquisition site (e.g., 50 Hz in Europe, 60 Hz in North America). |
Line 35: | Line 35: |
The two following options need to be formatted in [[https://en.wikipedia.org/wiki/JSON|JSON]], see example in the default value of the proces options. To add more than one field, just add a comma at the end of the "field": "value" lines. You may leave them blank if you do not want to provide additional optional fields. | The two following options need to be formatted in [[https://en.wikipedia.org/wiki/JSON|JSON]], see the examples below. To add more fields, add a comma at the end of the "field": "value" lines. You may leave these blank if you do not want to provide additional optional fields. |
Line 43: | Line 43: |
* BIDS specification official website: http://bids.neuroimaging.io/ | * BIDS official website: http://bids.neuroimaging.io/ |
Line 49: | Line 49: |
* Niso G, Flandin G, Gramfort, A Henson, RN, Jas M, Litvak V, Moreau JT, Oostenveld R, SchoffelenJ-M, Tadel F, Wexler J, Baillet S (2018), [[https://dx.doi.org/10.1038%2Fsdata.2018.110|MEG-BIDS, the brain imaging data structure extended to magnetoencephalography]], 5: 180110 EP | * Niso G, Flandin G, Gramfort, A Henson, RN, Jas M, Litvak V, Moreau JT, Oostenveld R, SchoffelenJ-M, Tadel F, Wexler J, Baillet S (2018), [[https://dx.doi.org/10.1038/sdata.2018.110|MEG-BIDS, the brain imaging data structure extended to magnetoencephalography]], 5: 180110 EP |
Export raw files in BIDS format
Author: Martin Cousineau, with minor edits by Sylvain Baillet.
Brainstorm can export raw files following the standard organization of the Brain Imaging Data Structure (BIDS).
Note: Only MEG data files in CTF format are supported for now. MEG-BIDS export of other MEG formats will be supported shortly. We will also support EEG and e-phys BIDS exports when the specifications for those data types are finalized by the BIDS community.
How to use
- Select one or several raw files you would like to export and drag them in the process box.
- Click on [Run] to open the pipeline editor window.
Select the process "File -> Export MEG-BIDS dataset".
Process options
Output folder: An empty folder where BIDS data will stored, or an existing BIDS-formatted folder where the selected recordings will be appended.
Subject names: The naming convention for subjects (sub-XXXX)
Custom names: Choose this option to preserve Brainstorm's subject labels: non-alphanumeric characters will removed for compliance with MEG-BIDS. For example, if you have a subject label in Brainstorm as Subject01, the BIDS-formatted name for this subject will become sub-Subject01.
Number index: An auto-incremented 4 digit index number will be automatically assigned to each subject based on their alphabetical order. For example, Subject01 will become sub-0001. If the output folder is already an existing BIDS-formatted folder, numbering will start after the last subject ID found in the existing BIDS folder (no overwriting).
Session names: The naming convention used for sessions (ses-XXXX)
Acquisition date: The acquisition date extracted from the raw file metadata, or the date the data was imported in Brainstorm if the latter fails (e.g., ses-20181023). This is the default behavior for the emptyroom subject regardless of the value of this option.
Number index: An auto-incremented 4-digit index number will be automatically assigned to each session of a subject, ordered by acquisition date. For example, if Subject01 has two sessions recorded at 10AM and 2PM the same day, the 10AM session will be labelled ses-0001 and the 2PM session will be labelled ses-0002. If the output folder is an existing BIDS-formatted folder with previous sessions of the same subject already present, the numbering will start after the last session ID.
Keywords to detect empty-room recordings: In order to properly register empty-room recordings with the special empty-room subject, the process will look for specificied comma-separated keywords in the condition name (raw folder). If you don't need to feature an empty-room subject, please leave this blank.
Overwrite existing files: If the output folder is an existing BIDS-formatted folder, this option specifies whether to overwrite existing raw files or not. If not checked, the process will skip (not overwrite) existing files.
MEG sidecar required fields
The BIDS specification has required fields in both the general dataset description JSON file and the specific MEG sidecar JSON files. Using the raw files metadata, Brainstorm detects and specifies most of these required fields. However, two fields cannot be detected automatically and need to be specified by the user via these process options:
Power line frequency: The frequency of the power line at the acquisition site (e.g., 50 Hz in Europe, 60 Hz in North America).
Position of the dewar during the MEG scan: "upright", "supine" or "degrees" of angle from vertical: for example on CTF systems, upright=15°, supine = 90°.
MEG sidecar optional fields
The two following options need to be formatted in JSON, see the examples below. To add more fields, add a comma at the end of the "field": "value" lines. You may leave these blank if you do not want to provide additional optional fields.
Additional dataset description JSON fields: Any additional JSON fields you would like to add to the dataset_description.json file at the root of your BIDS directory.
Additional MEG sidecar JSON fields: Any additional JSON fields you would like to add to the <sub-0001_ses-0001_task-taskName>_meg.json files that accompany your data files.
Additional documentation
Website
BIDS official website: http://bids.neuroimaging.io/
JSON format description: https://en.wikipedia.org/wiki/JSON
Articles
Gorgolewski, K.J., Auer, T., Calhoun, V.D., Craddock, R.C., Das, S., Duff, E.P., Flandin, G., Ghosh, S.S., Glatard, T., Halchenko, Y.O. and Handwerker, D.A. (2016)
The brain imaging data structure, a format for organizing and describing outputs of neuroimaging experiments, Scientific Data, 3, p.160044.Niso G, Flandin G, Gramfort, A Henson, RN, Jas M, Litvak V, Moreau JT, Oostenveld R, SchoffelenJ-M, Tadel F, Wexler J, Baillet S (2018), MEG-BIDS, the brain imaging data structure extended to magnetoencephalography, 5: 180110 EP