Code repository supporting Nature Medicine publication (Manuscript ID: NMED-A143379A-Z).
This repository contains the code and sample data used for the analyses presented in the accompanying manuscript. The codebase includes:
- Deep learning model architectures for quantitative image analysis
- Quantitative Continuous Scoring (QCS) feature extraction algorithms
- Statistical analysis pipelines for survival outcomes
NMED-A143379A-Z/
├── README.md
├── data/
│ └── sampledata.csv # Sample data for demonstration
└── notebooks/
├── 01_QCS_networks.ipynb # Neural network architecture definitions
├── 02_QCS_readouts.ipynb # QCS feature computation methods
└── 03_feature_analysis.Rmd # Statistical analysis and visualization
PyTorch implementation of the deep learning architecture used for quantitative scoring.
Algorithms for computing QCS features from segmented cell data:
- Quantile scores: Membrane, cytoplasm, and whole-cell staining intensity (SI) at quantile intervals (q5–q95)
- Percentage positive cells: Based on SI thresholds across membrane, cytoplasm, and whole-cell compartments
- Normalized Membrane Ratio (NMR): Membrane-to-cytoplasm SI ratios
- SI differences: Membrane minus cytoplasmic SI values
- Normalized SI values: Compartment-normalized intensity metrics
- QCS+ Cell Densities: Density of positive cells at various SI cutoffs
- Spatial proximity scores: Binary and continuous versions at multiple radii
R Markdown document for statistical analysis and figure generation:
- Kaplan-Meier survival curves for PFS and OS
- Cutoff optimization for normalized membrane OD quantiles
- Forest plots showing hazard ratios
- Ridge plots for interaction analysis
- Python 3.9+
- PyTorch
- torchvision
- NumPy
- SciPy
- pandas
- R 4.0+
- survival
- survminer
- ggplot2
- dplyr
- tidyr
- patchwork
Sample data is provided in data/sampledata.csv for demonstration purposes.
This project is licensed under the Apache 2.0 License - see the LICENSE file for details.
For questions regarding this repository, please contact Ansh Kapil.