Projects

Computational biology, case by case

Four projects from sequencing reads to survival curves: what each one set out to answer, how it was built, and what came out.

Overview

The case studies

01 · Genomics

Neoantigen discovery

RNA-seq reads to ranked MHC-I neoantigen candidates for mouse cancer vaccine research.

Read the case study
02 · Statistics

Survival and biomarkers

Kaplan-Meier, log-rank and Cox models linking tumour expression to outcome, with a live explorer.

Read the case study
03 · Single cell

PBMC3k single-cell RNA-seq

Quality control to annotated cell types in scanpy, packaged as a reproducible pipeline.

Read the case study
04 · Deep learning

R-Net, MSc project

A regression CNN that counts cell types in microscopy images without segmenting them.

Read the case study

01Genomics

RNA-seq neoantigen discovery pipeline

The problem

Personalised cancer vaccines need a shortlist of tumour mutations whose peptides the immune system can see. Finding them means going from raw sequencing reads to mutations, then to peptides, then to a prediction of which peptides bind MHC class I.

The approach

An end-to-end Nextflow DSL2 pipeline for mouse RNA-seq (GRCm39). Reads are trimmed and aligned with STAR (or GPU alignment with NVIDIA Parabricks), variants are called with Strelka2, hard-filtered with GATK and annotated with Ensembl VEP. Mutant peptides of 8 to 11 amino acids are scored with NetMHCpan-4.1 against H-2-Kb and H-2-Db and ranked by a priority score. Every step runs in Docker or Singularity containers, locally, on SLURM or on Google Cloud Batch.

The result

In industry at Genevation, containerised FASTQ-to-VCF pipelines on the same toolchain (STAR, Strelka2, GATK and VEP) cut analysis turnaround from five days to two per sample batch. NetMHCpan predictions were combined with a cancer-specific XGBoost classifier to prioritise neoantigens for preclinical vaccine studies in mouse skin, colon and lung cancer.

  • Nextflow DSL2
  • STAR
  • Strelka2
  • GATK
  • VEP
  • NetMHCpan-4.1
  • Docker
  1. Quality controlFastQC, TrimmomaticTrimmed FASTQ
  2. AlignmentSTAR 2.7.11 or ParabricksSorted, indexed BAM
  3. Variant callingStrelka2 2.9.10Somatic and germline VCF
  4. FilteringGATK 4.5 VariantFiltrationPASS-only VCF
  5. AnnotationEnsembl VEP 111Annotated VCF
  6. PeptidesEnsembl REST API, PythonMutant peptide FASTA
  7. MHC-I scoringNetMHCpan-4.1Ranked candidates (%EL rank ≤ 2)
The seven stages of the pipeline, with the tool and output of each, as documented in the repository.

02Statistics

Survival and biomarker analysis

The problem

Which tumour gene-expression features say something about a patient's outcome, and do they add anything beyond the clinical variables a doctor already has?

The approach

A modular Python pipeline using lifelines: Kaplan-Meier estimation, a univariate Cox screen with a hazard ratio per standard deviation of expression and Benjamini-Hochberg FDR, the log-rank test on a median split of the leading feature, and a multivariate Cox model adjusted for age, tumour size, grade and ER status. It is built to pull TCGA cohorts from the public cBioPortal API. When that is unreachable it falls back to a real breast cancer cohort bundled with the repository: Desmedt et al. (2007), GEO GSE7390, 198 patients with time to distant metastasis as the outcome.

The result

Re-running the pipeline on the bundled cohort: 51 of the 198 patients developed distant metastases. Across 76 expression probes, the strongest univariate signal was probe 203306_s_at (hazard ratio 0.64 per SD, p = 0.0009), but no probe passed an FDR of 0.05, so the screen is exploratory. ER status separates the curves (log-rank p = 0.010), and the multivariate model reaches a C-index of 0.677. Explore the curves below.

  • Python
  • lifelines
  • pandas
  • cBioPortal API
  • Cox regression
  • Kaplan-Meier

