Single-Cell Transcriptomic Atlas of Cardiac Development

April 9, 2026 · View on GitHub

An end-to-end scRNA-seq pipeline mapping cell type heterogeneity in developing heart tissue; from raw counts to annotated cell atlases, with a cloud-native Nextflow + AWS Batch architecture.

Python Scanpy Nextflow AWS Batch AWS S3 Dataset

GitHub Stars GitHub Forks GitHub Clones

TL;DR

  • Built an end-to-end scRNA-seq pipeline using Scanpy + Nextflow + AWS Batch
  • Analysed 11,000+ cells across 18,000+ genes
  • Identified 10 cardiac cell types via unsupervised clustering
  • Designed for scalable cloud execution (AWS Batch + S3)
  • Produced publication-ready visualisations (UMAP, marker gene plots)

Demonstrates: single-cell analysis, pipeline engineering, cloud scalability


Overview

This project presents a complete single-cell RNA sequencing (scRNA-seq) analysis pipeline applied to developing heart tissue, using the publicly available Mouse (Mus musculus) Heart Cell Atlas dataset (E-MTAB-6173). Starting from raw count matrices, the pipeline performs quality control, normalisation, dimensionality reduction, unsupervised clustering, marker gene identification, and cell type annotation, producing a fully annotated cardiac cell atlas with publication-quality visualisations.

The analysis successfully identifies 10 distinct cardiac cell populations across 11,046 cells, revealing the transcriptional heterogeneity of the developing heart. The pipeline is additionally designed for cloud-native execution using Nextflow for workflow orchestration and AWS Batch for scalable compute, with the full infrastructure (S3 bucket, compute environment, job queue) configured and ready for deployment.


Biological Problem & How We Solved It

The Problem

The developing heart is composed of a highly diverse array of cell types: cardiomyocytes, fibroblasts, endothelial cells, progenitors and more, each governed by distinct transcriptional programmes. Traditional bulk RNA-seq cannot resolve this heterogeneity because it averages gene expression signals across all cells, masking rare populations and cell-type-specific signals entirely.

This creates a fundamental gap in our understanding of:

  • How cardiac cell types emerge and diversify during development
  • Which genes define each cardiac cell population
  • What rare progenitor states exist in the developing heart
  • How transcriptional heterogeneity relates to cardiac disease

How We Solved It

We applied single-cell RNA sequencing (scRNA-seq) analysis using the Scanpy framework, which profiles each of the 11,046 cells individually across 18,727 genes. Our approach:

  1. Quality control - Removed low-quality cells, empty droplets and doublets to ensure only healthy cells entered the analysis
  2. Normalisation - Corrected for technical variation in sequencing depth across cells
  3. Dimensionality reduction - Used PCA and UMAP to compress 18,727 genes into interpretable 2D visualisations
  4. Unsupervised clustering - Applied the Leiden algorithm to group transcriptionally similar cells without prior knowledge
  5. Marker gene analysis - Identified signature genes for each cluster using the Wilcoxon rank-sum test
  6. Cell type annotation - Matched marker genes to known cardiac cell type signatures from the literature

The result is a fully resolved cardiac cell atlas that makes the invisible visible, revealing 10 distinct populations that bulk RNA-seq would have merged into noise.


Results

MetricValue
Total cells analysed11,046
Genes measured18,727
Highly variable genes2,504
Cell clusters identified13
Distinct cell types annotated10

Cell Types Identified

Cell TypeBiological RoleKey Markers
CardiomyocytesHeart muscle contractionTnnt2
FibroblastsStructural support & ECMEgr1, Gpx3
Endothelial CellsBlood vessel liningPecam1, Cdh5
Smooth Muscle CellsVascular tone regulationActa2, Tagln
PericytesMicrovascular stabilisationRgs5, Cspg4
MacrophagesCardiac immune surveillanceC1qa, Cd68
Neural CellsCardiac innervationTubb3, Ncam1
Epicardial CellsOuter heart liningWt1
Immune CellsInflammatory responseCd68
Progenitor CellsUndifferentiated cardiac stem cellsWt1, Ncam1

Tools & Technologies

