Skip to content

JacMatu/CPP_SPM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Documentation Status: main Binder miss_hit tests with octave tests with matlab system tests with matlab pre-commit codecov DOI All Contributors

CPP SPM

This is a Matlab / Octave toolbox to perform MRI data analysis on a BIDS data set using SPM12.

Installation and set up

git clone \
    --recurse-submodules \
    https://github.com/cpp-lln-lab/CPP_SPM.git

To get the latest version that is on the dev branch.

git clone \
    --recurse-submodules \
    --branch dev \
    https://github.com/cpp-lln-lab/CPP_SPM.git

To start using CPP_SPM, you just need to initialize it for this MATLAB / Octave session with::

cpp_spm()

Please see our documentation for more info.

Usage

For some of its functionality cpp_spm has a BIDS app like API.

See this page for more information.

Preprocessing

bids_dir = path_to_raw_bids_dataset;
output_dir = path_to_where_the_output_should_go;

subject_label = '01';

cpp_spm(bids_dir, output_dir, 'subject', ...
        'participant_label', {subject_label}, ...
        'action', 'preprocess', ...
        'task', {'yourTask'})

GLM

bids_dir = path_to_raw_bids_dataset;
preproc_dir = path_to_preprocessed_dataset;
output_dir = path_to_where_the_output_should_go;
model_file = path_to_bids_stats_model_json_file;

subject_label = '01';

cpp_spm(bids_dir, output_dir, 'subject', ...
        'participant_label', {subject_label}, ...
        'action', 'stats', ...
        'preproc_dir', preproc_dir, ...
        'model_file', model_file)

Please see our documentation for more info.

Features

Preprocessing

If your data is fairly "typical" (for example whole brain coverage functional data with one associated anatomical scan for each subject), you might be better off running fmriprep on your data.

If you have more exotic data that cannot be handled well by fmriprep then CPP_SPM has some automated workflows to perform amongst other things:

  • remove dummies

  • slice timing correction

  • spatial preprocessing:

    • realignment OR realignm and unwarp
    • coregistration func to anat,
    • anat segmentation and skull stripping
    • (optional) normalization to SPM's MNI space
  • smoothing

  • fieldmaps processing and voxel displacement map creation (work in progress)

All (well almost all) preprocessed outputs are saved as BIDS derivatives with BIDS compliant filenames.

Statistics

The model specification are set up using the BIDS stats model and can be used to perform:

  • whole GLM at the subject level
  • whole brain GLM at the group level à la SPM (meaning using a summary statistics approach).
  • ROI based GLM (using marsbar)
  • model selection (with the MACS toolbox)

Quality control:

  • anatomical data (work in progress)
  • functional data (work in progress)
  • GLM auto-correlation check

Please see our documentation for more info.

Citation

@software{CPP_SPM,
  author  = {Gau, Rémi and Barilari, Marco and Battal, Ceren and Rezk, Mohamed and Collignon, Olivier and Gurtubay, Ane and Falagiarda, Federica and MacLean, Michèle and Cerpelloni, Filippo and Shahzad, Iqra and Nunes, Márcia},
  license = {GPL-3.0},
  title   = {CPP SPM},
  url     = {https://github.com/cpp-lln-lab/CPP_SPM},
  version = {1.1.5dev},
  doi     = {10.5281/zenodo.3554331},
  publisher = {Zenodo},
  journal = {Software}
}

Contributors

Thanks goes to these wonderful people (emoji key):


Ane Gurtubay

💻 🎨

Ceren Battal

🐛 🖋 📖 💻 👀 📓

Federica Falagiarda

🐛 📓

Filippo Cerpelloni

🐛 ⚠️ 📓

Iqra Shahzad

🐛 📖 💬 👀 📓

Jeanne Caron-Guyon

🐛

Marco Barilari

💻 🎨 👀 📖 ⚠️ 🐛 📓

Michèle MacLean

💻 🤔 📓 🐛

Mohamed Rezk

💻 👀 🎨

Márcia Nunes

🐛

Olivier Collignon

💻 🎨 📖

Remi Gau

💻 📖 🚇 🎨 👀 🐛 ⚠️

Christine Chouinard-Leclaire

🤔

This project follows the all-contributors specification. Contributions of any kind welcome!