Sovereign 8s.is mirror of standardgalactic/CosMx-Bolen
  • R 90.4%
  • Python 9.6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2025-11-19 11:28:18 +01:00
analysis Add ASAP grant ID 2025-11-19 11:28:18 +01:00
data Add directories 2025-01-08 15:47:57 +01:00
figures #Update Sup_fig6 2025-08-27 10:46:33 +02:00
.gitignore #Adding figs R files 2025-02-21 16:18:37 +01:00
CosMx-Bolen.Rproj #Adding figs R files 2025-02-21 16:18:37 +01:00
image.png #Change analysis, update for paper 2025-08-25 13:50:28 +02:00
LICENSE Add MIT License to the project 2025-11-17 10:49:49 +01:00
README.html Add image to README 2025-11-18 12:08:16 +01:00
README.md Add ASAP grant ID 2025-11-19 11:28:18 +01:00
requirements_python.txt #Upodate Readme, add requirements R and python 2025-11-17 12:18:43 +01:00
requirements_r.txt #Upodate Readme, add requirements R and python 2025-11-17 12:18:43 +01:00

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.txt
  • requirements_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 processing
  • 1_* → Annotation or normalization (modality-specific)
  • 2_* → Cell typing workflows
    • Includes both .R and .py scripts when required
  • 3_* → Cell–cell interaction (scotia pipeline)

Additional analysis utilities include:

  • abundance_enrichment.R
  • scotia_cell_int.py

Data-Type Directories

Subfolders indicate the nature of stored data:

  • Files/ – intermediate files
  • Molecules/ – molecule-level CosMx outputs
  • Polygons/ – segmentation polygons
  • Objects/ – Seurat objects or metadata
  • Markers/ – marker definitions used in annotation
  • Results/ – 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:

  1. Curation

    • Create Seurat objects
    • Extract molecules, polygons, objects into separate folders to maintain structure and reduce memory load
  2. Normalization & QC

  3. Cell Annotation

    • Supervised annotation workflow
  4. Abundance & Enrichment Analysis

  5. Cell–Cell Interaction

    • Implemented using the scotia Python-based pipeline (scotia_cell_int.py)

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.