Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

mikiminachx/mri_preprocessing

 
 

Repository files navigation

Commandline python wrappers for fmriprep


Usage:

Requirements: dcm2niix, dcm2bids and fmriprep (version: 20.2.1)

Step 0:

# install required modules
pip install -r requirements.txt
# change directory to the script folder
cd /path/to/script_folder

Step 1:

python 01_get_dicom.py -p /path/to/dicom_directory -k1 DICOM -k2 A

Step 2:

python 02_prep_config.py 1 -i dicomlist.txt
# prompt will be popped up

Step 3:

python 03_list_subj.py

# Sample Output of Step 3:
# Indice can be used in the Step 4 and 5 to indicate which subjects you would
# like to include and process
# --------------------------------------------------------------------------------
# Index                      DICOM Directories                      SubjID Session
# --------------------------------------------------------------------------------
# 0     /home/user/projects/subj0001/DICOM                            001   0000
# 1     /home/user/projects/subj0002/DICOM                            002   0000
# 2     /home/user/projects/subj0003/DICOM                            003   0000

Step 4:

# transform dicom to nii with a BIDS structure
python 04_run_dcm2bids.py 0-2 config.json --forcecopy

Step 5:

# run fmriprep
python 05_run_fmriprep.py 0-2

Step 6:

# run mriqc
python 06_run_mriqc.py 0-2

REMARKS 1: config.json is a project specific config file, specifying how the dim2bids function organizes the output NIFTI files

REMARKS 2: dataset_description.json is a mandatory metadata file which is placed in the BIDS output folder


adapted from https://github.com/kelvinlim/bids_scripts

About

Python scripts for fmriprep

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%