Now that we have prepared our data and converted the scans to NIfTI format, we can run the BIDS Curation gear. Note that Flywheel currently supports BIDS version 1.4.1. However, templates can be extended to support later BIDS versions and BIDS Extension Proposals (BEPs).
Unlike previously run gears, there is no need to batch run BIDS Curation because it curates the whole project. To run the BIDS curation gear on your project:
-
Click the Sessions icon.
-
Select the Acquisitions tab, and click Run Gear.
-
Select Utility Gear, and choose BIDS Curation.
-
This gear has no inputs. You can run it on a particular session or on the whole project.
-
Keep the default configuration.
If you want to see the options are available, click the Configuration tab.
The Gear is set to run on the entire project (which is what we want), reset is off and the Default template is selected.
reset: Enable if you want to re-curate your project. This option erases all previous curation information and starts over.
template_type: A menu of the different templates you can choose. If you have named your acquisitions by setting the SeriesDescription DICOM tag at the scanner console to the ReproIn standard, you will need to select the ReproIn from the list. The default template is BIDS-v1. Choose Custom if you want to supply your own template.
Click Run Gear.
-
Go to the Provenance tab to view the jobs. Once the job completes, click View Logs for the "curate-bids" job.
Review how files were recognized (or not) and which rule was used to determine the BIDS information. The BIDS Curation gear steps through the entire project hierarchy beginning at the project level. It first matches the project container using the "bids_project" rule and sets BIDS Custom Information on the project container.
-
Let's see how the BIDS information looks for the project. Refresh the page and click the Information tab at the top. You can see BIDS under Custom Information and an attached CSV file.
The CSV file contains the source and destination directories of the files that were uploaded to the project (when we uploaded data from part 1 of tutorial).
-
Click the expand
button next to BIDS to view the section. Here you can see the BIDS Custom Information that was set by the curate-bids gear.
This shows the default BIDS project information that was installed by the project curation template. When BIDS curation is complete, this information is will be completely filled out. When Flywheel exports BIDS data, it converts metadata into the proper file and folder structure specified by the BIDS Standard. The metadata on the project (shown above) will be written to the dataset-description.json file as described in the BIDS Standard here.
-
Let's take a look at how the acquisitions were curated. Click the Sessions tab at the top of the oage, and then select the Acquisitions tab.
-
Now that the data has been curated for BIDS, toggle on the BIDS View. Refresh your browser window if you do not see any changes.
-
Select a session. Note that the acquisitions are all under nonBids. This means the Default project curation template did not recognize any of the scans in the first session.
-
Review the other session. For example:
Here we can see that:
The functional MRI scans were recognized by the Default template
The NIfTI files were properly put into the func BIDS folder
The DICOM archives were all properly put into the sourcedata folder.
-
Hover over the gear icon to see which acquisition corresponds to this BIDS path:
Note the BIDS file name for example, sub-DEV_ses-20180918114023_task-{file.info.BIDS.Task}_bold.nii.gz. When you see {file.info.BIDS.Task}, it means that the BIDS curation template was not able to determine the proper value for the Task. BIDS curation did not succeed in this case because the Default template expects to see "_task-taskname" in the acquisition label (SeriesDescription DICOM tag).
-
Select the information icon
to see all of the BIDS information for a particular file. The classification for Modality, Features, Intent, and Measurement for this file look good.
-
Next to BIDS, click
to see that information for this file:
Here next to error_message you can see Task '' does not match '^[a-zA-Z0-9]+$' , which shows the regular expression the template used that failed to match with a file. It also shows the full name of the acquisition file, "4_Axial_EPI_FMRI_Interleaved_I_to_S.nii.gz" (near the top-left).
-
We can also view this same information outside of BIDS View:
Disable BIDS View to see the "4_Axial_EPI_FMRI_Interleaved_I_to_S.nii.gz" file.
-
Select the click Information icon
.
Continue to BIDS curation tutorial part 3: troubleshooting and debugging to fix the errors from the BIDS curation gear.