Skip to content

cpp-lln-lab/bidspm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3,952 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

pre-commit.ci status miss hit Documentation Status: main Binder tests matlab tests octave codecov DOI GitHub last commit All Contributors

bidspm

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

Installation

From docker hub

docker pull cpplab/bidspm:latest

From source

In a terminal or a git bash prompt, type:

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

To start using bidspm, you just need to initialize it for the current MATLAB / Octave session with:

bidspm()

Please see our documentation for more info.

Usage

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

See this page for more information.

But in brief they are of the form:

bidspm(bids_dir, output_dir, ...
        'analysis_level', ...
        'action', 'what_to_do')

Creating a default BIDS statistical model

Use a MATLAB / Octave script with:

% path to your raw BIDS dataset
bids_dir = path_of_raw_bids_dataset;

% where you want to save the model
output_dir = path_where_the_output_should_go;

tasks_to_include_in_model = {'task1', 'task2', 'task3'};

% for example 'MNI152NLin2009cAsym'
space_to_include_in_model = {'spaceName'};

bidspm(bids_dir, output_dir, 'dataset', ...
        'action', 'default_model', ...
        'task', tasks_to_include_in_model, ...
        'space', space_to_include_in_model)

GLM

Use a MATLAB / Octave script with:

% path to your raw BIDS dataset
bids_dir = path_of_raw_bids_dataset;

% where you want to save the model
output_dir = path_where_the_output_should_go;

preproc_dir = path_to_preprocessed_dataset; % for example fmriprep output

model_file = path_to_bids_stats_model_json_file;

subject_label = '01';

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

Preprocessing

bids_dir = path_to_raw_bids_dataset;
output_dir = path_to_where_the_output_should_go;

subject_label = '01';

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

Features

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)

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 bidspm 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

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

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{bidspm,
  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 and Caron-Guyon, Jeanne and Chouinard-Leclaire, Christine and Yang, Ying and Mattioni, Stefania and Van Audenhaege, Alice and Matuszewski, Jacek},
  license = {GPL-3.0},
  title = {{bidspm}},
  url = {https://github.com/cpp-lln-lab/bidspm},
  version = {4.0.0}
}

Posters

Contributors

Thanks goes to these wonderful people.

(emoji key):

Alice Van Audenhaege
Alice Van Audenhaege

πŸ› πŸ““
Ane Gurtubay
Ane Gurtubay

πŸ’» 🎨
Ceren Battal
Ceren Battal

πŸ› πŸ–‹ πŸ“– πŸ’» πŸ‘€ πŸ““
Christine Chouinard-Leclaire
Christine Chouinard-Leclaire

πŸ€” πŸ›
Daniel Huber
Daniel Huber

πŸ› πŸ’»
Federica Falagiarda
Federica Falagiarda

πŸ› πŸ““
Filippo Cerpelloni
Filippo Cerpelloni

πŸ› ⚠️ πŸ““
Iqra Shahzad
Iqra Shahzad

πŸ› πŸ“– πŸ’¬ πŸ‘€ πŸ““
Jacek Matuszewski
Jacek Matuszewski

πŸ› πŸ““
Jeanne Caron-Guyon
Jeanne Caron-Guyon

πŸ› πŸ’‘ πŸ““ πŸ’¬ βœ…
Manon Chateaux
Manon Chateaux

πŸ›
Marco Barilari
Marco Barilari

πŸ’» 🎨 πŸ‘€ πŸ“– ⚠️ πŸ› πŸ““ πŸ€”
Michèle MacLean
Michèle MacLean

πŸ’» πŸ€” πŸ““ πŸ›
Mohamed Rezk
Mohamed Rezk

πŸ’» πŸ‘€ 🎨
Monique Denissen
Monique Denissen

πŸ› πŸ’»
MΓ‘rcia Nunes
MΓ‘rcia Nunes

πŸ›
Olivier Collignon
Olivier Collignon

πŸ’» 🎨 πŸ“– πŸ’΅ πŸ”
Remi Gau
Remi Gau

πŸ’» πŸ“– πŸ€” πŸš‡ 🎨 πŸ‘€ πŸ› ⚠️ πŸ–‹ 🎨 βœ… 🚧
Stefania Mattioni
Stefania Mattioni

πŸ› πŸ““
Ying Yang
Ying Yang

πŸ› πŸ““

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