CategoryTools
LanguagePython 3.14
scRNA-seq AnalysisScanpy, AnnData
Pipeline OrchestrationNextflow 25.10.2
Cloud StorageAWS S3
Cloud ComputeAWS Batch (infrastructure configured)
ContainerisationDocker
Gene ID ConversionMyGene
Data ProcessingPandas, NumPy, SciPy
VisualisationMatplotlib, Scanpy plots
IDEVS Code + Jupyter Notebooks

Dataset

FieldDetails
NameSingle cell RNA-Seq of the murine non-myocyte cardiac cellulome
AccessionE-MTAB-6173
SourceEMBL-EBI Single Cell Expression Atlas
URLhttps://www.ebi.ac.uk/gxa/sc/experiments/E-MTAB-6173
FormatMatrix Market (.mtx) - Raw Counts
Cells11,057
Genes18,742
SpeciesMouse (Mus musculus)
TissueDeveloping heart
AccessedApril 2026

How to Run

Prerequisites

pip install scanpy anndata pandas numpy scipy matplotlib mygene

1. Clone the repository

git clone https://github.com/Naila-Srivastava/scRNA-Seq-Cardiac-Development.git
cd scRNA-Seq-Cardiac-Development

2. Download the dataset

Go to https://www.ebi.ac.uk/gxa/sc/experiments/E-MTAB-6173/downloads

Download the Raw Counts Matrix Market files and place them in data/:

  • E-MTAB-6173.aggregated_filtered_counts.mtx
  • E-MTAB-6173.aggregated_filtered_counts.mtx_cols
  • E-MTAB-6173.aggregated_filtered_counts.mtx_rows

3. Run the notebook

Open notebooks/scrna_cardiac.ipynb in VS Code and run all cells sequentially.

4. Cloud execution (infrastructure ready)

The Nextflow + AWS Batch pipeline is fully configured. To deploy on AWS:

# Configure AWS credentials
aws configure

# Upload data to S3
aws s3 cp data/ s3://your-bucket/data/ --recursive

# Run pipeline on AWS Batch
cd pipeline
nextflow run main.nf \
    -profile aws \
    -bucket-dir s3://your-bucket/nextflow-work/ \
    --input_dir s3://your-bucket/data/ \
    --output_dir s3://your-bucket/results/

Note: Full cloud execution requires VPC and IAM role configuration specific to your AWS environment.


Methodology

Raw Count Matrix (11,057 cells × 18,742 genes)


1. DATA LOADING
   Load .mtx, barcodes and gene files
   Construct AnnData object


2. QUALITY CONTROL
   Filter cells: min 200 genes, max 5,000 genes
   Filter genes: detected in at least 3 cells
   Result: 11,046 cells × 18,727 genes


3. NORMALISATION & LOG-TRANSFORMATION
   Library size normalisation (target = 10,000 counts)
   Log1p transformation
   Raw counts preserved in adata.raw


4. HIGHLY VARIABLE GENE SELECTION
   2,504 genes selected
   (min_mean=0.0125, max_mean=3, min_disp=0.5)


5. SCALING & PCA
   Scale to unit variance (max_value=10)
   50 principal components computed
   Elbow identified at PC15


6. NEIGHBOURHOOD GRAPH & UMAP
   10 neighbours, 15 PCs
   UMAP for 2D visualisation


7. LEIDEN CLUSTERING
   Resolution = 0.5
   13 clusters identified


8. GENE SYMBOL CONVERSION
   Ensembl IDs → Gene symbols via MyGene
   Mouse genome (Mus musculus)


9. MARKER GENE ANALYSIS
   Wilcoxon rank-sum test
   Top marker genes per cluster identified


10. CELL TYPE ANNOTATION
    10 cardiac cell types annotated
    Based on known marker gene signatures


VISUALISATIONS
(UMAP, Dotplot, Violin plots)

Features

  • End-to-end pipeline - From raw count matrix to annotated cell atlas in a single notebook
  • Gene symbol conversion - Automated Ensembl ID to gene symbol mapping using MyGene
  • Unsupervised clustering - Leiden algorithm identifies cell populations without prior knowledge
  • Publication-quality visualisations - UMAP, dotplot and violin plots saved automatically
  • Cloud-ready architecture - Nextflow pipeline with AWS Batch and S3 integration fully configured
  • Reproducible - All parameters documented and results saved as .h5ad for downstream analysis
  • Scalable - Pipeline designed to handle millions of cells on cloud infrastructure

