Dr. Kyle Kurkela Research Computing Service, Boston University Spring 2025 Please contact us at help@scc.bu.edu. ==================================================================================== BIDS 1. Copy the tutorial data a. Navigate to the "tutorial" project directory []$ cd /projectnb/tutorial b. Create a new directory tuta#. Replace the "#" with your tutorial account number []$ mkdir tuta0 c. Navigate to the your newly created "tuta#" directory []$ cd tuta0 d. Copy zipped data your newly created "tuta#" directory []$ cp /project/scv/examples/imaging/tut_dataprep_scc/* . e. Unzip the dicom data []$ unzip dicom.zip f. remove the compressed dicom archive []$ rm dicom.zip 2. Explore the DICOM files a. Navigate to the dicom directory []$ cd dicom b. Explore the files contained within the directory "dicom" using the file explorer. You can also inspect the data files using: []$ ls c. To see what a single DICOM file header looks like, you can use the AFNI's dicom_hdr tool: Load the SCC afni module to use afni commands []$ module load afni To see the help information for this command: []$ dicom_hdr | less To inspect a DICOMs header information: []$ dicom_hdr 1.3.12.2.1107.5.2.43.166024.30000022072919140806900000007-9-99-nkpf0x.dcm | less 3. DICOMs -> NIFTIs a. load the SCC's dcm2niix module []$ module load dcm2niix b. make a new directory called "nifti" to save the output []$ mkdir nifti c. take a quick look at the help for more options []$ dcm2niix -h d. convert from DICOM -> NIFTI! Will take a minute or two []$ dcm2niix -o nifti/ dicom/* e. Explore the files contained within the directory "nifti" using the file explorer. You can also inspect the data files using: []$ ls nifti f. explore the header information using the tool sublime []$ module load sublime []$ sublime nifti/dicom_T1_MEMPRAGE_1.0mm_p3_20220801133223_7.json g. explore the imaging data using freesurfer's freeview []$ module load freesurfer []$ freeview nifti/dicom_T1_MEMPRAGE_1.0mm_p3_20220801133223_7.nii 4. DICOMs -> NIFTIs -> BIDS a. load the dcm2bids module []$ module load dcm2bids b. create a new directory where you want to store your BIDS formated data []$ mkdir bids c. create a bids 'scaffold' -- a directory with all the BIDS meta data files and folders in place []$ dcm2bids_scaffold -o bids d. use the tree command to see how the directory is organized []$ tree bids/ e. create a config.json file using your preferred text editor []$ module load sublime []$ sublime config.json f. bids-ify your DICOM files!! []$ dcm2bids -d dicom -p 001 -c config.json -o bids g. remove the temporary bids directory []$ rm -rf bids/tmp_dcm2bids h. test the dataset using the bids valdiator []$ firefox --new-window https://bids-standard.github.io/bids-validator/ & i. add some text to the README file []$ module load sublime []$ sublime bids/README j. remove the two subjects from the participants.tsv file []$ module load sublime []$ sublime bids/participants.tsv k. test the dataset again []$ firefox --new-window https://bids-standard.github.io/bids-validator/ & l. look at the dataset descripton, README, participants.tsv []$ sublime bids/dataset_description.json []$ sublime bids/README []$ sublime bids/participants.tsv ==================================================================================== MRIQC a. open the mriqc.qsub file and edit the file paths to suit your needs: []$ module load sublime []$ sublime 02_mriqc.qsub b. submit the job to the queue to run. It should take approximately 45 minutes to run []$ qsub 02_mriqc.qsub c. Once the job has finished running, inspect the html reports using a web browser: []$ firefox --new-window bids/derivatives/mriqc/sub001_task-checkerboard_bold.html & ==================================================================================== FMRIPREP a. open the mriqc.qsub file and edit the file paths to suit your needs: []$ module load sublime []$ sublime 03_fmriprep.qsub b. submit the job to the queue to run. It should take approximately 1.5 hours to run []$ qsub 03_fmriprep.qsub c. Once the job has finished running, inspect the html reports using a web browser: []$ firefox --new-window bids/derivatives/fmriprep/sub-001.html &