Gradient Biotech

Single-cell

The single-cell pipeline follows a standard Scanpy-style workflow ported from Seurat-class methods. All steps operate on AnnData and chain through on-disk checkpoints.

Pipeline steps

1. Quality control

Filters cells and optionally genes based on:

  • Minimum and maximum genes per cell
  • Minimum counts per cell
  • Maximum mitochondrial gene percentage

Outputs QC metrics, histograms, and per-sample retention charts visible in Explore → Sample QC.

2. Normalization

Log-normalizes counts, identifies highly variable genes, and optionally scales. Writes a checkpoint used by clustering.

3. Clustering

Builds a neighbor graph, runs Leiden clustering at a configurable resolution, and computes UMAP coordinates for interactive exploration.

4. Integration, annotation, trajectory, and scaling

Single-cell studies can add higher-level review steps after clustering:

StepPurpose
Batch integrationCorrect batch-driven PCA structure, compare integrated vs. unintegrated views, and review batch-mixing diagnostics
Reference annotationTransfer cell labels from the built-in PBMC/immune marker reference with confidence scores and compatibility warnings (a selectable reference library is not yet available)
Sketch analysisWork with larger AnnData inputs through backed mode, representative-cell sketches, projected labels, and guardrails
Trajectory and cell cycleScore cell-cycle phase, compute graph-based pseudotime, and review UMAP overlays and pseudotime-associated genes

5. Differential expression

Two modes:

ModeWhen to use
Cluster markersFind genes enriched in each cluster vs all others
ContrastCompare groups defined on the Data page (for example treated vs control)

Uses Wilcoxon rank-sum tests by default. Results include log fold change, adjusted p-values, and percent expressing.

Pseudobulk DE is also available when biological replicate/sample metadata exists. It aggregates cells by sample and cell type or cluster before testing, then reports per-cell-type volcano/result views and exportable tables.

6. Pathway enrichment

Over-representation analysis (ORA) against Gene Ontology biological process terms. Requires gene symbols compatible with the bundled reference (HGNC for demo data).

7. Single-cell CNV and malignant-cell evidence

For tumor single-cell studies, single_cell_cnv infers expression-derived chromosome-scale CNV signal from an AnnData dataset. It uses chromosome-ordered genes, reference-cell centering, smoothing, CNV burden scoring, malignant confidence, segment/event calls, optional deletion/neutral/gain state calls, and CNV-defined subclone summaries.

The result view includes a chromosome-ordered heatmap preview, reference QC, group/sample malignant evidence, event filters, subclone summaries, state-call tables, UMAP malignant-score overlay when coordinates exist, TSV exports, and an oncology handoff artifact. See Single-cell CNV and malignant cells.

Checkpoints

Each step's intermediate checkpoint is tied to its run. Re-running an upstream step deletes downstream checkpoints and marks dependent results stale.

Metadata merge

Before each step, saved metadata columns merge into obs. Ensure join keys match barcodes or sample IDs to avoid silent failures.

See Quick start for a hands-on walkthrough.