Leiden Clustering
Overview
This block performs Leiden clustering on single-cell RNA-seq data using PCA embeddings as input. The input comes from upstream blocks such as Dimensionality Reduction. The output are identified cell clusters that can be visualized or used in downstream blocks (e.g., Cell Browser or Cluster Markers).
Pipeline context
This block typically follows dimensionality reduction and precedes cell type annotation and other downstream analyses.
Blocks Result pool
┌───────────
┌─────────────────────────┤
│ │
v │
╔═══════════════════════════╗ exports │
║ Dimensionality Reduction ║────->─-─┤ UMAP, t-SNE, PCA embeddings
╚═══════════════════════════╝ │ -----------------------------
│
├ [sampleId][cellId] -> umap1, umap2, ...
┌─────────────────────────┤
│ │
v │
╔═══════════════════════════╗ exports │
║ Leiden Clustering ║────->─-─┤ Cluster assignments
╚═══════════════════════════╝ │ ---------------------
│
├ [sampleId][cellId] -> clusterId
┌─────────────────────────┤
│ │
v │
╔═══════════════════════╗ │
║ Downstream Analysis ║ │
╚═══════════════════════╝ │
Core structure: axes and p-columns
The block consumes principal component analysis (PCA) embeddings and produces a p-column containing cluster assignments for each cell.
Primary axes
| Axis Name | Type | Description |
|---|---|---|
pl7.app/sampleId | String | Uniquely identifies the sample. |
pl7.app/cellId | String | Uniquely identifies a single cell within a sample. |
Input P-Columns
The block requires the principal component (PC) embeddings calculated by an upstream block like Dimensionality Reduction.
1. Principal Components
- P-column name:
pl7.app/rna-seq/pcvalue - Description: The principal component values for each cell, which are used to construct the k-nearest neighbor graph for clustering.
- Requirement: Required.
- Specification:
# --- Core Identity ---
name: pl7.app/rna-seq/pcvalue
valueType: Double
# --- Axes ---
axesSpec:
- name: pl7.app/sampleId
type: String
- name: pl7.app/sc/cellId
type: String
- name: pl7.app/rna-seq/pc-num
type: String
# --- Domain ---
domain:
pl7.app/blockId: "..." # blockId from the upstream dimensionality reduction run
pl7.app/rna-seq/batch-corrected": "false"
# --- Annotations ---
annotations:
pl7.app/label: "Principal Component Value"
Exported P-Columns
The block exports a p-frame containing the new leidencluster p-column, which is intended for programmatic use by downstream blocks.
1. Leiden Cluster
- P-column name:
pl7.app/rna-seq/leidencluster - Description: The cluster assignment for each cell.
- Requirement: Required.
- Specification:
# --- Core Identity ---
name: pl7.app/rna-seq/leidencluster
valueType: String
# --- Axes ---
axesSpec:
- name: pl7.app/sampleId
type: String
- name: pl7.app/cellId
type: String
# --- Domain ---
domain:
pl7.app/blockId: "..." # a unique identifier for the block run
# --- Annotations ---
annotations:
pl7.app/label: "Cluster Resolution 1" # The resolution is a block parameter
Summary of Exported P-Columns
| P-Column Name | Description | Axes | Requirement |
|---|---|---|---|
pl7.app/rna-seq/leidencluster | The cluster assignment for each cell. | [sampleId][cellId] | Required |