Skip to content

anamatoso/connectivity-analysis-diffusion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Structural connectivity analysis in migraine patients

This repository provides the code used to analyze the data of migraine patients in the paper: Structural connectome changes in episodic migraine: the role of the cerebellum

The overall pipeline can be seen in the picture below:

pipeline

How to use

You'll need MRtrix, FSL, and MATLAB installed on the computer you'll use to run the code. Then download this repository into a folder of your choosing by going to that folder and then cloning it:

git clone https://github.com/anamatoso/connectivity-analysis-diffusion.git

Prepare data

The data directory structure should be the following:

.
├── tractography.sh                                            # DWI Script
├── bvals.bval                                                 # b-values file
├── data                                                       # Data folder
    ├── sub-controlXXX_ses-[SESSION]                           # Folder with the dMRI files
    │   ├── sub-controlXXX_ses-[SESSION]_clean.nii.gz          # dMRI image (already preprocessed)
    │   ├── sub-controlXXX_ses-[SESSION]_clean_mask.nii.gz     # dMRI image mask 
    │   └── sub-controlXXX_ses-[SESSION]_rotated_bvecs.bvec    # b-vectors
    ├── sub-controlXXX                                         # Anatomic imge folder
        └── sub-controlXXX_restored-MPRAGE_brain.nii.gz        # T1-weighted image
    └── ...
├── matrix_data                                                # Output data folder (created automatically)
├── main.m                                                     # Main MATLAB Script
└── ...                                                        # Other MATLAB files and folders

Tractography

Run the file tractography.sh for every patient folder you have with dMRI data (sub-controlXXX_ses-[SESSION]).

Should your directory structure be different, just change Step 1 accordingly so that the variables point to the correct files.

Connectivity Analysis

You'll need MATLAB installed (I used the 2023a version, but older versions should also work) as well as the NBS toolbox. Then open MATLAB, go into the repository and run main.m in the command window of MATLAB:

run main.m

Note: don't forget to add the NBS folder to PATH in MATLAB before running the file.

About

This repository holds the code used in the paper:

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published