Kaplan-Meier explorer

Loading the cohort…

Number at risk, by months of follow-up
All groupings as a table
Patients and distant metastases per group, with the log-rank p-value for each grouping
GroupPatientsMetastases
All patients
All patients19851
ER status log-rank p = 0.010
ER-positive13428
ER-negative6423
Tumour grade log-rank p = 0.276
Grade 1304
Grade 28323
Grade 38324
Probe 203306_s_at, median split log-rank p = 0.006
203306_s_at high9917
203306_s_at low9934
Probe 202240_at, median split log-rank p < 0.001
202240_at high9938
202240_at low9913
Probe 204014_at, median split log-rank p = 0.060
204014_at high9920
204014_at low9931
Probe 218883_s_at, median split log-rank p = 0.061
218883_s_at high9930
218883_s_at low9921
Probe 208180_s_at, median split log-rank p = 0.009
208180_s_at high9933
208180_s_at low9918
Time to distant metastasis in the Desmedt et al. (2007) breast cancer cohort (GEO GSE7390), 198 patients, as bundled with the repository. Curves are shown to 240 months. Median splits of expression are for visualisation only; the Cox models treat expression as continuous.

03Single cell

Single-cell RNA-seq of PBMC3k

The problem

A blood sample holds many immune cell types mixed together. Single-cell RNA-seq can separate them, but only after careful quality control, normalisation and clustering of thousands of noisy cells.

The approach

An end-to-end scanpy workflow on the 10x Genomics PBMC3k dataset (about 2,700 peripheral blood mononuclear cells). Cells are filtered by median absolute deviation (5 MADs on counts, genes and mitochondrial fraction, plus a 15% mitochondrial cap), normalised and log-transformed, reduced to the top 2,000 highly variable genes and 50 principal components, then embedded with UMAP, clustered with Leiden and annotated by scoring canonical PBMC marker signatures. It ships as a notebook and as a command-line pipeline with fixed seeds.

The result

On the repository's synthetic validation dataset, which mimics PBMC3k with 2,700 cells, low-quality cells and doublets, the pipeline resolves 9 Leiden clusters and annotates them as 7 cell types: B cells, CD4 and CD8 T cells, NK cells, CD14 and FCGR3A monocytes, and platelets. With internet access the same code runs on the real PBMC3k data.

  • Python
  • scanpy
  • AnnData
  • UMAP
  • Leiden
  • Wilcoxon tests
UMAP plot of about 2,700 cells in seven coloured groups: a large CD4 T cell cluster next to CD8 T and NK cells, a separate group of CD14 and FCGR3A monocytes with a few platelets, and an isolated B cell cluster.
UMAP of the annotated cell types. This figure comes from the synthetic PBMC-structured validation dataset committed with the repository, not from the real PBMC3k data.

04Deep learning

R-Net: counting cells without segmenting them

The problem

Measuring the mix of cell types in a microscopy image usually means segmenting every cell first, which is slow and fragile. Could a network predict the composition directly?

The approach

R-Net, an MSc Biomedical Engineering project at Imperial College London (2023), is a custom convolutional network in TensorFlow and Keras that regresses the percentage of three cell types straight from simulated microscopy images. It stacks convolution blocks with batch normalisation and dropout, and trains on images expanded with an OpenCV augmentation pipeline. It was benchmarked against VGG16, ResNet, MobileNet and an MNIST-derived baseline.

The result

R-Net reached R² = 0.76 (0.7576, MSE 0.0072), against 0.40 for ResNet and 0.32 for VGG16, and trained in about 1.5 hours where the larger networks took 3 to 4.

  • Python
  • TensorFlow
  • Keras
  • OpenCV
  • scikit-learn
R² by model (higher is better) and approximate training time
ModelR²Training
R-Net0.758~1.5 h
ResNet0.403~4 h
MNIST baseline0.392~1.5 h
VGG160.322~4 h
MobileNet0.096~3 h
Results from the dissertation's performance summary, on simulated microscopy images.

Get in touch

Contact