Skip to content

adbartni/fmri_preprocessing

Repository files navigation

fMRI Preprocessing

The new and improved resting-state fMRI preprocessing pipeline

Alex Bartnik 06/2019

Due to the free-for-all nature of processing in a notebook leading to inconsistencies and the generation of huge images that were never used in the final analyses, the fMRI preprocessing pipeline has been reworked into one monolithic program to make everyone's lives easier.

This has 3 main advantages:

  • Speed: This program has been designed so that the user may specifiy how many instances of the preprocessing pipeline may be run in parellel (10 is recommended)
  • Easier to understand: This pipeline is also intended to serve as a learning tool for future students to teach basic programming and image processing skills. Processing steps are organized according to what they do and when they do, which is easy for beginners to follow.
  • Easier to QC: Scripts to generate pdf reports at different processing steps are included.

Usage

In order for processing to successfully run, you'll need to make sure you have all of the required python packages (numpy, nilearn, sklearn, pandas). The easiest way to do this is to source the python venv. This is done anytime the user sources activate in the main directory, like: $ source activate

To leave the venv and carry on with your normal life, simply enter 'deactivate' in your terminal.

Once in the python virtual environment, $ pip install -r requirements.txt will install all necessary python packges, if they are not already installed.

The virtual environment uses Python 3.5.

The three necessary arguments are as follows:

    1. Subject list - self explanatory, just a file containing the subjects you want to process
    1. Number of threads - how many instances to run (usually 10, but can use from 1-64 on donut)
    1. Stage - which stage of preprocessing to run; options are "Premelodic," "Melodic," "Postmelodic," and "All"

Specifying the optional cleanup argument will remove intermediary images generated by various processing steps in the pipeline.

Additionally, FSL tools and ANTS need to be installed. We also use some in house software for image conversion and the like.

To run premelodic steps (brain extraction, slicetime correction, motion outlier detection, etc.) on 10 threads:

$ ./main.py subject_list.csv 10 premelodic

About

BNAC fMRI data preprocessing pipeline

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published