IMPORTANT NOTE: upon external code review, this repo contains select scripts that are an older version, and more importantly, gaps in usage notes that were intended to be covered by the manuscript's Methods section. However, upon review, we believe the source scripts themselves would benefit from further context and usage notes. Please note that this repo is maintained by a sole researcher with time constraints who will update this code and document usage more clearly as soon as possible; all with an intended deadline of before the end of 2026. Please reach out to Dr. Cocuzza here if there are issues in the interim: carrisacocuzza@gmail.com.
Code supporting: Brain network dynamics reflect psychiatric illness status and transdiagnostic symptom profiles across health and disease. Cocuzza C.V.*, Chopra S., Segal, A., Labache, L., Chin, R., Joss, K., and Holmes, A.J. (2025). Under Review.
To investigate brain network dynamics linked with dimensionally-based symptom profiles exhibited across a transdiagnostic cohort of participants with and without psychiatric diagnoses.
Corresponding author email: carrisacocuzza@gmail.com
Repository contents:
-
Note that all scripts below include detailed annotations throughout; other contextual details may be found in the Methods section of the manuscript
-
NMF_Cocuzza.py: python functions to implement non-negative matrix factorization (approach used to quantify brain network reconfiguration dynamics)
-
Fingerprints_Cocuzza.py: python functions relevant to our symptom profiling/fingerprinting pipeline (note: RStudio used in select steps; notes are included where appropriate)
-
Data_Splitting_Cocuzza.py: python script on how we split data into train/test/validation to avoid data leakage (see manuscript Methods)
-
Heatmap_NetColors_Cocuzza.py: python function to visualize network color labels on x/y axes of functional connectivity matrices
-
.Rmd scripts: RStudio scripts that are helpful for some functions inside Fingerprints_Cocuzza.py. See usage notes in Fingerprints_Cocuzza.py for details. Note that these R scripts require adaptation to your machine (e.g., directories, etc.) and research study (e.g., dataset specifications).
-
.npy, .csv, and .pkl files. These are helper files for running functions in Fingerprints_Cocuzza.py (see usage notes in that script). These are fully de-identified and can be reconstituted by openly available Transdiagnostic Connectome Project data (see below for links to OpenNeuro and NDA).
Outside resources relevant to manuscript:
- Transdiagnostic Connectome Project data via OpenNeuro and NIMH Data Archive
- Transdiagnostic Connectome Project code repository (including resources for the pre-processing pipeline used in the present manuscript)
- Cortical parcellation repository (note: 400 parcel resolution used in mansucript as well as 17 networks per Yeo et al. 2011), Yan et al., 2023, NeuroImage
- Subcortical atlas repository (note: scale II used in manuscript), Tian et al., 2021, Nature Neuroscience
- Cerebellum identification repository (note: see Buckner study for details on spatial autocorrelation regression), Buckner et al., 2011, Journal of Neurophysiology
- Brain Connectivity Toolbox (used in select analyses; see network efficiency and participation coefficient) for MATLAB and Python
- Human Connectome Project Workbench for projecting results onto cortical surfaces (i.e., brain visualizations)