Wiki source code of Methodology

Last modified by manuelmenendez on 2025/03/14 08:31

Show last authors
1 **Neurodiagnoses AI** is an open-source, AI-driven framework designed to enhance the diagnosis and prognosis of central nervous system (CNS) disorders. It encompasses a broader spectrum of neurological conditions. The system integrates multimodal data sources—including EEG, neuroimaging, biomarkers, and genetics—and employs machine learning models to deliver explainable, real-time diagnostic insights. A key feature of this framework is the incorporation of the **Generalized Neuro Biomarker Ontology Categorization (Neuromarker) **and** Disease Knowledge Transfer (DKT)**, which standardizes disease and biomarker classification across all CNS diseases, facilitating cross-disease AI training.
2
3 **Neuromarker: Generalized Biomarker Ontology**
4
5 Neuromarker extends the Common Alzheimer’s Disease Research Ontology (CADRO) into a comprehensive biomarker categorization framework applicable to all neurodegenerative diseases (NDDs). This ontology enables standardized classification, AI-based feature extraction, and seamless multimodal data integration.
6
7 **Recommended Software**
8
9 There is a suite of software that can help implement the workflow needed in Neurodiagnoses. Find a list of recommendations [[here>>https://github.com/Fundacion-de-Neurociencias/neurodiagnoses/blob/main/recommended_software]].
10
11 **Core Biomarker Categories**
12
13 Within the Neurodiagnoses AI framework, biomarkers are categorized as follows:
14
15 |=**Category**|=**Description**
16 |**Molecular Biomarkers**|Omics-based markers (genomic, transcriptomic, proteomic, metabolomic, lipidomic)
17 |**Neuroimaging Biomarkers**|Structural (MRI, CT), Functional (fMRI, PET), Molecular Imaging (tau, amyloid, α-synuclein)
18 |**Fluid Biomarkers**|CSF, plasma, blood-based markers for tau, amyloid, α-synuclein, TDP-43, GFAP, NfL, autoantiboides
19 |**Neurophysiological Biomarkers**|EEG, MEG, evoked potentials (ERP), sleep-related markers
20 |**Digital Biomarkers**|Gait analysis, cognitive/speech biomarkers, wearables data, EHR-based markers
21 |**Clinical Phenotypic Markers**|Standardized clinical scores (MMSE, MoCA, CDR, UPDRS, ALSFRS, UHDRS)
22 |**Genetic Biomarkers**|Risk alleles (APOE, LRRK2, MAPT, C9orf72, PRNP) and polygenic risk scores
23 |**Environmental & Lifestyle Factors**|Toxins, infections, diet, microbiome, comorbidities
24
25 **Integrating External Databases into Neurodiagnoses**
26
27 To enhance diagnostic precision, Neurodiagnoses AI incorporates data from multiple biomedical and neurological research databases. Researchers can integrate external datasets by following these steps:
28
29 1. (((
30 **Register for Access**
31
32 * Each external database requires individual registration and access approval.
33 * Ensure compliance with ethical approvals and data usage agreements before integrating datasets into Neurodiagnoses.
34 * Some repositories may require a Data Usage Agreement (DUA) for sensitive medical data.
35 )))
36 1. (((
37 **Download & Prepare Data**
38
39 * Download datasets while adhering to database usage policies.
40 * (((
41 Ensure files meet Neurodiagnoses format requirements:
42
43 |=**Data Type**|=**Accepted Formats**
44 |**Tabular Data**|.csv, .tsv
45 |**Neuroimaging**|.nii, .dcm
46 |**Genomic Data**|.fasta, .vcf
47 |**Clinical Metadata**|.json, .xml
48 )))
49 * (((
50 **Mandatory Fields for Integration**:
51
52 * Subject ID: Unique patient identifier
53 * Diagnosis: Standardized disease classification
54 * Biomarkers: CSF, plasma, or imaging biomarkers
55 * Genetic Data: Whole-genome or exome sequencing
56 * Neuroimaging Metadata: MRI/PET acquisition parameters
57 )))
58 )))
59 1. (((
60 **Upload Data to Neurodiagnoses**
61
62 * (((
63 **Option 1: Upload to EBRAINS Bucket**
64
65 * Location: EBRAINS Neurodiagnoses Bucket
66 * Ensure correct metadata tagging before submission.
67 )))
68 * (((
69 **Option 2: Contribute via GitHub Repository**
70
71 * Location: GitHub Data Repository
72 * Create a new folder under /data/ and include a dataset description.
73 * For large datasets, contact project administrators before uploading.
74 )))
75 )))
76 1. (((
77 **Integrate Data into AI Models**
78
79 * Open Jupyter Notebooks on EBRAINS to run preprocessing scripts.
80 * Standardize neuroimaging and biomarker formats using harmonization tools.
81 * Utilize machine learning models to handle missing data and feature extraction.
82 * Train AI models with newly integrated patient cohorts.
83
84 **Reference**: See docs/data_processing.md for detailed instructions.
85 )))
86
87 **AI-Driven Biomarker Categorization**
88
89 Neurodiagnoses employs advanced AI models for biomarker classification:
90
91 |=**Model Type**|=**Application**
92 |**Graph Neural Networks (GNNs)**|Identify shared biomarker pathways across diseases
93 |**Contrastive Learning**|Distinguish overlapping vs. unique biomarkers
94 |**Multimodal Transformer Models**|Integrate imaging, omics, and clinical data
95
96 === **Jupyter Integration with EBRAINS** ===
97
98 === **Overview** ===
99
100 Neurodiagnoses Open Source leverages **Jupyter Notebooks from EBRAINS** to facilitate neurodiagnostic research, biomarker analysis, and AI-driven data processing. This integration provides an interactive and reproducible environment for developing machine learning models, analyzing neuroimaging data, and exploring multimodal biomarkers. Jupyter integration in EBRAINS empowers **Neurodiagnoses Open Source** to: ✅ **Analyze MRI, EEG, and biomarker data efficiently**. ✅ **Train machine learning models with high-performance computing**. ✅ **Ensure transparency with interactive explainability tools**. ✅ **Enable collaborative neurodiagnostic research with reproducible notebooks**.
101
102 === **Key Capabilities of Jupyter in Neurodiagnoses** ===
103
104 ==== **1. Neuroimaging Analysis (MRI, fMRI, PET)** ====
105
106 * **Preprocessing Pipelines:**
107 ** Use **Nipype, NiLearn, ANTs, and FreeSurfer** for structural and functional MRI analysis.
108 ** Skull stripping, segmentation, and registration of MRI scans.
109 ** Entropy-based slice selection for training deep learning models.
110 * **Deep Learning for Neuroimaging:**
111 ** Implement **CNN-based models (ResNet, VGG16, Autoencoders)** for biomarker extraction.
112 ** Feature-based classification of **Alzheimer’s, Parkinson’s, and MCI** from neuroimaging data.
113
114 ==== **2. EEG and MEG Signal Processing** ====
115
116 * **Data Preprocessing & Artifact Removal:**
117 ** Use **MNE-Python** for filtering, ICA-based artifact rejection, and time-series normalization.
118 ** Extract frequency and time-domain features from EEG/MEG signals.
119 * **Feature Engineering & Connectivity Analysis:**
120 ** Functional connectivity analysis using **coherence and phase synchronization metrics**.
121 ** Graph-theory-based EEG biomarkers for neurodegenerative disease classification.
122 * **Deep Learning for EEG Analysis:**
123 ** Train LSTMs and CNNs for automatic EEG-based classification of MCI and cognitive decline.
124
125 ==== **3. Machine Learning for Biomarker Discovery** ====
126
127 * **SHAP-based Explainability for Biomarkers:**
128 ** Use **Random Forest + SHAP** to rank the most predictive CSF, blood, and imaging biomarkers.
129 ** Generate SHAP summary plots to interpret the impact of individual biomarkers.
130 * **Multi-Modal Feature Selection:**
131 ** Implement **Anchor-Graph Feature Selection** to combine MRI, EEG, and CSF data.
132 ** PCA and autoencoders for dimensionality reduction and feature extraction.
133 * **Automated Risk Prediction Models:**
134 ** Train ensemble models combining **deep learning and classical ML algorithms**.
135 ** Apply **subject-level cross-validation** to prevent data leakage and ensure reproducibility.
136
137 ==== **4. Computational Simulations & Virtual Brain Models** ====
138
139 * **Integration with The Virtual Brain (TVB):**
140 ** Simulate large-scale brain networks based on individual neuroimaging data.
141 ** Model the effect of neurodegenerative progression on brain activity.
142 * **Cortical and Subcortical Connectivity Analysis:**
143 ** Generate connectivity matrices using diffusion MRI and functional MRI correlations.
144 ** Validate computational simulations with real patient data from EBRAINS datasets.
145
146 ==== **5. Interactive Data Visualization & Reporting** ====
147
148 * **Dynamic Plots & Dashboards:**
149 ** Use **Matplotlib, Seaborn, Plotly** for interactive visualizations of biomarkers.
150 ** Implement real-time MRI slice rendering and EEG signal visualization.
151 * **Automated Report Generation:**
152 ** Generate **Jupyter-based PDF reports** summarizing key findings.
153 ** Export analysis results in JSON, CSV, and interactive web dashboards.
154
155 === **How to Use Neurodiagnoses with Jupyter in EBRAINS** ===
156
157 ==== **1. Access EBRAINS Jupyter Environment** ====
158
159 1. Create an **EBRAINS account** at [[EBRAINS.eu>>url:https://ebrains.eu/]].
160 1. Navigate to the **Collaboratory** and open the Jupyter Lab interface.
161 1. Clone the Neurodiagnoses repository:
162
163 {{{git clone https://github.com/neurodiagnoses
164 cd neurodiagnoses
165 pip install -r requirements.txt
166 }}}
167
168 ==== **2. Run Prebuilt Neurodiagnoses Notebooks** ====
169
170 1. Open the **notebooks/** directory inside Jupyter.
171 1. Run any of the available notebooks:
172 1*. mri_biomarker_analysis.ipynb → Extracts MRI-based biomarkers.
173 1*. eeg_preprocessing.ipynb → Cleans and processes EEG signals.
174 1*. shap_biomarker_explainability.ipynb → Visualizes biomarker importance.
175 1*. disease_risk_prediction.ipynb → Runs ML models for disease classification.
176
177 ==== **3. Train Custom AI Models on EBRAINS HPC Resources** ====
178
179 * Use EBRAINS **GPU and HPC clusters** for deep learning training:
180
181 {{{from neurodiagnoses.models import train_cnn_model
182 train_cnn_model(data_path='data/mri/', model_type='ResNet50')
183 }}}
184 * Save trained models for deployment:
185
186 {{{model.save('models/neurodiagnoses_cnn.h5')
187 }}}
188
189 For further developments, contribute to the **[[Neurodiagnoses GitHub Repository>>url:https://github.com/neurodiagnoses]]**.
190
191 **Collaboration & Partnerships**
192
193 Neurodiagnoses actively seeks partnerships with data providers to:
194
195 * Enable API-based data integration for real-time processing.
196 * Co-develop harmonized AI-ready datasets with standardized annotations.
197 * Secure funding opportunities through joint grant applications.
198
199 **Interested in Partnering?**
200
201 If you represent a research consortium or database provider, reach out to explore data-sharing agreements.
202
203 **Contact**: [[info@neurodiagnoses.com>>mailto:info@neurodiagnoses.com]]
204
205 **Final Notes**
206
207 Neurodiagnoses AI is committed to advancing the integration of artificial intelligence in neurodiagnostic processes. By continuously expanding our data ecosystem and incorporating standardized biomarker classifications through the Neuromarker ontology, we aim to enhance cross-disease AI training and improve diagnostic accuracy across neurodegenerative disorders.
208
209 We encourage researchers and institutions to contribute new datasets and methodologies to further enrich this collaborative platform. Your participation is vital in driving innovation and fostering a deeper understanding of complex neurological conditions.
210
211 **For additional technical documentation and collaboration opportunities:**
212
213 * **GitHub Repository:** [[Neurodiagnoses GitHub>>url:https://github.com/neurodiagnoses]]
214 * **EBRAINS Collaboration Page:** [[EBRAINS Neurodiagnoses>>url:https://ebrains.eu/collabs/neurodiagnoses]]
215
216 If you encounter any issues during data integration or have suggestions for improvement, please open a GitHub Issue or consult the EBRAINS Neurodiagnoses Forum. Together, we can advance the field of neurodiagnostics and contribute to better patient outcomes.