This repository contains code for spectrum analysis of ADHD and ASD disorders using Mapper Algorithm.
- Python >= 3.8
- Bash (for running
generator.sh
) - Recommended: Create a virtual environment using
venv
Install dependencies:
pip install -r requirements.txt
Run each step sequentially:
python3 preprocess.py
-
This script performs the following:
-
Loads raw static functional connectivity (SFC) matrices from
.mat
files for Autism, Asperger, and ADHD subtypes. -
Aligns ROI indices to a common 190-ROI standard using a provided Excel mapping file, ensuring all datasets have consistent spatial references for further analysis.
-
python3 split_dataset.py
This script splits the dataset into discovery set and replication set.
python3 evaluate_parameters.py
This script generates plots of DBSCAN epsilon and projection functions to guide the parameter selection.
After reviewing the plots generated by evaluate_parameters.py
, choose the DBSCAN epsilon, minPTS, and projection function that show optimal clustering performance and run the generator script with your selected parameters:
bash generator.sh
cd MapperInteractive
python3 run.py
This step launches the interactive Mapper visualization tool. In the GUI:
- Load the generated graphs directory in
MapperInteractive/app/static/uploads
. - Choose the graph you want to inspect.
- Display and explore the graph interactively.
python3 transition_features.py