Visualisations

UMAP - Annotated Cardiac Cell Atlas

10 transcriptionally distinct cardiac cell populations clearly separated in 2D UMAP space, with clean boundaries between major cell types including cardiomyocytes, fibroblasts and endothelial cells.

image

Dotplot - Marker Gene Expression

Expression of key marker genes across all 10 cell types, showing both the fraction of cells expressing each gene (dot size) and mean expression level (colour intensity).

image

Violin Plots - Key Marker Distribution

Distribution of 5 key marker genes (Tnnt2, Pecam1, Acta2, C1qa, Wt1) across all cell types, confirming cell type-specific expression patterns.

image

PCA Variance Ratio

Log-scale variance ratio plot confirming the elbow at PC15, justifying the use of 15 principal components for neighbourhood graph construction.

image

Key Takeaways

  • Data quality was excellent: Only 11 out of 11,057 cells were removed during QC, indicating a high-quality, well-processed dataset.
  • PCA elbow at PC15: The variance ratio plot clearly showed diminishing returns after PC15, a common and expected finding in well-normalised scRNA-seq data.
  • 13 clusters map to 10 biologically meaningful cell types: The Leiden algorithm successfully resolved all major cardiac cell populations expected during heart development without any prior biological knowledge.
  • Wt1 confirms progenitor identity: The strong and specific expression of Wt1 in the Progenitor Cells cluster is a textbook cardiac progenitor marker, independently validating our annotations.
  • Pericytes show clean Acta2/Tagln/Rgs5 signature: Despite their transcriptional similarity to smooth muscle cells, pericytes formed a distinct cluster with a clear marker gene signature.
  • MyGene conversion was critical: The dataset used Ensembl IDs instead of gene symbols, requiring automated conversion before any biological interpretation was possible.
  • Single-cell resolution reveals what bulk RNA-seq cannot: Rare populations like Epicardial Cells, Neural Cells and Progenitor Cells would have been completely invisible in bulk RNA-seq analysis.
  • Cloud infrastructure adds real scalability: The Nextflow + AWS Batch setup means this pipeline can be deployed on datasets 100x larger without any code changes, simply by adjusting resource parameters.

What's Next

  • Trajectory analysis — using RNA velocity or PAGA to map how progenitor cells differentiate into mature cardiac cell types over developmental time
  • Differential gene expression — comparing cell type proportions and gene expression between healthy and diseased cardiac samples
  • Full AWS Batch deployment — completing VPC and IAM configuration for end-to-end cloud execution
  • Pathway enrichment — running GO and KEGG enrichment on marker genes to understand biological processes active in each cell type
  • Integration with spatial transcriptomics — mapping scRNA-seq cell types onto spatial coordinates to understand their physical location in the heart

References


Project Structure

scRNA-Seq/
├── data/
│   ├── E-MTAB-6173.aggregated_filtered_counts.mtx           # Expression matrix (too large for GitHub)
│   ├── E-MTAB-6173.aggregated_filtered_counts.mtx_cols      # Cell barcodes
│   └── E-MTAB-6173.aggregated_filtered_counts.mtx_rows      # Gene names
├── notebooks/
│   └── scrna_cardiac.ipynb                                  # Full interactive analysis pipeline
├── pipeline/
│   ├── main.nf                                              # Nextflow pipeline (4 processes)
│   ├── nextflow.config                                      # Pipeline configuration & profiles
│   └── conf/
│       └── aws.config                                       # AWS Batch & S3 configuration
└── results/
    ├── qc_metrics.png            
    ├── pca_variance.png          
    ├── umap_qc.png               
    ├── umap_clusters.png         
    ├── umap_celltypes.png        
    ├── marker_genes_named.png    
    ├── dotplot_markers.png       
    └── violin_markers.png        

License

This project is open source and available under the MIT License.

If you find this repo useful

  • Star ⭐ this repo to show support
  • Fork it to use in your own projects
  • Cite this work if you use it in research