This repository consists of the original code created in order to detect structural alterations in episodic migraine using graph theory metrics. It was done in the scope of my Master's Thesis in Biomedical Engineering at Instituto Superior Técnico. In this work, a comparison was made not only between controls and patients but also longitudinally between different stages of the menstrual cycle. In addition, it was also studied the impact of different software packages on the calculation of the connectivity matrix and of different normalizations of the connectivity matrix.
Firstly, from the DWI images, connectivity matrices had to be created. To do that, the bash files in ./shell_scripts
were used. Two software packages were used and compared: MRtrix and FSL. To create a connectivity matrix using MRtrix one only needs to run the MRTrix_Script.sh
. On the other hand, if you want to use FSL, you only need to run FSL_01_bedpostx.sh
followed by either FSL_02_tractography.sh
or FSL_02_tractography_mat3.sh
. Note that to run tractography files of FSL, you first need to run divide_atlas.sh
.
Then, with the connectivity matrices of all subjects, an analysis in MATLAB can be done using the files in ./matlab_scripts
(and some functions of the which are not included in this repository).
This folder has 3 main files: main_analysis.m
, main_comparisons.m
and ISMRM23.m
. These files are dependent on several functions that had to be created by me whose dependencies are explained below.
The main_analysis.m file is responsible for the analysis between groups. It is dependent on many functions that can be divided into 6 groups/objectives according to the following images:
Loading data | Altering Matrices |
---|---|
Calculating Connectivity Metrics | Visualization of Results using Boxplots |
Visualization of Results using BrainNet | Statistical Analysis |
Additionally, the main_comparisons.m was used to compare values between normalizations. Besides the functions mentioned before, the following were also used:
Finally, the ISMRM23.m file is very similar to the main analysis however, the metrics used were calculated using a null model as a normalization. Thus, the following functions were used:
Furthermore, if you need any further explanation, do not hesitate to contact me!