The scripts in this repo are a combination of wrappers and quality checking scripts that take neuroimaging files from DICOMS to Niftis named and structured as per BIDS. They add functionality to the Dcm2Bids scripts that allow the user to:
- Convert dicoms for all or only a subset of participants in the dicom directory (
- Run the conversion on Talapas, the University of Oregon's high performance cluster (
- Check that the expected files exist for each participant and notify the user if there is a discrepency (
- Rename task runs, retaining those that occured latest in time (
The purpose of these scripts is to allow the user to run batches of specific subjects on a high performance cluster -- or -- to run the subjects serially on a local machine. They also provide some functionality to check that the resultant data contains the expected runs.
- Using bidsQC: Overview
- Repository Contents
- Final BIDS Steps
- Detailed tutorial: University of Oregon specific
- Using either git clone or the download button, copy this repo to the machine you will use for dicom conversion. This can be your local machine or a high performance cluster such as the UO's Talapas.
- Convert your DICOMS to Nifti files that adhere to BIDS. To do so, you can:
- Convert all DICOMS in a specified directory. Simply follow the instructions on the Dcm2Bids tutorial. The tutorial is comprehensive and should have all of the information you need.
- Or you can convert only a subset of the participant data, or run the conversion in a cluster environment such as Talapas. To do so, see the instructions and scripts in the conversion folder of this repo.
- Check that the results of the conversion and renaming are as expected. You can use the files in the qualityCheck folder of this repo to help you do so.
- Verify your data are in BIDS using the BIDS Validator
- Python 3 with the
futuremodule (pip install of cbedetti's
dcm2bidswill install the future module)
dcm2niixconversion tool. If it is not already available on your machine or cluster, install it.
- Get via the rordenlab github
dcm2BidsIf it is not already available on your machine or cluster, install it.
Note: to check if Python 3, dcm2niix, or other packages are available on a Linux cluster, type
module avail [packageName] at the command line, e.g.
module avail Python3
The scripts located in the conversion folder allow the user to convert dicoms for only a subset of participants in the dicom directory and to run the conversion on Talapas, the University of Oregon's high performance cluster. They build off of Dcm2Bids, which on its own will allow you to convert the DICOM files to Nifti files en masse. See the Dcm2Bids tutorial to learn how to do the basic conversion and for detailed instructions on how to create the configuration file specific to your study's dicoms.
For instructions on how to use the conversion scripts, see the conversion folder README.
Once Niftis are in BIDS, these scripts can be used to check whether each sequence has the correct number of runs. Files in the target directories are checked against values in the configuration file where the user specifies how many runs of each sequence are expected at each time point. Optional: append the
run-## key-value string to file names based on sequence order (option specifed in config file).
For step-by-step instructions and a description of the naming rules, see the qualityCheck README.
Place these files in the top level bids directory.
- A JSON for each functional task with TaskName and RepetitionTime
- README (optional, but strongly recommended)
- CHANGES (optional, but strongly recommended)
BIDS validator: http://incf.github.io/bids-validator