One of the most frustrating puzzles in cancer biology: some lung cancer patients respond brilliantly to immunotherapy. Others don't respond at all. The tumour microenvironment (TME), the ecosystem of immune, stromal, and cancer cells that surrounds a tumour is a big part of why.
I wanted to understand what that ecosystem actually looks like at the resolution of individual cells. So I built a single-cell RNA sequencing (scRNA-seq) analysis of non-small cell lung cancer (NSCLC) tissue using Scanpy, working with a publicly available dataset of 111,683 cells from CZ CELLxGENE, spanning 38 distinct cell states.
Here's what the data revealed about T cell exhaustion, macrophage behaviour, and what makes some tumours more immune-suppressive than others.
Background
NSCLC accounts for approximately 85% of all lung cancer cases. Immune checkpoint inhibitors have transformed treatment for some patients — but a large proportion still don't respond. The leading explanation is that the TME is actively suppressing anti-tumour immunity, rather than the immune system simply being absent.
To understand this, you need to look not just at whether immune cells are present, but at what functional state those cells are in. That's exactly what single-cell RNA sequencing makes possible.
The Dataset
The data comes from a study characterising the cellular and molecular identities of histologic subtypes in lung adenocarcinoma:
- 111,683 cells after QC (117,266 raw)
- 57,398 genes
- 38 distinct cell states across the TME
- 4 histologic subtypes: Acinar/Papillary (A/P), A/P + Solid, Micropapillary (MP), and Solid
- Sequenced with 10× Chromium 3' v3
The Pipeline
1. Quality Control
Cells were filtered to retain those with 200–8,000 detected genes, fewer than 100,000 UMI counts, and less than 25% mitochondrial content. This removed around 5,583 low-quality cells.
2. Normalisation
Standard scRNA-seq approach: normalise to 10,000 counts per cell, log1p transform, identify 2,544 highly variable genes.
3. Dimensionality Reduction
PCA (50 components) → neighbourhood graph → UMAP. The resulting embedding resolved all 38 cell states, with clear separation between tumour epithelial cells, immune populations, and stromal cells.
The Findings
1. T Cell Exhaustion Is Not an End State - It's a Trajectory
This was the most biologically interesting result. The CD8+ T cell data revealed three functionally distinct states forming a clear exhaustion trajectory:
T.CD8.Naive → T.CD8.Predysfunc (8,897 cells) → T.CD8.Exhausted (1,454 cells)
The pre-dysfunctional population is the largest CD8 group - meaning the majority of cytotoxic T cells in these tumours are actively being pushed toward dysfunction, not yet exhausted but clearly losing their killing capacity.
The fully exhausted population co-expresses multiple immune checkpoint molecules simultaneously: CTLA4, LAG3, TIGIT, TOX, ENTPD1, and CXCL13. In contrast, cytotoxic T cells express effector molecules (GZMB, PRF1, IFNG) with minimal checkpoint expression. The dotplot makes this contrast striking and clear.
2. Regulatory T Cells Outnumber Cytotoxic T Cells ~4:1
Tregs (6,496 cells) vastly outnumber cytotoxic CD8+ T cells (1,688 cells). Tregs express high levels of CTLA4 and TOX, consistent with their role in actively suppressing anti-tumour immunity. This ratio alone explains a great deal about why these tumours resist immune attack.
3. Pro-Tumour Macrophages Dominate the Myeloid Compartment
Five macrophage subpopulations were identified:
- Mac.SPP1 and Mac.SPP1.GPNMB (~7,054 cells combined) - pro-tumourigenic, SPP1/osteopontin-expressing macrophages associated with poor prognosis in multiple cancer types
- Mac.SELENOP (3,082 cells) - anti-inflammatory, tissue-resident
- Mac.CXCL9 (1,118 cells) - anti-tumour, recruits cytotoxic T cells
The pro-tumour to anti-tumour macrophage ratio is approximately 6:1. Combined with the T cell exhaustion data, this paints a picture of a TME that is actively - and efficiently - suppressing immune responses at multiple levels simultaneously.
4. The Paradox of Solid Tumours
Solid histologic subtype tumours had the highest immune infiltration (~75% immune cells vs ~63% in acinar/papillary). But solid subtype is also the most aggressive histology.
This counterintuitive finding is consistent with what's sometimes called immune suppression rather than immune exclusion: more immune cells arrive, but the suppressive environment is so potent that they can't function. High infiltration doesn't automatically mean effective anti-tumour immunity.
What This Means for Immunotherapy
The data points to a few specific vulnerabilities worth thinking about:
- The large pre-dysfunctional T cell population is a potential therapeutic opportunity - these cells aren't fully exhausted yet and might respond to checkpoint blockade
- The 6:1 pro-tumour macrophage ratio suggests that myeloid reprogramming strategies (not just T cell-targeting therapies) may be needed
- The Treg suppression appears to work partly through
CTLA4, which is why anti-CTLA4 therapy has shown activity in some NSCLC settings
What I Learned
- Subsetting for focused analysis pays off. Rather than analysing all 38 cell states at once, isolating the T cell and macrophage compartments separately and running marker analysis on those subsets gave much cleaner, more interpretable results.
- Using the authors' cell type annotations directly was the right call. For a dataset this complex, re-clustering from scratch would have introduced unnecessary uncertainty. Their labels are validated and biologically grounded.
- With 38 cell states and multiple findings, deciding what to prioritise in the write-up took as long as some analysis steps. Storytelling is part of the work.
The Code
Everything is in a fully annotated Jupyter Notebook. Download the H5AD file from CZ CELLxGENE and place it in the data/ folder to run it.
Farhan89082
/
nsclc-tumour-microenvironment
Single-cell RNA-seq analysis of the NSCLC tumour microenvironment - T cell exhaustion trajectories and macrophage polarisation in lung adenocarcinoma
🫁 scRNA-seq Tumour Microenvironment Analysis: Mapping Immune Cell Infiltration in Non-Small Cell Lung Cancer
📌 Background
Non-small cell lung cancer (NSCLC) is the most common form of lung cancer, accounting for approximately 85% of all cases. Despite the success of immune checkpoint inhibitors, a significant proportion of patients do not respond to immunotherapy — a failure largely attributed to T cell exhaustion and immunosuppressive remodelling of the tumour microenvironment (TME).
The TME is a complex ecosystem of tumour cells, immune cells, and stromal cells that collectively determine whether the immune system can mount an effective anti-tumour response. Understanding the cellular composition and functional states within the TME is critical for identifying new therapeutic targets and predicting immunotherapy response.
This project performs a comprehensive single-cell RNA sequencing (scRNA-seq) analysis of the NSCLC tumour microenvironment, profiling 111,683 cells across 38 distinct cell states to characterise T cell exhaustion trajectories, macrophage polarisation states…
The TME is one of the most complex biological systems we can now study at single-cell resolution - and it's increasingly clear that understanding it is key to making immunotherapy work for more patients. Happy to discuss the analysis, the biology, or the pipeline in the comments.
Top comments (0)