The BIDS Curation Gear is developed by Flywheel and provided as part of the Gear Exchange. The purpose of the gear is to generate metadata in Flywheel that maps data within Flywheel into BIDS format so that you can view, export, and analyze your data in BIDS format.
Once installed, the Gear can be run on data within Flywheel (at the session level) by clicking Run Gear, selecting Utility Gear, and selecting BIDS Curation. No additional configuration is necessary, the gear will run against the entire project (or one specific session) and will automatically determine whether to run in initial or update mode on a per file basis.
Once the gear has run, the BIDS view should be available, and the project and any associated files will have BIDS metadata object in their info.
The curation gear can be run as many times as is necessary. After initialization, the only fields that will be changed by the gear on re-execution are fields with auto_update rules specified, as well as the special properties (valid and error_message)
Before You Begin!
Before running the BIDS Curation Gear on your data, you must first prepare your data with the following steps:
Run the SciTran: DICOM MR Classifier gear on all the acquisitions in your project/session
- This step extracts the DICOM header info, and stores it as Flywheel metadata.
Run the DCM2NIIX: dcm2nii DICOM to NIfTI converter gear on all the acquisitions in your dataset
- This step generates the NIfTI files that fMRIPrep needs from the DICOMS. It also copies all Flywheel metadata from the DICOM to the NIfTI file (In this case, all the DICOM header information extracted in step 1).
If you would like to rename subjects/sessions/acquisitions before curation, you may find the bids-pre-curate gear helpful.
NOTE: Steps 1 and 2 can be automatically carried out as gear rules.
These steps MUST be done in this order. Nifti file headers have significantly fewer fields than the DICOM headers. File metadata will be written to .json sidecars when the files are exported in the BIDS format as expected by the fMRIPrep BIDS App which is run by this gear.
The BIDS Curation Gear can be configured with two options, reset and entire_project. The first option will clear the BIDS info object on all assets before curation, thus rematching them to templates. The second configuration option is set true by default, and can be unchecked to only curate a single session instead of the entire project. This is useful if a single session needs to be reset before curating.
Running BIDS Curation on a new session in a previously curated project
The safest way to run curate-bids is be sure to do these two things:
- turn OFF the option called "entire_project", and
- leave OFF the option called "reset" (the default is off).
Here is the procedure:
- Select a session: click on a particular session for a subject, e.g. session “baseline” for subject “B026”.
- With "BIDS View" off, click on the blue "Run Gear" button.
- Click on "Utility Gear".
- Select the "BIDS Curation" gear. The version should be the latest.
- There are no inputs.
- Click on "Configuration" and again, this is the important part,
- Make sure that "entire_project" and "reset" are both un-checked (off)
- Finally, click on the blue "Run Gear" button.
In the worst case, if both are checked (turned on), it will reset all BIDS information for the whole project and re-curate everything. That means that any changes done by hand to the BIDS settings will have to be re-done, including finding the scans set to "ignore". If you don't turn on "reset" but leave "entire_project" on, it may undo certain other changes that you may have done to the BIDS settings. Perhaps you have not changed anything besides the "ignore" setting, and then curating the entire project all at once might be tempting because then you don't have to find each session individually, but the safest way is to make sure that both check boxes are off, just to be sure, and run the gear on each session individually.
Want more? Prefer videos?
We also have a collection of webinars on using BIDS and Flywheel.
- Bids Templating: The BIDS Curation Gear
- Automating BIDS Workflow with Flywheel: BIDS Curated Dataset in Flywheel