RRain is a visualization framework for representing single-cell RNA-seq data in functional space using protein domains.
It extends the PLANT framework by projecting cells into a low-dimensional embedding and stacking their domain-level features vertically, creating “towers” that resemble upside-down rain emerging from a cloud of cells.
Instead of genes defining the primary structure, RRain aggregates expression into protein domains (e.g., Pfam)—allowing visualization of functional composition per cell.
https://asifali-bio.github.io/rrain/
RRain separates the data into three intuitive dimensions:
- (x, y) → latent embedding of cells (domain space PCA/UMAP)
- z → feature index (protein domains)
- size → domain-level expression (aggregated counts / TPM)
- color → cell clusters (e.g., Seurat clustering)
Each cell becomes a vertical tower of domains, positioned according to similarity in functional space.
Traditional scRNA-seq pipelines operate in gene space, using highly variable genes for dimensionality reduction and clustering.
RRain instead constructs a parallel representation in domain space:
cells × genes → cells × domains
by mapping:
gene → protein → Pfam domain
This enables:
- Functional aggregation across genes
- Reduced redundancy (shared domains)
- Sharper boundaries between cell states
- Visualization of transitions via domain composition
RRain allows simultaneous visualization of:
- Global similarity between cells (embedding)
- Functional structure of each cell (tower composition)
- Domain presence/absence (gaps in towers)
- Domain magnitude (bubble size)
- Cluster identity (color via Seurat)
-
Input data
- scRNA-seq count matrix (cells × genes)
-
Domain annotation
- Run InterProScan on a reference proteome
- Extract Pfam domains
- Map UniProt → gene symbols (Ensembl / biomaRt)
-
Aggregation
- Map genes → domains
- Sum expression per domain per cell
cells × genes → cells × domains
- Embedding
- PCA / UMAP
- Visualization
-
Convert to long format
-
Plot 3D towers:
- x, y = embedding
- z = domain index
- size = domain expression
- color = cluster identity
RRain builds directly on PLANT:
- PLANT → bulk / cross-sample domain composition
- RRain → single-cell domain composition
RRain extends the idea from:
“one tower per sample”
to:
“one tower per cell”
enabling exploration of cellular heterogeneity and transitions.
- Single-cell RNA-seq (primary use case)
- Functional profiling of cell states
- Domain-level clustering and boundary detection
- Comparative analysis of cell populations
- Current implementation uses point-based towers (Plotly)
Banner emoji designed by OpenMoji.