This repository contains the preprocessing code used by the Mosaic-PD project before multimodal modelling. It is organized by data modality so researchers can inspect, rerun, and adapt each preprocessing stage with the required cohort data.
Clinical, omics, and neuroimaging source data are not redistributed here. Users must obtain the appropriate PPMI, AMP-PD, PDBP, and local neuroimaging inputs under the terms of the originating cohorts or platforms.
.
├── clinical_preprocessing/ # Auditable Python clinical pipeline
├── bioinformatics_preprocessing/ # RNA-seq, microarray, WGS, and PRS scripts
├── neuroimaging_preprocessing/ # R Markdown neuroimaging preprocessing
├── docs/ # Project figures used by documentation
├── DATA_AVAILABILITY.md # Data access and redistribution notes
├── requirements.txt # Python packages for clinical preprocessing
└── .gitignore # Keeps restricted data and generated outputs out of git
The clinical pipeline is the most automated component. It builds the final clinical tables used downstream:
clinical_preprocessing/outputs/final/proc_cross_sectional.csv
clinical_preprocessing/outputs/final/proc_longitudinal.csv
From the repository root:
python clinical_preprocessing/preprocessing.py \
--raw-dir /path/to/ppmi_csv_exportsIf AMP-PD/PDBP clinical caches are already available, place them in:
clinical_preprocessing/data/amppd_cache/clinical_cross_sec.csv
clinical_preprocessing/data/amppd_cache/clinical_longitudinal.csv
See clinical_preprocessing/README.md for the full command-line interface, input naming expectations, audit outputs, and stage controls.
The omics scripts are under bioinformatics_preprocessing/code:
RNASeq/contains RNA-seq preprocessing, transformation, differential expression, TNI, and GSVA scripts.genomics_microarray/contains microarray extraction, merging, MLM, and curated SNP/gene scripts.genomics_wgs/contains AMP-PD WGS SNP extraction and PRS-related scripts.
These workflows depend on cohort/platform files and R/Bioconductor packages that are not bundled. See bioinformatics_preprocessing/README.md.
The neuroimaging workflow is under neuroimaging_preprocessing. It includes R Markdown files for manual quality control aggregation, FreeSurfer/CerebNet output organization, variability analyses, SAA analyses, and cluster-volume correlations.
Patient-level imaging derivatives, QC tables, and intermediate result tables are not included. Placeholder folders document where those files are expected. See neuroimaging_preprocessing/README.md.
For the clinical Python pipeline:
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtThe bioinformatics and neuroimaging workflows additionally require R and several CRAN/Bioconductor packages. Those are listed in the module READMEs because the exact installation path often depends on the compute environment.
Run these checks after cloning or before release. They do not require restricted cohort data:
python -m py_compile clinical_preprocessing/preprocessing.py
python -m py_compile bioinformatics_preprocessing/code/genomics_wgs/Python_WGS_SNPsubset_FINAL.py
python clinical_preprocessing/preprocessing.py --helpWith the restricted source data available, run the clinical pipeline to generate the auditable outputs, logs, and manifest:
python clinical_preprocessing/preprocessing.py \
--raw-dir /path/to/ppmi_csv_exportsThe generated clinical outputs, logs, and manifests are intentionally ignored by git.
- Review DATA_AVAILABILITY.md before publishing.
- Do not commit raw cohort data, patient-level derivatives, generated CSVs, Terra workspace outputs, logs, or caches.
- The cleaned clinical pipeline is the authoritative clinical preprocessing code for this repository.
This work is supported by the Michael J. Fox Foundation for Parkinson's Research. We thank all participating cohorts, platforms, and collaborators who make this project possible.

