- R 90.4%
- Python 9.6%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| analysis | ||
| data | ||
| figures | ||
| .gitignore | ||
| CosMx-Bolen.Rproj | ||
| image.png | ||
| LICENSE | ||
| README.html | ||
| README.md | ||
| requirements_python.txt | ||
| requirements_r.txt | ||
Spatial Multiomics Analysis – CosMx RNA & Protein
General Information
Generated: 12/12/2024 Last modified: 19/11/2025
This repository contains all scripts, data structures, and figure-generation code used in the study:
“Spatial single-cell multiomics reveals peripheral immune dysfunction in Parkinson’s and inflammatory bowel disease”
The dataset includes measurements acquired using NanoString CosMx™ Spatial Multiomics in 2023, comprising:
- CosMx RNA profiling
- CosMx Protein profiling
Analyses were performed using:
- R ≥ 4.3.2
- Python ≥ 3.8.10
Environment dependencies are provided in:
requirements_python.txtrequirements_r.txt
File Overview
/data/
Directory reserved for raw input data (not included in this repository).
Users should place their CosMx raw files here to reproduce the analysis.
/analysis/
Contains complete analysis pipelines for both modalities:
- CosMx_Protein/
- CosMx_RNA/
Each includes a detailed README describing preprocessing, QC, annotation, interaction analysis, and intermediate outputs.
/figures/
Code to reproduce every figure included in the manuscript.
Requirements Files
requirements_python.txt– Python environment (cell–interaction pipeline)requirements_r.txt– R environment (full CosMx workflow)
Naming Conventions & Repository Structure
This repository uses a structured, modular naming scheme for methodical and reproducible analysis.
Analysis Naming Logic
Scripts follow numeric prefixes to reflect the analysis workflow:
0_*→ Curation & raw processing1_*→ Annotation or normalization (modality-specific)2_*→ Cell typing workflows- Includes both
.Rand.pyscripts when required
- Includes both
3_*→ Cell–cell interaction (scotia pipeline)
Additional analysis utilities include:
abundance_enrichment.Rscotia_cell_int.py
Data-Type Directories
Subfolders indicate the nature of stored data:
Files/– intermediate filesMolecules/– molecule-level CosMx outputsPolygons/– segmentation polygonsObjects/– Seurat objects or metadataMarkers/– marker definitions used in annotationResults/– exported results and final outputs
Figures
Figures follow the convention:
figure1.R, figure2.R, … sup_figN.R
Image exports are stored within:
figures/plots/
Full Repository Structure
├── CosMx-Bolen.Rproj
├── LICENSE
├── README.md
├── README.html
├── image.png
├── requirements_python.txt
├── requirements_r.txt
│
├── analysis/
│ ├── CosMx_Protein/
│ │ ├── 0_curation.R
│ │ ├── 1_normalization.R
│ │ ├── 2.0_celltyping.R
│ │ ├── 2.1_celltyping.py
│ │ ├── 2.2_celltyping.R
│ │ ├── 3_cell_interaction.R
│ │ ├── abundances_enrichment.R
│ │ ├── scotia_cell_int.py
│ │ ├── Files/
│ │ ├── Objects/
│ │ │ └── db.csv
│ │ ├── Polygons/
│ │ ├── Results/
│ │ └── Ensembl Cosmx protein.xlsx
│ │
│ └── CosMx_RNA/
│ ├── 0_curation.R
│ ├── 1_annotation_supervised.R
│ ├── 2.normalization.R
│ ├── 3_cell_interaction.R
│ ├── abundance_enrichment.R
│ ├── Files/
│ ├── Markers/
│ ├── Molecules/
│ ├── Objects/
│ ├── Polygons/
│ └── Results/
│
├── data/
│
└── figures/
├── figure1.R
├── figure2.R
├── figure3.R
├── figure4.R
├── figure6.R
├── plots/
├── sup_fig1.R
├── sup_fig3.R
├── sup_fig4.R
├── sup_fig5.R
├── sup_fig6.R
└── sup_fig7.R
Methodology Overview
Both CosMx RNA and Protein pipelines follow a standardized workflow:
-
Curation
- Create Seurat objects
- Extract molecules, polygons, objects into separate folders to maintain structure and reduce memory load
-
Normalization & QC
-
Cell Annotation
- Supervised annotation workflow
-
Abundance & Enrichment Analysis
-
Cell–Cell Interaction
- Implemented using the scotia Python-based pipeline (
scotia_cell_int.py)
- Implemented using the scotia Python-based pipeline (
Data Access & Funding
This research was funded in whole or in part by Aligning Science Across Parkinson’s (ASAP-020527) through the Michael J. Fox Foundation for Parkinson’s Research (MJFF).
License
MIT LICENSE.
Citation
If using data or code from this folder, cite:
Bolen et al., 2025. Spatial single-cell multiomics reveals peripheral immune dysfunction in Parkinson’s and inflammatory bowel disease.
