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 into 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. You can learn more about how the templating engine processes files in this article.
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 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).
-
Run the curate-bids gear(as described in this article) on the project.
If you would like to rename subjects/sessions/acquisitions before curation, you may find the bids-pre-curategear helpful.
Note
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.
The safest way to run curate-bids is be sure to do these two things:
Turn OFF the option called entire_project
Leave OFF the option called reset (the default is off).
To run the BIDS curation gear on a new session in a previously curated project:
Select a session: click on a particular session for a subject, e.g. session “baseline” for subject “B026”.
With BIDS View off, click Run Gear.
Choose Utility Gear.
Select the BIDS Curation gear. The version should be the latest.
There are no inputs.
Click Configuration.
Make sure entire_project and reset are both disabled.
Click Run Gear.
If both are enabled, it will reset all BIDS information for the whole project and re-curate everything. That means any changes done by hand to the BIDS settings will have to be re-done, including finding the scans set to "ignore".
If you leave entire_project enable and don't enable reset, 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 settings are disabled and run the gear on each session individually.
We also have a collection of webinars on using BIDS and Flywheel.