Demo and tutorial¶
BIDS introduction and BIDScoin demo¶
A good starting point to learn more about BIDS and BIDScoin is to watch this presentation from the OpenMR Benelux 2020 meeting (slides). The first 14 minutes Robert Oostenveld provides a general overview of the BIDS standard, after which Marcel Zwiers presents the design of BIDScoin and demonstrates hands-on how you can use it to convert a dataset to BIDS.
Hands-on tutorial¶
The following tutorial is specific for researchers from the DCCN and makes use of data-sets stored on its central file-system. However, it should not be difficult to use (at least part of) this tutorial for other data-sets as well.
- Preparation. Activate the bidscoin environment and create a tutorial playground folder in your home directory by executing these bash commands (see also
module help bidscoin
):
$ module add bidscoin
$ source activate /opt/bidscoin
$ cp -r /opt/bidscoin/tutorial ~
The new tutorial
folder contains a raw
source-data folder and a bids_ref
reference BIDS folder, i.e. the end product of this tutorial.
Let’s begin with inspecting this new raw data collection:
- Are the DICOM files for all the sub-/ses- folders organised in series-subfolders (e.g. sub-001/ses-01/003-T1MPRAGE/0001.dcm etc)? Use dicomsort if this is not the case
- Use the rawmapper command to print out the DICOM values of the “EchoTime”, “Sex” and “AcquisitionDate” of the fMRI series in the
raw
folder
- BIDS mapping. Scan all folders in the raw data collection for unknown data by running the bidsmapper bash command:
$ bidsmapper raw bids
- Rename the task label of the functional scans into something more readable, e.g. “Reward” and “Stop”
- Add a search pattern to the IntendedFor field such that it will select your fMRI runs (see the bidseditor
fieldmap
section for more details) - When all done, (re)open the
bidsmap.yaml
file and change the options such that you will get non-zipped nifti data (i.e.*.nii
instead of*.nii.gz
) in your BIDS data collection. You can use a text editor or, much better, run the bidseditor command line tool.
- BIDS coining. Convert your raw data collection into a BIDS collection by running the bidscoiner commandline tool (note that the input is the same as for the bidsmapper):
$ bidscoiner raw bids
- Check your
bids/code/bidscoin/bidscoiner.log
andbids/code/bidscoin/bidscoiner.errors
files for any errors or warnings - Compare the results in your
bids/sub-*
subject folders with the inbids_ref
reference result. Are the file and foldernames the same? Also check the json sidecar files of the fieldmaps. Do they have the right “EchoTime” and “IntendedFor” fields? - What happens if you re-run the bidscoiner command? Are the same subjects processed again? Re-run “sub-001”.
- Inspect the
bids/participants.tsv
file and decide if it is ok. - Update the
dataset_description.json
andREADME
files in yourbids
folder - As a final step, run the bids-validator on your
~/bids_tutorial
folder. Are you completely ready now to share this dataset?