This is the official code for Revealing Differential Psychotic Symptom patterns in Schizophrenia and Bipolar I Disorder by Manifold Learning and Network Analysis (Kim et al., 2024).
This repository contains Python and R scripts for analyzing psychotic symptoms in schizophrenia and bipolar I disorder using manifold learning and network analysis. The analyses include visualization of symptom distributions, support vector machine (SVM) decision boundaries, and network centrality measures.
manifold_analysis.py
: Python script for manifold learning and visualization of psychotic symptoms.network_analysis.R
: R script for network analysis of psychotic symptoms.
numpy
pandas
umap-learn
scikit-learn
matplotlib
networktools
IsingFit
qgraph
igraph
bootnet
NetworkComparisonTest
haven
centiserve
cowplot
dplyr
patchwork
-
Clone the repository:
git clone https://github.com/your_username/scz_bip_manifold.git cd scz_bip_manifold
-
Install Python dependencies:
pip install numpy pandas umap-learn scikit-learn matplotlib
-
Install R dependencies:
install.packages(c("networktools", "IsingFit", "qgraph", "igraph", "bootnet", "NetworkComparisonTest", "haven", "centiserve", "cowplot", "dplyr", "patchwork"))
-
Run the manifold analysis:
python manifold_analysis.py
-
This script will normalize and embed the data using UMAP, and visualize symptom distributions and SVM decision boundaries. Results will be saved in the
results/
directory as svg format.
- Run the network analysis:
Open
network_analysis.R
in an R environment, and execute the script. - This script will perform network analysis on the schizophrenia and bipolar I disorder data, calculating and plotting centrality measures (Katz, betweenness, closeness, strength). Results will be saeved in the
results/
directory.
If you use this code, please cite the following paper:
Kim, et al. (2024). "Revealing Differential Psychotic Symptom Patterns in Schizophrenia and Bipolar I Disorder by Manifold Learning and Network Analysis."