TME infiltration
Quantify tumor microenvironment architecture — cell density patterns, immune infiltration phenotype, and spatial proximity metrics from segmented tissue slides.
Research question
How infiltrated is the tissue, what is the spatial organization of detected cells, and does the infiltration pattern suggest immune-desert, excluded, or inflamed phenotypes at the tissue level?
Who this is for
- Translational and tumor biology researchers measuring TIL density and spatial immune organization
- Immuno-oncology labs correlating histological infiltration with treatment response
- Pharma tissue biomarker teams exploring histological endpoints in trial cohorts
Data requirements
| Data | Required | Purpose |
|---|---|---|
| H&E or IHC slide | Yes | Tissue and cell detection input |
| Completed segmentation run | Yes | Spatial quantification prerequisite |
| Sample metadata with group labels | No (for cohort) | Responder/non-responder or treatment arm comparison |
Run the full Slide quantification pipeline first, or ensure a completed Segment cells run exists.
Workflow
Upload H&E/IHC slide → Tiles → Tissue detect → Segment cells → Spatial quantification → Review infiltration metrics
Step 1 — Segment tissue and cells
Follow the slide quantification pipeline through completed Segment cells. IHC slides with immune markers support morphology-based detection; multiplex IF phenotyping is a planned extension.
Step 2 — Run spatial quantification
Launch Spatial quantification from the slide detail page:
curl -X POST http://localhost:8001/pathology/jobs/spatial-quantification \
-H "Content-Type: application/json" \
-d '{
"study_id": "your-study-id",
"slide_id": "your-slide-id",
"parameters": { "segment_run_id": "your-segment-run-id" }
}'
Step 3 — Review TME metrics
Inspect the spatial quantification panels:
| Metric | Purpose |
|---|---|
| Cell density heatmap | Spatial distribution of detected cells across tissue |
| Nearest-neighbor distances | Proximity and clustering of cell populations |
| Infiltration phenotype | Research score summarizing spatial immune organization |
| Region metrics | Compartment-level density when tissue regions are detected |
Toggle the density heatmap layer in the Slide viewer to correlate metrics with morphology.
Step 4 — Export for downstream analysis
Download cell_spatial_metrics.csv and region_metrics.json for statistical analysis or correlation with clinical metadata. Link sample records when cohort comparison workflows are enabled.
Step 5 — Cohort comparison (planned)
The cohort_compare pipeline API exists for group-level pathology biomarker comparison. Full UI workflow is in development — see products/pathology/plan.md.
Expected outputs
- Density heatmap overlay in the slide viewer
- Infiltration phenotype classification summary
- Nearest-neighbor distance statistics
- Per-region and per-cell spatial metric tables
- Exportable CSV/JSON for cohort-level aggregation
Integration with Oncology
The Oncology area adds molecular TME profiling — immune deconvolution, cell-cell communication, and clinical endpoint correlation — on top of compbio single-cell pipelines. Pathology contributes the histological quantification layer: cell density, tissue boundaries, and morphology-guided spatial metrics.
Typical analyses
| Analysis | Context | Question |
|---|---|---|
| TIL density | Pre-treatment biopsy | Is immune infiltration high at the tumor margin? |
| Treatment comparison | Pre vs. post IO therapy | Did cell density patterns change after treatment? |
| Stroma interface | H&E tumor-stroma boundary | Are immune cells excluded from the tumor core? |
| Trial endpoint | Responder vs. non-responder slides | Do histological metrics differ by response group? |
Related guides
- Slide quantification
- Annotated compartments
- Computational Biology Spatial analysis