Dashboard v0.3.2
2026-11-27
iCellR2 2.0.12 · iCellPy 0.2.9 · SODAviewer 0.2.4
iCS
iCell Suite — iCellR2 · iCellPy · SODA · bash CLI · SODA viewer One suite. One archive. Millions of cells — fast.
R → Python → bash → SODA → viewer on the same disk. Stream atlas-scale projects without converting private objects.
R
iCellR2
Py
iCellPy
SODA
shared disk
Java
viewer
1M+
cells fast
iCell Suite: iCellR2 · iCellPy · SODA · bash CLI · SODA viewer · SODA ≈ BAM for single-cell — portable on-disk archive · Why fast: disk streaming · virtual · lazy scale · HVG cache · Viewer on Win / Mac / Linux

Overview

iCellR2 (R) and iCellPy (Python) share one design: familiar analysis verbs (load → QC → PCA → UMAP), but a thin live handle — all data stays in SODA (single omics data archive). No giant matrices, lists, .rds, or pickles in RAM; the archive is the project. The six highlights below are the design.

SODA is a folder of portable files (JSON · HDF5 · TSV · Parquet) — like BAM for alignments: a tool-neutral layout, not a language-private object. Mid-pipeline handoff is a path; logs and benchmarks travel with the archive.

Because the project is a folder, the same verbs can run from a bwa/samtools-style bash CLI (iCellR2 make.obj …) with R in the background. Packaging atlas-scale sc analysis to the archive, not an in-memory object, is the unit of work across R, Python, viewer, and bash.

Click a highlight for what it is, why it matters, and what you get.

Handle-only · fast open

Thin R S4 or Python handle — paths + dims, not matrix payloads. Archive is the project; open.soda() / open_soda() in seconds.

Details →
Disk streaming · virtual

HDF5 chunks for analysis and QC / gene.stats. Virtual multi-sample assays — no mega-merge by default. Peak RAM ≈ chunk size.

Details →
Lazy scale · HVG cache

Skip a full scaled matrix: PCA applies log/z on HVGs on the fly. Compact HVG × all-cells cache makes multi-pass PCA cheap.

Details →
All cells by default

Sketching is not required. Rare types stay; geometry fits the full cohort.

Details →
SODA ≈ BAM

Portable JSON · HDF5 · TSV · Parquet — tool-neutral like BAM. Same *.soda/ for iCellR2, iCellPy, and the viewer.

Details →
Atlas scale

Dense/sparse-in-RAM fail at 1–100M cells. SODA + streaming does not.

Details →

R · Python · bash — same SODA

Many methods live only in Python; others only in R. Run part of the pipeline in iCellR2, continue in iCellPy (or the reverse) — mid-pipeline handoff is a folder path, not object conversion. The bash CLI is the same idea for shell / HPC scripts: each command is a short R process on a SODA path.

iCellR2 · R

Handle-only S4 · familiar R verbs · Bioconductor-friendly workflow when you need it.

library(iCellR2)
obj <- open.soda("PBMC.soda")
obj <- run.pca(obj, npcs = 50)
iCellPy

Matching verbs on the same archive · numpy / scipy / sklearn / umap-learn under the hood.

import icellpy as ic
obj = ic.open_soda("PBMC.soda")
obj = ic.run_pca(obj, npcs=50)
iCellR2 · bash CLI

Same SODA from the shell — bwa-style iCellR2 <command>; R stays in the background.

iCellR2 make.obj -input raw/PBMC -sample.id pbmc -out.dir PBMC
iCellR2 qc.stats -soda PBMC.soda
iCellR2 run.pca -soda PBMC.soda -npcs 50
The object is not the data — SODA is.
Thin live handles in R, Python, or bash. Assays, embeddings, and logs live in the archive so open stays cheap and language handoff stays possible. Sketching is not required — keep all cells on disk.

At ~1.3M cells — the suite

Measured on the mouse E18 brain matrix (~1.3M cells). iCellR2 and iCellPy stream from SODA through create → UMAP / clustering; SODAviewer opens the same archive on the desktop. Details on the Benchmarks tab.

Scales

iCellR2

SODA streaming · ~56:40 comparable path · peak RAM Δ +12 GB · no sketch required.

Details →
Scales

iCellPy

Matching verbs on the same *.soda/ · numpy / scipy / sklearn under the hood.

Details →
Browse

SODAviewer

Java desktop · Win / Mac / Linux · open the archive without R or Python.

Details →
iCellR2 wall by scale Details →

End-to-end wall through clustering · three SODA demos (2026-09-22).

Peak RAM Δ by scale Details →

Largest per-step RAM growth during the iCellR2 path.

SODA & viewer

SODA (single omics data archive) is a folder of portable files (JSON · HDF5 · TSV · Parquet): assays, reductions, metadata, logs, and benchmarks. Like BAM for alignments, it is a tool-neutral layout, not a language-private object.

Why it matters
  • .rds / AnnData h5ad lock you into one ecosystem and often into RAM.
  • Mid-pipeline handoff should be a path, not an object conversion.
  • Progress, command history, and timings belong with the data so runs are auditable.
What you get
  • Start in iCellR2, continue in iCellPy (or reverse) on the same *.soda/.
  • Browse UMAP / clusters in the Java SODA viewer without re-exporting.
  • iCellR2.log, benchmark.txt, and session summaries travel with the archive.
Bash CLI · same archive

SODA makes a shell front-end natural: each iCellR2 <command> is a short R process that reads/writes a folder path. That is a product leap for single-cell (HPC scripts without learning and monitoring an R session).

iCellR2 make.obj -input raw/PBMC_2700 -sample.id pbmc -out.dir PBMC -project_name PBMC_project
iCellR2 qc.stats -soda PBMC.soda
iCellR2 refresh -soda PBMC.soda
# open PBMC.soda/index.html
Architecture: R, Python, Java, and bash CLI write and read SODA; Viewer browses the same folder
Like BAM — for single-cell

One portable folder many tools open. Not a language-locked AnnData / .rds object you have to load into RAM.

Details →
Archive = project

soda.json · counts.h5 · dims.tsv/parquet — already on disk. Crash? Re-open the folder.

Details →
Desktop viewer

UMAP / PCA, Color by, gene Feature & heatmaps, lasso tools — Win / Mac / Linux, no R or Python session.

Details →
What’s inside *.soda/ Details →
PBMC.soda/
  soda.json                 # manifest
  dims.tsv / parquet        # cells · genes · tables
  modalities/rna/
    assays/counts/*.h5      # streamable sparse
    data/size_factors.tsv   # lazy norm
    cache/.../pca_hvg_*.h5  # HVG cache
  reductions/pca|umap/      # embeddings
  *.log                     # progress · history

Virtual multi-sample = per-sample files + thin handle — no mega-merge by default.

R ↔ Python · same folder Details →
# R writes / continues
obj <- open.soda("PBMC.soda/")
obj <- norm.data(obj, materialize = FALSE)

# Python picks up the same archive
obj = ic.open_soda("PBMC.soda")
obj = ic.run_pca(obj, npcs=50)

# Java viewer opens the folder too
# File → Open SODA…

Handoff is a path — not an object conversion between languages.

SODAviewer

Java desktop app for the same *.soda/ folder — menus, Color by / Scale / Palette, Feature · box · violin · bubble · heatmaps, lasso & pan, export. No R or Python required.

SODAviewer sketch: File/Edit/View/Help menus, reduction and gene toolbars, UMAP colored by clusters with legend
SODAviewer Color by · Scale / Palette · Feature / bubble / heatmaps · Lasso · Pan · Export · macOS DMG
WinMacLinux
Downloads · SODAviewer

Direct links from the v0.2.4 release.

Platform Asset Link
macOS (Apple Silicon) SODAviewer-0.2.4-macos-arm64.dmg Download DMG
macOS (Apple Silicon) SODAviewer-0.2.4-macos-arm64.zip Download ZIP
Windows (portable) SODAviewer-windows.zip Download ZIP
Linux / any OS (JAR) SODAviewer-0.2.4.jar Download JAR
One SODA. Compute in R or Python. Browse in Java.
Thin live handles · portable files · no required .rds · launch with java -jar SODAviewer.jar

Pipeline

One handle-only object through the whole analysis. After make.obj, every step updates the same SODA archive — stream from disk, never densify N×G into slots. Same verbs in iCellR2 and iCellPy.

iCell Suite pipeline: core path with optional imputation, batch alignment, and pseudotime under embedding; markers and DE combined

Click a step or optional card for what it is, why, and what you get.

Core path
01 · Import
Load & aggregate
load10x
data.aggregation
virtual samples Details →
02 · Object
SODA project
make.obj
open.soda / open_soda
handle-only Details →
03 · QC
Quality filter
qc.stats
cell.filter · qc.dashboard
Details →
04 · Normalize
Lazy transforms
norm.data
lazy norm · lazy scale Details →
05 · Features
Gene model
gene.stats
make.gene.model
Details →
06 · Embed
Embeddings
run.pca · run.umap
opt.pcs.plot
HVG cache
Optional under embedding imputation · batch alignment · pseudotime
Details →
07 · Cluster
Graph clusters
iclust
= run.clustering Details →
08 · Markers & DE
Markers · differential expression
findMarkers · top.markers
run.diff.exp
cluster.plot · gene.plot
Details →
Optional under embedding
Imputation

Optional denser expression views without replacing portable counts.

run.impute / run_impute

Details →
Batch alignment

Align multi-batch projects while assays stay on disk in SODA.

data.aggregation · batch / alignment workflows

Details →
Pseudotime

Order cells / clusters along trajectories; cluster-guided maps after embedding.

run.pseudotime · pseudotime.arrows · run.cgumap / run.cgpca

Details →

Benchmarks

Three SODA archives on one page (local demos · 2026-09-22), each through run.clustering (after PCA and UMAP). Wall = clock; CPU = user+system; RAM Δ = peak R memory growth during the call. Below: ~1.3M iCellR2 path detail (create → cluster → UMAP).

Small · ~2.7K Medium · ~320K Large · ~1.3M
Small · ~2.7K

~2.7K cells

Human PBMC · 10x Genomics

Wall
14s8 steps
CPU
14suser + system
Peak RAM Δ
+58 MBduring run.pca
Heaviest step
run.pca5.8s
Details →
Medium · ~320K

~320K PBMC

Human PBMC · GEM-X FLEX

Wall
18:148 steps
CPU
17:19user + system
Peak RAM Δ
+13.8 GBduring run.pca
Heaviest step
run.pca8:44
Details →
Large · ~1.3M

~1.3M neurons

Mouse E18 brain · 10x Genomics

Wall
1:00:598 steps
CPU
59:19user + system
Peak RAM Δ
+12.0 GBduring norm.data
Heaviest step
run.clustering17:49
Details →
End-to-end wall (log scale)

Total wall through clustering. Log scale so ~2.7K (14s) stays visible next to hours.

Peak RAM Δ (log scale)

Largest per-step RAM growth (MB). Log scale bridges MB → multi-GB.

Wall time by step · all three scales

Grouped horizontal bars · minutes. Same 8 pipeline steps on each dataset.

Peak RAM Δ by step · all three scales

Grouped horizontal bars · MB. Spikes on norm.data / run.pca at medium and large scale.

Step table · wall / CPU / RAM Δ
# Function Small · ~2.7K Medium · ~320K Large · ~1.3M
WallCPURAM WallCPURAM WallCPURAM

Local demos · demo_iCellR2*/ · 2026-09-22 · through run.clustering · qc.dashboard omitted · make.gene.model omitted (sub-second).

~1.3M · iCellR2 path

Same mouse E18 brain matrix (~1.3M cells). Timed on the SODA streaming path: create → features → PCA → cluster → UMAP (QC / filter omitted for a clean stage table).

iCellR2

~1.3M · SODA

Comparable path · no QC / filter

Total wall
56:40create → cluster → UMAP
Peak RAM Δ
+12.0 GBduring norm.data
Heaviest
iclust17:49
PCA
16:09lazy scale / HVG cache
Details →
SODAviewer

Same archive

Browse reductions · genes · clusters

Open
File → Open SODA…
Plots
PCA · UMAP · KNetL
Export
Images beside lasso tools
Platforms
Win · Mac · Linux
Details →
Total wall · ~1.3M (comparable path)

Create → features → PCA → cluster → UMAP. QC / filter excluded.

Peak RAM Δ · ~1.3M

Max per-step RAM growth on the iCellR2 path.

Stages · wall (minutes)

Cluster = iclust. Scale is lazy inside PCA (no separate timed step).

Stage table · ~1.3M
Stage iCellR2 Wall RAM Δ
Createmake.obj7.0s+162 MB
Normalizenorm.data13:10+12.0 GB
Featuresmake.gene.model0.5s+0 MB
Scalelazy (in PCA)——
PCArun.pca16:09+9.1 GB
Clustericlust17:49+1.4 GB
UMAPrun.umap9:24+666 MB
Totalcomparable path56:40+12.0 GB peak

QC (qc.stats) and cell.filter excluded from this stage table.

Notes Details →

Tutorials

Start with Install, then pick a tutorial track. Small data (2.7K) has four tracks: iCellR2 · R, iCellR2 · bash, iCellPy, and iCellPy · bash; other tracks cover atlas-scale, HTO, batch, KNetL map, imputation, pseudotime, CITE-seq, VDJ, spatial, ATAC, and multiomics.

Install and each tutorial track open on their own page.

Tutorials · Install

Install · iCellR2 · iCellPy · bash CLIs

Install the R and Python packages once, then optionally put both bash CLIs on your PATH (same A / B / C options for each). Run a bare command to see the full tool list.

Install iCellR2 (R package)

After this, you can run tutorials in R with library(iCellR2).

install.packages("iCellR2")
library(iCellR2)
packageVersion("iCellR2")

Install the iCellR2 bash CLI

Same three options as iCellPy’s CLI. The launcher is a thin bash script that runs R in the background.

Option A · install-cli from bash
# from the iCellR2 source tree
../iCellR2/exec/iCellR2 install-cli
# or if already on PATH:
iCellR2 install-cli

export PATH="$HOME/bin:$PATH"
iCellR2
Option B · install.cli() from R
library(iCellR2)
install.cli()                # → ~/bin/iCellR2
# install.cli(dir = "~/bin")

export PATH="$HOME/bin:$PATH"
iCellR2
Option C · no symlink · put exec/ on PATH
export PATH="/path/to/iCellR2/exec:$PATH"
# from the tutorials checkout:
# export PATH="$(pwd)/../iCellR2/exec:$PATH"
iCellR2

What you should see · full command list

Run iCellR2 with no arguments. Every analysis verb (including run.diff.exp, volcano.ma.plot, clust.cond.info, …) should appear.

Program: iCellR2 (large-scale single-cell analysis  |  SODA archive)
Version: 2.0.2

Usage:   iCellR2 <command> [options]

Command:
  Import / project
         load10x           load 10x Genomics counts (dir or .h5)
         data.aggregation  combine samples into a virtual aggregation
         make.obj          create handle-only project + SODA folder

  QC / normalize / features
         qc.stats          QC metrics into SODA cell metadata
         stats.plot        QC stats plots (png/html)
         cell.filter       filter cells by mito / genes / UMIs
         down.sample       downsample cells by group
         hto.anno          demultiplex hashtag oligos (HTO)
         norm.data         normalize assay
         gene.stats        gene-level stats
         make.gene.model   feature / HVG model (+ optional plot)

  Reduce / cluster / trajectory
         run.pca           PCA
         run.umap          UMAP
         run.knetl         KNetL map (kNN graph)
         run.cgumap        cluster-guided UMAP
         iclust            graph clustering
         run.impute        kNN smooth impute (streamed)
         iba               batch alignment CPCA / CCCA
         run.pseudotime    graph-DPT + soft branches

  Markers / plots
         findMarkers       marker genes (writes TSV)
         i.score           gene-set scores (streamed)
         add.adt           CITE-seq ADT counts (own modality)
         norm.adt          per-cell CLR of ADT counts
         adt.rna.merge     joint RNA+ADT PCA (multimodal/rna_adt)
         add.vdj           V(D)J contigs onto the RNA object
         vdj.stats         clonotype expansion (TCR and BCR)
         clono.plot        highlight a clonotype on the UMAP
         cc                cell cycle S / G2M / Phase (streamed)
         run.tsne          tSNE on existing PCA
         add.visium        Visium / Visium HD positions onto the RNA object
         add.xenium        Xenium centroids (microns); transcripts stay on disk
         spatial.plot      points, or a raster for Visium HD
         spatial.graph     hex, square, kNN, or micron radius
         spatial.genes     Moran's I on the spatial graph
         spatial.transcripts  one Xenium gene, streamed
         merge.peaks       one peak set shared by all samples
         add.atac          ATAC peaks, with or without RNA
         norm.atac         TF-IDF of the peak assay
         gene.activity     sum peaks into genes
         add.multiome      RNA + ATAC (rna.input and atac.input)
         atac.rna.merge    joint RNA+ATAC PCs (multimodal/rna_atac)
         top.markers       top DE genes from a markers table
         run.diff.exp      two-group differential expression
         volcano.ma.plot   volcano / MA from a DE table
         clust.avg.exp     cluster mean expression
         clust.stats.plot  mito / gene / UMI box or violin by cluster
         clust.cond.info   condition composition (pie / bar / table)
         cluster.plot      PCA / UMAP / cgUMAP / KNetL / tSNE plots
         pseudotime.arrows stream / arrow overlays
         heatmap.gg.plot   gene heatmap
         bubble.gg.plot    gene bubble plot
         gene.plot         feature scatter / violin / box / bar

  SODA utilities
         open              open a SODA folder (summary)
         validate          validate a SODA folder
         refresh           rebuild inventory / index.html / manifest
         install-cli       symlink launcher onto PATH (~/bin)
         version           print version
         help              this message

Note: The project is a SODA folder on disk, not a language-private object.
      Typical start:
        iCellR2 make.obj -input raw/PBMC -sample.id pbmc -out.dir iCellR2
        iCellR2 qc.stats -soda iCellR2.soda
        iCellR2 stats.plot -soda iCellR2.soda -out.name plot1_QC -format png

      Run `iCellR2 <command> -h` for command-specific options.

Install iCellPy (Python package)

After this, import icellpy as ic works in scripts and notebooks.

python3 -m pip install icellpy
# from source / editable:
# python3 -m pip install -e "/path/to/iCellPy"
import icellpy as ic
print(ic.__version__)

Install the iCellPy bash CLI

Parallel to iCellR2: thin bash launcher → Python. Same A / B / C pattern.

Option A · put exec/icellpy on PATH
export PATH="/path/to/iCellPy/exec:$PATH"
# from the tutorials checkout:
# export PATH="$(pwd)/../iCellPy/exec:$PATH"
icellpy
Option B · pip console script
python3 -m pip install /path/to/iCellPy
# macOS user install often lands here:
export PATH="$HOME/Library/Python/3.9/bin:$PATH"
icellpy
# also always works:
python3 -m icellpy
Option C · call the launcher by full path
/path/to/iCellPy/exec/icellpy
# or: python3 -m icellpy make.obj …

What you should see · full command list

Run icellpy with no arguments. Core verbs match iCellR2 where implemented (including run.diff.exp, volcano.ma.plot, data.aggregation, …).

Program: icellpy (large-scale single-cell analysis  |  SODA archive)
Version: 0.1.0

Usage:   icellpy <command> [options]

Command:
  Import / project
         load10x           load 10x Genomics counts (dir or .h5)
         data.aggregation  combine samples into a virtual aggregation
         make.obj          create handle-only project + SODA folder

  QC / normalize / features
         qc.stats          QC metrics into SODA cell metadata
         stats.plot        QC stats plots (png/html)
         cell.filter       filter cells by mito / genes / UMIs
         down.sample       downsample cells by group
         hto.anno          demultiplex hashtag oligos (HTO)
         norm.data         normalize assay
         gene.stats        gene-level stats
         make.gene.model   feature / HVG model (+ optional plot)

  Reduce / cluster / trajectory
         run.pca           PCA
         run.umap          UMAP
         run.knetl         KNetL map (kNN graph)
         run.cgumap        cluster-guided UMAP
         iclust            graph clustering
         run.impute        kNN smooth impute (streamed)
         iba               batch alignment CPCA / CCCA
         run.pseudotime    graph-DPT + soft branches

  Markers / plots
         findMarkers       marker genes (writes TSV)
         i.score           gene-set scores (streamed)
         add.adt           CITE-seq ADT counts (own modality)
         norm.adt          per-cell CLR of ADT counts
         adt.rna.merge     joint RNA+ADT PCA (multimodal/rna_adt)
         add.vdj           V(D)J contigs onto the RNA object
         vdj.stats         clonotype expansion (TCR and BCR)
         clono.plot        highlight a clonotype on the UMAP
         cc                cell cycle S / G2M / Phase (streamed)
         run.tsne          tSNE on existing PCA
         add.visium        Visium / Visium HD positions onto the RNA object
         add.xenium        Xenium centroids (microns); transcripts stay on disk
         spatial.plot      points, or a raster for Visium HD
         spatial.graph     hex, square, kNN, or micron radius
         spatial.genes     Moran's I on the spatial graph
         spatial.transcripts  one Xenium gene, streamed
         merge.peaks       one peak set shared by all samples
         add.atac          ATAC peaks, with or without RNA
         norm.atac         TF-IDF of the peak assay
         gene.activity     sum peaks into genes
         add.multiome      RNA + ATAC (rna.input and atac.input)
         atac.rna.merge    joint RNA+ATAC PCs (multimodal/rna_atac)
         top.markers       top DE genes from a markers table
         run.diff.exp      two-group differential expression
         volcano.ma.plot   volcano / MA from a DE table
         clust.avg.exp     cluster mean expression
         clust.stats.plot  mito / gene / UMI box or violin by cluster
         clust.cond.info   condition composition (pie / bar / table)
         cluster.plot      PCA / UMAP / cgUMAP / KNetL / tSNE plots
         pseudotime.arrows stream / arrow overlays
         heatmap.gg.plot   gene heatmap
         bubble.gg.plot    gene bubble plot
         gene.plot         feature scatter / violin / box / bar

  SODA utilities
         open              open a SODA folder (summary)
         validate          validate a SODA folder
         refresh           rebuild inventory / index.html / manifest
         install-cli       symlink launcher onto PATH (~/bin)
         version           print version
         help              this message

Note: The project is a SODA folder on disk, not a language-private object.
      Typical start:
        icellpy make.obj -input raw/PBMC -sample.id pbmc -out.dir PBMC
        icellpy qc.stats -soda PBMC.soda
        icellpy stats.plot -soda PBMC.soda -out plot1_QC.png

      Run `icellpy <command> -h` for command-specific options.

Tutorials · Small data

Small data · ~2.7K cells · four tracks
End-to-end small PBMC demo across four tracks (R, R bash, Python, Python bash). Each step explains what the function does, whether it materializes data, and where files land in SODA (with table headers).

Big picture

Public input is the classic 10x Genomics PBMC 3K dataset (filtered gene-barcode matrices). For this tutorial it was split into four labeled samples — WT, KO, Ctrl, KD as separate .h5 files under 1_small_data/data/ — so you can practice a multi-sample workflow (aggregation + conditions), not just a single matrix. Script: 1_small_data/iCellR2/test.R. The durable archive is PBMC.soda/. Pipeline below:
load10x ×4→ aggregate→ make.obj / SODA→ QC + filter→ norm→ gene model→ PCA · UMAP · cluster→ pseudotime→ markers · DE · plots

01 · Load each sample · load10x

load10x reads one 10x Genomics source — either a Cell Ranger outs directory (matrix.mtx + barcodes/features) or a native .h5 — and returns a sample handle. With output = "virtual" (recommended), HDF5 inputs keep a pointer to the original file (no matrix copy into RAM); MTX directories are converted to a modern 10x HDF5 first. That is why virtual is good for large or multi-sample projects: memory stays thin and each sample keeps its own file identity. Virtual is still temporary until make.obj — the self-contained SODA copy is created there (by default copy.raw = TRUE copies counts into the archive). Useful options: input.format (auto / 10x_h5 / 10x_dir), sample.id (becomes the condition label), output = "data.frame" if you truly want an in-memory matrix.
library(iCellR2)

wt <- load10x("../data/WT.h5", input.format = "10x_h5",
              sample.id = "WT", output = "virtual", overwrite = TRUE)
ko <- load10x("../data/KO.h5", input.format = "10x_h5",
              sample.id = "KO", output = "virtual", overwrite = TRUE)
ctrl <- load10x("../data/Ctrl.h5", input.format = "10x_h5",
                sample.id = "Ctrl", output = "virtual", overwrite = TRUE)
kd <- load10x("../data/KD.h5", input.format = "10x_h5",
              sample.id = "KD", output = "virtual", overwrite = TRUE)

02 · Combine samples · data.aggregation

data.aggregation is only needed when you have more than one sample. A single load10x result can go straight into make.obj. With multiple samples it builds a logical aggregation: sample handles, barcode maps, and condition labels — no merged mega-matrix in RAM. Prefer unique sample.ids in each load10x call so conditions (WT / KO / Ctrl / KD) are set automatically. This step still does not create a SODA; it only stages inputs for make.obj.
agg <- data.aggregation(
  samples = list(WT = wt, KO = ko, Ctrl = ctrl, KD = kd),
  output = "virtual"
)

03 · Create the archive · make.obj

make.obj creates the project: a thin handle-only object plus the on-disk SODA (Single Omics Data Archive) at out.dir.soda (here PBMC.soda/). Assay matrices are not kept inside the S4 object — they live under modalities/rna/assays/counts/. For native 10x HDF5, default copy.raw = TRUE copies each sample’s .h5 into the archive so the project is portable; set copy.raw = FALSE to store pointers only (saves disk, less self-contained). Also writes metadata/cell_data.tsv, sample/feature tables, soda.json, and project info. This is the moment virtual staging becomes a real analysis archive.
obj <- make.obj(
  x = agg,
  out.dir = "PBMC",
  project_name = "PBMC_project",
  modality = "rna",
  assay.name = "counts",
  overwrite = TRUE
)
Saved in SODA
PBMC.soda/metadata/cell_data.tsv

Also written: metadata/sample_data.tsv, metadata/rna_feature_data.tsv, soda.json, modalities/rna/assays/counts/<sample>/*.h5

cell_id	barcode	sample_id	...	condition_id	nGenes	UMIs	mito.percent	...
WT_AAACATACAACCAC.1	AAACATACAACCAC.1	WT	...	WT	781	2421	0.030	...
WT_AAACATTGAGCTAC.1	AAACATTGAGCTAC.1	WT	...	WT	1352	4903	0.038	...

04 · QC metrics · qc.stats

qc.stats streams the counts assay in column chunks and computes per-cell QC — nGenes, UMIs, mito.percent (and optional cell-cycle probabilities) — without building a dense matrix. Multi-sample SODAs are streamed sample-by-sample. Results are written into metadata/cell_data.tsv. No cells are removed here; this step only measures so you can choose filters next.
obj <- qc.stats(obj)
Saved in SODA
PBMC.soda/metadata/cell_data.tsv

New columns include nGenes, UMIs, mito.percent (later also cluster / Pseudotime).

cell_id	barcode	sample_id	...	condition_id	nGenes	UMIs	mito.percent	...
WT_AAACATACAACCAC.1	AAACATACAACCAC.1	WT	...	WT	781	2421	0.030	...
WT_AAACATTGAGCTAC.1	AAACATTGAGCTAC.1	WT	...	WT	1352	4903	0.038	...

05 · Explore QC · stats.plot

stats.plot turns those QC columns into an interactive HTML filter explorer (plus optional PNG). Use it to visualize mito / gene / UMI distributions and pick thresholds before calling cell.filter. Outputs land in the working folder (e.g. plot1_QC.html), not inside SODA.
stats.plot(obj, out.name = "plot1_QC", format = c("html", "png"))

Working-folder outputs: plot1_QC.html, plot1_QC.png

06 · Filter cells · cell.filter

cell.filter applies thresholds on QC columns (mito fraction, genes/cell, UMIs/cell) and optional cell-id rules. By default it is metadata-only: raw counts in SODA stay intact; kept cell ids are recorded under modalities/rna/filters/kept_cell_ids.tsv and cell_data is subset. Downstream norm.data then writes the normalized assay with filtered cells only. Run qc.stats first so mito / nGenes / UMI columns exist.
obj <- cell.filter(obj, max.mito = 0.1, min.genes = 200, min.umis = 500)
Saved in SODA
PBMC.soda/modalities/rna/filters/kept_cell_ids.tsv
cell_id
WT_AAACATACAACCAC.1
WT_AAACATTGAGCTAC.1

07 · Normalize · norm.data

norm.data normalizes counts with streaming chunks (never densifies the full matrix). Default materialize = TRUE: writes a portable on-disk normalized assay (typically modalities/rna/assays/data/) plus size factors, using only cells still in cell_data after filtering. Raw counts are left untouched. For multiple samples the default merges into one normalized HDF5 (set merge = FALSE to keep per-sample files). Lazy mode: materialize = FALSE writes size factors only (…/data/size_factors.tsv) and defers the matrix — better for atlas-scale RAM. This tutorial uses the default materialize path with global.glsf.
## default = materialize TRUE
obj <- norm.data(obj, norm.method = "global.glsf")

## lazy alternative (size factors only):
## obj <- norm.data(obj, norm.method = "global.glsf", materialize = FALSE)
Saved in SODA
PBMC.soda/modalities/rna/assays/data/size_factors.tsv

With materialize=TRUE, normalized values also live in modalities/rna/assays/data/ (HDF5).

cell_id	size_factor
WT_AAACATACAACCAC.1	1.021
WT_AAACATTGAGCTAC.1	2.068

08 · Gene-level stats · gene.stats

gene.stats streams the assay and computes per-gene statistics (detection rate, mean, SD, optionally by condition) without densifying. By default it summarizes the normalized "data" assay — run norm.data first. It does not create a new assay; it writes metadata/rna_gene_stats.tsv for make.gene.model / HVG selection.
obj <- gene.stats(obj)
Saved in SODA
PBMC.soda/metadata/rna_gene_stats.tsv
genes	numberOfCells	totalNumberOfCells	percentOfCells	meanExp	SDs	condition
MIR1302.10	0	2694	0	0	0	all
FAM138A	0	2694	0	0	0	all

09 · Feature / HVG model · make.gene.model

make.gene.model builds the feature set used by PCA from gene.stats output. Default gate is classic iCellR (cell-count × dispersion via base.mean.rank + dispersion.limit); an alternate mean × dispersion view is drawn for exploration in HTML/PNG. Selected genes are stored as metadata/rna_gene_model.tsv. Parameters like gene.num.max cap how many HVGs enter the model.
obj <- make.gene.model(
  obj,
  dispersion.limit = 1.5,
  base.mean.rank = 1000,
  gene.num.max = 2000,
  out.name = "plot2_GM",
  format = c("html", "png")
)
Saved in SODA
PBMC.soda/metadata/rna_gene_model.tsv
feature_id
FTL
FTH1

10 · PCA · run.pca

run.pca computes principal components on the gene-model features, streaming from the normalized (or scaled) assay. Embeddings, loadings, and standard deviations are written under reductions/pca/ (HDF5 + stdev.tsv). The counts assay is unchanged. method = "gene.model" uses the HVG list from the previous step; npcs sets how many PCs to keep.
obj <- run.pca(obj, method = "gene.model", npcs = 50, verbose = TRUE)
obj <- open.soda("PBMC.soda")   # optional reload
Saved in SODA
PBMC.soda/reductions/pca/stdev.tsv

Also: reductions/pca/cell_embeddings.h5, feature_loadings.h5, reduction.json

pc	stdev
1	8.185
2	5.221

11 · UMAP · run.umap

run.umap builds a 2D (or 3D) UMAP embedding from selected PCA dimensions (here dims = 1:10). Coordinates are stored under reductions/umap/. If batch-aligned PCA exists, UMAP can prefer it via use / auto resolution.
obj <- run.umap(obj, dims = 1:10)
SODA paths: PBMC.soda/reductions/umap/cell_embeddings.h5 and reduction.json.

12 · Cluster · iclust

iclust builds a shared-nearest-neighbor / graph clustering on PCA space (Louvain-style community detection). sensitivity controls resolution-like granularity (try ~20–40; very high values make huge blobs). Cluster labels are written into cell_data and metadata/clustering/rna_cluster_id.tsv. Sketching is off here so all cells stay on disk.
obj <- iclust(
  obj, data.type = "pca", dims = 1:10, sensitivity = 30,
  use.sketch = FALSE, verbose = TRUE
)
Saved in SODA
PBMC.soda/metadata/clustering/rna_cluster_id.tsv
cell_id	clusters
WT_AAACATACAACCAC.1	7
WT_AAACATTGAGCTAC.1	3

13 · Cluster means · clust.avg.exp

clust.avg.exp computes mean expression per cluster (and optionally per condition) by streaming the assay. Useful for heatmaps and bubble plots. Output: a wide gene × cluster table at metadata/clustering/rna_clust_avg.tsv. Pass conds.to.avg = "WT" (etc.) to average within one condition only.
obj <- clust.avg.exp(obj, conds.to.avg = NULL)  # all conditions
## one group only: clust.avg.exp(obj, conds.to.avg = "WT")
Saved in SODA
PBMC.soda/metadata/clustering/rna_clust_avg.tsv
gene	cluster_1	cluster_2	...	cluster_10
MIR1302.10	0	0	...	0
FAM138A	0	0	...	0

14 · Cluster overview plots

cluster.plot draws cells in a chosen reduction (pca, umap, tsne, knetl, …) colored by clusters or any cell_data column. cond.facet = TRUE splits panels by condition so you can see WT/KO/Ctrl/KD side by side. clust.cond.info summarizes how conditions are distributed across clusters (pie or bar; percentage or counts).
A <- cluster.plot(obj, plot.type = "pca")
B <- cluster.plot(obj, plot.type = "umap")
png("AllClusts.png", width = 14, height = 6, units = "in", res = 300)
gridExtra::grid.arrange(A, B, ncol = 2)
dev.off()
PCA and UMAP
png("umap_facet_conditions.png", width = 12, height = 10, units = "in", res = 300)
print(cluster.plot(obj, plot.type = "umap", col.by = "clusters",
                   cond.facet = TRUE, interactive = FALSE))
dev.off()
Faceted UMAP
png("cond_pie.png", width = 10, height = 8, units = "in", res = 300)
print(clust.cond.info(obj, plot.type = "pie", normalize.ncell = TRUE,
                      my.out.put = "plot", normalize.by = "percentage"))
dev.off()
png("cond_bar.png", width = 10, height = 8, units = "in", res = 300)
print(clust.cond.info(obj, plot.type = "bar", normalize.ncell = TRUE,
                      my.out.put = "plot", normalize.by = "percentage"))
dev.off()
Condition pie Condition bar

15 · Pseudotime · run.pseudotime

run.pseudotime runs graph diffusion pseudotime (DPT-style) on the embedding graph. It writes continuous Pseudotime and discrete branch_id into cell_data, plus tip cells under reductions/pseudotime/. root.cluster sets the origin (demo uses the largest cluster — edit for biology). soft.branches / n.tips control branch soft assignment. pseudotime.arrows overlays stream or arrow fields on UMAP for visualization.
cl_tab <- sort(table(obj@cell_data$cluster_id), decreasing = TRUE)
root_cl <- names(cl_tab)[1]
obj <- run.pseudotime(obj, root.cluster = root_cl,
                      soft.branches = TRUE, n.tips = 2L, verbose = TRUE)
Saved in SODA
PBMC.soda/reductions/pseudotime/tips.tsv

Also: reductions/pseudotime/cell_embeddings.h5; Pseudotime / branch_id columns in metadata/cell_data.tsv

tip_index	tip_cell
1	Ctrl_GGGTTAACGTGCAT.1
2	Ctrl_GGAACACTTCAGAC.1
P1 <- cluster.plot(obj, plot.type = "umap", col.by = "clusters")
P2 <- cluster.plot(obj, plot.type = "umap", col.by = "Pseudotime")
P3 <- cluster.plot(obj, plot.type = "umap", col.by = "branch_id")
png("pseudotime.png", width = 14, height = 4.5, units = "in", res = 300)
gridExtra::grid.arrange(P1, P2, P3, ncol = 3); dev.off()

PA_stream <- pseudotime.arrows(obj, plot.type = "umap", col.by = "clusters", style = "stream")
PA_arrows <- pseudotime.arrows(obj, plot.type = "umap", col.by = "clusters", style = "arrows")
png("pseudotime_arrows.png", width = 14, height = 6, units = "in", res = 300)
gridExtra::grid.arrange(PA_stream, PA_arrows, ncol = 2); dev.off()
Pseudotime Arrows

16 · Markers · heatmaps · gene plots

findMarkers ranks genes that distinguish each cluster (writes metadata/markers/); top.markers keeps the top N per cluster. heatmap.gg.plot / bubble.gg.plot show those genes across cells or clusters. gene.plot supports scatter (feature on UMAP), violin, boxplot, and barplot for the same gene list.
markers <- findMarkers(obj)
write.table(markers, "markers.tsv", sep = "\t", quote = FALSE, row.names = FALSE)
top.de <- top.markers(markers, topde = 5)
lineage.genes <- c("MS4A1","GNLY","CD3E","CD14","FCER1A","FCGR3A","LYZ","PPBP","CD8A")
Saved in SODA
PBMC.soda/metadata/markers/rna_findMarkers.tsv
gene	baseMean	...	foldChange	log2FoldChange	pval	padj	clusters
C19orf59	0.024	...	372.0	8.54	...	1
CLEC4E	0.031	...	286.0	8.16	...	1
png("heatmap_markers.png", width = 14, height = 8, units = "in", res = 300)
print(heatmap.gg.plot(obj, gene = top.de)); dev.off()
png("heatmap_markers_by_cluster.png", width = 8, height = 10, units = "in", res = 300)
print(heatmap.gg.plot(obj, gene = top.de, group.by = "clusters")); dev.off()
png("heatmap_lineage.png", width = 14, height = 5, units = "in", res = 300)
print(heatmap.gg.plot(obj, gene = lineage.genes)); dev.off()
png("bubble_markers.png", width = 8, height = 10, units = "in", res = 300)
print(bubble.gg.plot(obj, gene = top.de, interactive = FALSE)); dev.off()
png("feature_lineage.png", width = 12, height = 10, units = "in", res = 300)
print(gene.plot(obj, gene = lineage.genes, plot.type = "scatter",
                reduction = "umap", interactive = FALSE)); dev.off()
markers by cluster lineage hm bubble features
png("gene_violin.png", width = 12, height = 8, units = "in", res = 300)
print(gene.plot(obj, gene = lineage.genes, plot.type = "violin", interactive = FALSE)); dev.off()
violin
png("gene_box.png", width = 12, height = 8, units = "in", res = 300)
print(gene.plot(obj, gene = lineage.genes, plot.type = "boxplot", interactive = FALSE)); dev.off()
box
png("gene_bar.png", width = 12, height = 8, units = "in", res = 300)
print(gene.plot(obj, gene = lineage.genes, plot.type = "barplot", interactive = FALSE)); dev.off()
bar

17 · Differential expression · run.diff.exp

run.diff.exp runs two-group differential expression by streaming the assay (chunked sum / sum-of-squares; optional Wilcoxon second pass). Fold-change is mean(group.2) / mean(group.1). Groups accept multiple ids. Modes: clusters, conditions, conditions_in_cluster (needs within), clusters_in_condition (needs within). Results are written under metadata/diffexp/; visualize with volcano.ma.plot.
## A) clusters vs clusters (single ids)
de <- run.diff.exp(obj, compare = "clusters", group.1 = 1, group.2 = 2)

## B) clusters vs clusters (pooled ids)
de <- run.diff.exp(obj, compare = "clusters",
                   group.1 = c(1, 3), group.2 = c(2, 5))

## C) conditions vs conditions
de <- run.diff.exp(obj, compare = "conditions",
                   group.1 = "KO", group.2 = c("WT", "Ctrl"))

## D) conditions inside one (or more) clusters
de <- run.diff.exp(obj, compare = "conditions_in_cluster",
                   within = 3, group.1 = "KO", group.2 = "WT")

## E) clusters inside one (or more) conditions
de <- run.diff.exp(obj, compare = "clusters_in_condition",
                   within = "WT", group.1 = 1, group.2 = 2)

## Optional: Wilcoxon instead of Welch t-test
de <- run.diff.exp(obj, compare = "clusters", group.1 = 1, group.2 = 2,
                   pval.test = "wilcox.test")

png("volcano.png", width = 7, height = 6, units = "in", res = 150)
print(volcano.ma.plot(de)); dev.off()
Saved in SODA
PBMC.soda/metadata/diffexp/rna_clusters__1__2.tsv

Filename encodes the contrast (here clusters 1 vs 2).

gene	baseMean	1	2	foldChange	log2FoldChange	pval	padj
AL627309.1	0.0067	0.010	0.0018	0.176	-2.51	0.065	...
AP006222.2	0.0031	0.0022	0.0043	2.017	1.01	0.560	...
volcano

Same pipeline · bash CLI

Bash track for the same four-sample PBMC SODA: 1_small_data/iCellR2/test_cli.sh. Prefer Rscript test.R once so load10x → aggregation → make.obj creates PBMC.soda/, then run the pipeline verbs with iCellR2 … -soda PBMC.soda. Defaults match R (norm.data materializes; pass -materialize FALSE for lazy size factors).
export PATH="/path/to/iCellR2/exec:$PATH"
cd 1_small_data/iCellR2
iCellR2 qc.stats -soda PBMC.soda
iCellR2 stats.plot -soda PBMC.soda -out.name plot1_QC -format html
iCellR2 cell.filter -soda PBMC.soda -max.mito 0.1 -min.genes 200 -min.umis 500
iCellR2 norm.data -soda PBMC.soda -norm.method global.glsf
iCellR2 gene.stats -soda PBMC.soda
iCellR2 make.gene.model -soda PBMC.soda -dispersion.limit 1.5 -base.mean.rank 1000 -gene.num.max 2000 -out.name plot2_GM -format html
iCellR2 run.pca -soda PBMC.soda -method gene.model -npcs 50
iCellR2 run.umap -soda PBMC.soda -dims 1:10
iCellR2 iclust -soda PBMC.soda -dims 1:10 -sensitivity 30
iCellR2 clust.avg.exp -soda PBMC.soda
iCellR2 cluster.plot -soda PBMC.soda -plot.type umap -col.by clusters -cond.facet TRUE -out umap_facet.png
iCellR2 run.pseudotime -soda PBMC.soda -soft.branches TRUE -n.tips 2
iCellR2 findMarkers -soda PBMC.soda -out markers.tsv
GENES=MS4A1,GNLY,CD3E,CD14,FCER1A,FCGR3A,LYZ,PPBP,CD8A
iCellR2 gene.plot -soda PBMC.soda -gene $GENES -plot.type violin -out gene_violin.png
iCellR2 gene.plot -soda PBMC.soda -gene $GENES -plot.type boxplot -out gene_box.png
iCellR2 gene.plot -soda PBMC.soda -gene $GENES -plot.type barplot -out gene_bar.png
iCellR2 run.diff.exp -soda PBMC.soda -compare clusters -group.1 1 -group.2 2 -out de.tsv
iCellR2 run.diff.exp -soda PBMC.soda -compare conditions -group.1 KO -group.2 WT -out de_cond.tsv
iCellR2 run.diff.exp -soda PBMC.soda -compare conditions_in_cluster -within 3 -group.1 KO -group.2 WT -out de_in.tsv
iCellR2 volcano.ma.plot -de de.tsv -out volcano.png
Saved in SODA
PBMC.soda/metadata/diffexp/rna_clusters__1__2.tsv
gene	baseMean	1	2	foldChange	log2FoldChange	pval	padj
AL627309.1	0.0067	0.010	0.0018	0.176	-2.51	0.065	...
AP006222.2	0.0031	0.0022	0.0043	2.017	1.01	0.560	...
clusts violin box bar volcano

Big picture

Same PBMC 3K-derived four-sample layout (WT / KO / Ctrl / KD .h5 files from the 10x PBMC 3K source, split to demonstrate multi-sample aggregation). Script: 1_small_data/iCellPy/test.py. data_aggregation only when >1 sample; make_obj writes the real PBMC.soda/. Pipeline:
load10x ×4→ aggregate→ make_obj / SODA→ QC + filter→ norm→ gene model→ PCA · UMAP · cluster→ pseudotime→ markers · DE · plots

01–03 · load10x → aggregate → make_obj

load10x returns a virtual sample handle from each 10x .h5 (thin pointer; no full matrix in RAM). data_aggregation is only for multi-sample runs — it stages the four WT/KO/Ctrl/KD handles with condition labels and does not merge counts into one in-memory matrix. make_obj is where the real PBMC.soda/ archive is written (counts under modalities/rna/assays/counts/, plus metadata/cell_data.tsv). Skip aggregation if you only have one sample and pass that handle straight to make_obj.
import icellpy as ic
wt = ic.load10x("../data/WT.h5", input_format="10x_h5", sample_id="WT", output="virtual", overwrite=True)
ko = ic.load10x("../data/KO.h5", input_format="10x_h5", sample_id="KO", output="virtual", overwrite=True)
ctrl = ic.load10x("../data/Ctrl.h5", input_format="10x_h5", sample_id="Ctrl", output="virtual", overwrite=True)
kd = ic.load10x("../data/KD.h5", input_format="10x_h5", sample_id="KD", output="virtual", overwrite=True)
# skip data_aggregation if you only have one sample
agg = ic.data_aggregation(samples={"WT": wt, "KO": ko, "Ctrl": ctrl, "KD": kd}, output="virtual", overwrite=True)
obj = ic.make_obj(agg, out_dir="PBMC", project_name="PBMC_project", modality="rna", assay_name="counts", overwrite=True)
Saved in SODA
PBMC.soda/metadata/cell_data.tsv
cell_id	barcode	sample_id	...	condition_id	nGenes	UMIs	mito.percent	...
WT_AAACATACAACCAC.1	AAACATACAACCAC.1	WT	...	WT	781	2421	0.030	...
WT_AAACATTGAGCTAC.1	AAACATTGAGCTAC.1	WT	...	WT	1352	4903	0.038	...

04–06 · QC → filter

qc_stats streams counts and fills per-cell nGenes / UMIs / mito.percent in cell_data (no cells removed yet). stats_plot builds the interactive HTML explorer so you can pick thresholds. cell_filter then keeps cells that pass mito / gene / UMI cutoffs — by default metadata-only (raw counts stay; kept ids under filters/kept_cell_ids.tsv).
obj = ic.qc_stats(obj)
ic.stats_plot(obj, out_name="plot1_QC", format=["html", "png"])
obj = ic.cell_filter(obj, max_mito=0.1, min_genes=200, min_umis=500)
Saved in SODA
PBMC.soda/modalities/rna/filters/kept_cell_ids.tsv
cell_id
WT_AAACATACAACCAC.1
WT_AAACATTGAGCTAC.1

07–09 · norm → gene_stats → gene model

norm_data streams normalization; default materialize=True writes the portable normalized assay plus size factors (raw counts untouched). Use materialize=False for lazy size-factor-only mode on large data. gene_stats computes per-gene detection / mean / SD on that assay into metadata/rna_gene_stats.tsv. make_gene_model selects HVGs (dispersion × mean-rank gate) into metadata/rna_gene_model.tsv for PCA.
obj = ic.norm_data(obj)  # materialize=True by default
obj = ic.gene_stats(obj)
obj = ic.make_gene_model(obj, dispersion_limit=1.5, base_mean_rank=1000, gene_num_max=2000)
Saved in SODA
PBMC.soda/modalities/rna/assays/data/size_factors.tsv
cell_id	size_factor
WT_AAACATACAACCAC.1	1.021
WT_AAACATTGAGCTAC.1	2.068
Saved in SODA
PBMC.soda/metadata/rna_gene_stats.tsv
genes	numberOfCells	totalNumberOfCells	percentOfCells	meanExp	SDs	condition
MIR1302.10	0	2694	0	0	0	all
FAM138A	0	2694	0	0	0	all
Saved in SODA
PBMC.soda/metadata/rna_gene_model.tsv
feature_id
FTL
FTH1

10–14 · PCA → UMAP → cluster → plots

run_pca embeds gene-model features into PCs under reductions/pca/. run_umap builds 2D coords from selected dims into reductions/umap/. iclust graph-clusters on PCA (Louvain-style; sensitivity ≈ resolution) and writes cluster ids into cell_data / metadata/clustering/. clust_avg_exp averages expression per cluster for heatmaps and bubble plots.
obj = ic.run_pca(obj, npcs=50)
obj = ic.run_umap(obj, dims=list(range(1, 11)))
obj = ic.iclust(obj, data_type="pca", dims=list(range(1, 11)), sensitivity=30, use_sketch=False)
obj = ic.clust_avg_exp(obj, conds_to_avg=None)
Saved in SODA
PBMC.soda/reductions/pca/stdev.tsv
pc	stdev
1	8.185
2	5.221
Saved in SODA
PBMC.soda/metadata/clustering/rna_cluster_id.tsv
cell_id	clusters
WT_AAACATACAACCAC.1	7
WT_AAACATTGAGCTAC.1	3
AllClusts py facet py

15–17 · Pseudotime · markers · gene plots · DE

run_pseudotime writes continuous Pseudotime and branch_id (plus tip cells). find_markers / top_markers rank cluster markers. gene_plot draws violin / box / bar panels for selected genes. run_diff_exp streams two-group DE (compare="cluster_id" or "condition_id"); fold-change is mean(group_2)/mean(group_1). Finish with volcano_ma_plot.
root_cl = obj.cell_data["cluster_id"].astype(str).value_counts().index[0]
obj = ic.run_pseudotime(obj, root_cluster=root_cl, soft_branches=True, n_tips=2)
obj = ic.find_markers(obj)
top = ic.top_markers(obj, n=5)
lineage = ["MS4A1","GNLY","CD3E","CD14","FCER1A","FCGR3A","LYZ","PPBP","CD8A"]
ic.gene_plot(obj, genes=lineage, plot_type="violin", out_file="gene_violin.png")
ic.gene_plot(obj, genes=lineage, plot_type="boxplot", out_file="gene_box.png")
ic.gene_plot(obj, genes=lineage, plot_type="barplot", out_file="gene_bar.png")
# DE examples (Python: compare cluster_id or condition_id)
clusters = sorted(obj.cell_data["cluster_id"].astype(str).unique())
obj = ic.run_diff_exp(obj, compare="cluster_id", group_1=clusters[0], group_2=clusters[1])
obj = ic.run_diff_exp(obj, compare="condition_id", group_1="KO", group_2="WT")
ic.volcano_ma_plot(obj, out_file="volcano.png")
Saved in SODA
PBMC.soda/reductions/pseudotime/tips.tsv
tip_index	tip_cell
1	Ctrl_GGGTTAACGTGCAT.1
2	Ctrl_GGAACACTTCAGAC.1
violin py box py bar py volcano py

Same pipeline · iCellPy bash CLI

Bash track for the same four-sample PBMC SODA: 1_small_data/iCellPy/test_cli.sh. Prefer python3 test.py once for load → aggregate → make_obj, then continue with icellpy … -soda PBMC.soda. Same materialize / SODA path rules as the R CLI.
export PATH="/path/to/iCellPy/exec:$PATH"
cd 1_small_data/iCellPy
icellpy qc.stats -soda PBMC.soda
icellpy cell.filter -soda PBMC.soda -max.mito 0.1 -min.genes 200 -min.umis 500
icellpy norm.data -soda PBMC.soda
icellpy gene.stats -soda PBMC.soda
icellpy make.gene.model -soda PBMC.soda -dispersion.limit 1.5 -base.mean.rank 1000 -gene.num.max 2000
icellpy run.pca -soda PBMC.soda -npcs 50
icellpy run.umap -soda PBMC.soda -dims 1:10
icellpy iclust -soda PBMC.soda -dims 1:10 -sensitivity 30
icellpy run.pseudotime -soda PBMC.soda -soft.branches -n.tips 2
icellpy findMarkers -soda PBMC.soda
GENES=MS4A1,GNLY,CD3E,CD14,FCER1A,FCGR3A,LYZ,PPBP,CD8A
icellpy gene.plot -soda PBMC.soda -gene $GENES -plot.type violin -out gene_violin.png
icellpy gene.plot -soda PBMC.soda -gene $GENES -plot.type boxplot -out gene_box.png
icellpy gene.plot -soda PBMC.soda -gene $GENES -plot.type barplot -out gene_bar.png
icellpy run.diff.exp -soda PBMC.soda -compare cluster_id -group.1 1 -group.2 2
icellpy run.diff.exp -soda PBMC.soda -compare condition_id -group.1 KO -group.2 WT
icellpy volcano.ma.plot -soda PBMC.soda -out volcano.png
icellpy validate -soda PBMC.soda
icellpy refresh -soda PBMC.soda
Saved in SODA
PBMC.soda/metadata/clustering/rna_cluster_id.tsv
cell_id	clusters
WT_AAACATACAACCAC.1	7
WT_AAACATTGAGCTAC.1	3
py v b a
Cross-language handoff
Same PBMC.soda/ from any track. Finish QC in R, continue with ic.open_soda("PBMC.soda") or icellpy open -soda PBMC.soda (and the reverse).

Tutorials · Large data

Large data · ~1.3M cells

Atlas-scale RNA walkthrough on SODA: disk streaming, virtual samples, lazy norm/scale, HVG cache, and full-cell PCA/UMAP/clustering without sketching by default.

Tutorial coming soon · R

Large data · ~1.3M cells · iCellR2

Atlas-scale RNA walkthrough on SODA: disk streaming, virtual samples, lazy norm/scale, HVG cache, and full-cell PCA/UMAP/clustering without sketching by default.

library(iCellR2)
# Tutorial steps for this track will appear here.
obj <- open.soda("project.soda/")
Tutorial coming soon · Python

Large data · ~1.3M cells · iCellPy

Atlas-scale RNA walkthrough on SODA: disk streaming, virtual samples, lazy norm/scale, HVG cache, and full-cell PCA/UMAP/clustering without sketching by default.

import icellpy as ic
# Tutorial steps for this track will appear here.
obj = ic.open_soda("project.soda")
Tutorial coming soon · bash

Large data · ~1.3M cells · bash CLI

Atlas-scale RNA walkthrough on SODA: disk streaming, virtual samples, lazy norm/scale, HVG cache, and full-cell PCA/UMAP/clustering without sketching by default.

# Install CLI once (pick one):
#   iCellR2 install-cli
#   # or: export PATH="/path/to/iCellR2/exec:$PATH"

# Tutorial steps for this track will appear here.
iCellR2 open -soda project.soda

Tutorials · Imputation

Imputation

Optional denser expression views for smoother gene plots — without replacing portable counts in SODA. Same sketch as the Pipeline optional step.

Imputation sketch

Tutorial coming soon · R

Imputation · iCellR2

run.impute builds an optional imputed expression layer for visualization. Raw/normalized counts in SODA remain the portable source of truth.

library(iCellR2)
obj <- open.soda("project.soda/")
# after run.pca (and preferably norm.data)
obj <- run.impute(obj, nn = 10, reduction = "pca")
# gene.plot(obj, gene = "CD3D", assay.name = "imputed")
Tutorial coming soon · Python

Imputation · iCellPy

run_impute builds an optional imputed expression layer for visualization. Raw/normalized counts in SODA remain the portable source of truth.

import icellpy as ic
obj = ic.open_soda("project.soda")
# Python run_impute: not implemented yet — use iCellR2 / bash
# obj = ic.run_impute(obj, nn=10)
Tutorial coming soon · bash

Imputation · bash CLI

run.impute builds an optional imputed expression layer for visualization. Raw/normalized counts in SODA remain the portable source of truth.

# after run.pca on the SODA project
iCellR2 run.impute -soda project.soda -nn 10 -reduction pca
# iCellR2 gene.plot -soda project.soda -gene CD3D -assay.name imputed

Tutorials · Batch alignment

Batch alignment

Correct or align batches across samples/donors while keeping a handle-only object and portable SODA outputs.

Tutorial coming soon · R

Batch alignment · iCellR2

Correct or align batches across samples/donors while keeping a handle-only object and portable SODA outputs.

library(iCellR2)
# Tutorial steps for this track will appear here.
obj <- open.soda("project.soda/")
Tutorial coming soon · Python

Batch alignment · iCellPy

Correct or align batches across samples/donors while keeping a handle-only object and portable SODA outputs.

import icellpy as ic
# Tutorial steps for this track will appear here.
obj = ic.open_soda("project.soda")
Tutorial coming soon · bash

Batch alignment · bash CLI

Correct or align batches across samples/donors while keeping a handle-only object and portable SODA outputs.

# Install CLI once (pick one):
#   iCellR2 install-cli
#   # or: export PATH="/path/to/iCellR2/exec:$PATH"

# Tutorial steps for this track will appear here.
iCellR2 open -soda project.soda

Tutorials · KNetL map

KNetL map

Build a KNetL embedding from PCA (kNN graph layout) and plot clusters on the network map. Lower zoom is a closer neighborhood view. Embeddings land under reductions/knetl/ and open in SODAviewer alongside PCA / UMAP.

KNetL watercolor sketch

KNetL map · iCellR2

After PCA and clustering, run run.knetl then cluster.plot(..., plot.type = "knetl").

library(iCellR2)
obj <- open.soda("pbmc3k_knetl.soda/")

# after run.pca + iclust
obj <- run.knetl(
  obj,
  zoom = 110,
  dims = 1:20,
  use = "pca"
)

cluster.plot(obj, plot.type = "knetl")
# SODAviewer: open the same *.soda/ and choose knetl

KNetL map · iCellPy

Matching verbs write the same reductions/knetl/ layout.

import icellpy as ic
obj = ic.open_soda("pbmc3k_knetl.soda")

# after run_pca + iclust
obj = ic.run_knetl(
    obj,
    zoom=110,
    dims=range(1, 21),
    use="pca",
)

ic.cluster_plot(obj, reduction="knetl")

KNetL map · bash CLI

Same archive from the shell.

# after run.pca / iclust on the SODA project
iCellR2 run.knetl -soda pbmc3k_knetl.soda -zoom 110 -use pca -dims 1:20
iCellR2 cluster.plot -soda pbmc3k_knetl.soda -plot.type knetl

Tutorials · Pseudotime

Pseudotime

Order cells / clusters along trajectories after embedding; graph-DPT, soft branches, and arrow overlays. Same sketch as the Pipeline optional step.

Pseudotime sketch

Tutorial coming soon · R

Pseudotime · iCellR2

run.pseudotime writes Pseudotime / branch_id to cell_data. Use pseudotime.arrows for stream/arrow overlays; run.cgumap / run.cgpca for cluster-guided maps.

library(iCellR2)
obj <- open.soda("project.soda/")
# Tutorial steps for this track will appear here.
# obj <- run.pseudotime(obj, ...)
# pseudotime.arrows(obj, plot.type = "umap", style = "stream")
Tutorial coming soon · Python

Pseudotime · iCellPy

run_pseudotime writes Pseudotime / branch_id into SODA cell_data. Color UMAP by continuous Pseudotime or discrete branch_id.

import icellpy as ic
obj = ic.open_soda("project.soda")
# Tutorial steps for this track will appear here.
# obj = ic.run_pseudotime(obj, ...)
# ic.cluster_plot(obj, reduction="umap", col_by="Pseudotime")
Tutorial coming soon · bash

Pseudotime · bash CLI

run.pseudotime writes Pseudotime / branch_id to cell_data. Use pseudotime.arrows for stream/arrow overlays; run.cgumap / run.cgpca for cluster-guided maps.

# Install CLI once (pick one):
#   iCellR2 install-cli
#   # or: export PATH="/path/to/iCellR2/exec:$PATH"

# Tutorial steps for this track will appear here.
iCellR2 open -soda project.soda

Tutorials · scVDJ

scVDJ

Single-cell V(D)J / immune repertoire paired with RNA — clonotypes, contig QC, and joint visualization in SODA.

Tutorial coming soon · R

scVDJ · iCellR2

Single-cell V(D)J / immune repertoire paired with RNA — clonotypes, contig QC, and joint visualization in SODA.

library(iCellR2)
# Tutorial steps for this track will appear here.
obj <- open.soda("project.soda/")
Tutorial coming soon · Python

scVDJ · iCellPy

Single-cell V(D)J / immune repertoire paired with RNA — clonotypes, contig QC, and joint visualization in SODA.

import icellpy as ic
# Tutorial steps for this track will appear here.
obj = ic.open_soda("project.soda")
Tutorial coming soon · bash

scVDJ · bash CLI

Single-cell V(D)J / immune repertoire paired with RNA — clonotypes, contig QC, and joint visualization in SODA.

# Install CLI once (pick one):
#   iCellR2 install-cli
#   # or: export PATH="/path/to/iCellR2/exec:$PATH"

# Tutorial steps for this track will appear here.
iCellR2 open -soda project.soda

Tutorials · Visium HD

Visium HD

High-definition Visium spatial transcriptomics: load, QC, normalize, and map embeddings back to tissue coordinates.

Tutorial coming soon · R

Visium HD · iCellR2

High-definition Visium spatial transcriptomics: load, QC, normalize, and map embeddings back to tissue coordinates.

library(iCellR2)
# Tutorial steps for this track will appear here.
obj <- open.soda("project.soda/")
Tutorial coming soon · Python

Visium HD · iCellPy

High-definition Visium spatial transcriptomics: load, QC, normalize, and map embeddings back to tissue coordinates.

import icellpy as ic
# Tutorial steps for this track will appear here.
obj = ic.open_soda("project.soda")
Tutorial coming soon · bash

Visium HD · bash CLI

High-definition Visium spatial transcriptomics: load, QC, normalize, and map embeddings back to tissue coordinates.

# Install CLI once (pick one):
#   iCellR2 install-cli
#   # or: export PATH="/path/to/iCellR2/exec:$PATH"

# Tutorial steps for this track will appear here.
iCellR2 open -soda project.soda

Tutorials · ST

ST · spatial transcriptomics

General spatial transcriptomics workflows (spot/bin-level) with SODA modalities reserved for spatial layers.

Tutorial coming soon · R

ST · spatial transcriptomics · iCellR2

General spatial transcriptomics workflows (spot/bin-level) with SODA modalities reserved for spatial layers.

library(iCellR2)
# Tutorial steps for this track will appear here.
obj <- open.soda("project.soda/")
Tutorial coming soon · Python

ST · spatial transcriptomics · iCellPy

General spatial transcriptomics workflows (spot/bin-level) with SODA modalities reserved for spatial layers.

import icellpy as ic
# Tutorial steps for this track will appear here.
obj = ic.open_soda("project.soda")
Tutorial coming soon · bash

ST · spatial transcriptomics · bash CLI

General spatial transcriptomics workflows (spot/bin-level) with SODA modalities reserved for spatial layers.

# Install CLI once (pick one):
#   iCellR2 install-cli
#   # or: export PATH="/path/to/iCellR2/exec:$PATH"

# Tutorial steps for this track will appear here.
iCellR2 open -soda project.soda

Tutorials · HTO demux

HTO demultiplexing

Hashtag oligo (HTO) demultiplexing: hto.anno assigns tags (TSV + QC plot); hto.demux filters and exports per-sample RNA (MTX dirs or H5).

HTO demux · iCellR2

Load a multimodal / TotalSeq library (or an object that already has HTO rows in counts). hto.anno finds Antibody Capture / TotalSeq features, streams those rows only, and annotates cells.

library(iCellR2)

## Option A · classic (annotate → demux / split)
# MyHTOs <- counts[grep("TotalSeq|Hashtag|CMO", rownames(counts)), ]
anno <- hto.anno(
  hto.data = MyHTOs,
  cov.thr = 10,
  assignment.thr = 80,
  out.name = "HTOs_annotated_HSThigh",
  plot = TRUE,
  plot.format = "pdf"
)
# filter + write RNAs__/ (or .h5)
anno2 <- hto.demux(
  anno = anno,
  rna.data = MyRNAs,
  min.percent = 70,
  out.format = "10x_dir"   # or "tenx_h5"
)

## Option B · SODA object (preferred)
obj <- open.soda("project.soda/")
obj <- hto.anno(obj, cov.thr = 3, assignment.thr = 80, plot = TRUE, plot.format = "pdf")
table(obj@cell_data$hto_assignment)

obj <- hto.demux(
  obj,
  min.percent = 70,
  keep.good.only = TRUE,
  subset.cells = TRUE,
  out.format = "tenx_h5"
)
obj <- norm.data(obj)
obj <- run.pca(obj)

hto.anno annotates only (TSV + QC plot). hto.demux filters and writes RNAs_<tag>_<n>/ or optional .h5.

Use R / bash for now

HTO demux · iCellPy

Python hto_anno is not implemented yet. Run demux in iCellR2 or bash, then reopen the same SODA folder.

import icellpy as ic
obj = ic.open_soda("project.soda")
# after: iCellR2 hto.anno -soda project.soda ...
print(obj)  # cell_data carries hto_* columns

HTO demux · bash CLI

iCellR2 hto.anno \
  -soda project.soda \
  -cov.thr 3 \
  -assignment.thr 80 \
  -plot TRUE

iCellR2 hto.demux \
  -soda project.soda \
  -min.percent 70 \
  -keep.good.only TRUE \
  -subset.cells TRUE \
  -out.format tenx_h5

Tutorials · CITE-seq

CITE-seq

Cellular indexing of transcriptomes and epitopes: RNA + ADT protein counts in one SODA project, joint QC, and multimodal reduction.

Tutorial coming soon · R

CITE-seq · iCellR2

Cellular indexing of transcriptomes and epitopes: RNA + ADT protein counts in one SODA project, joint QC, and multimodal reduction.

library(iCellR2)
# Tutorial steps for this track will appear here.
obj <- open.soda("project.soda/")
Tutorial coming soon · Python

CITE-seq · iCellPy

Cellular indexing of transcriptomes and epitopes: RNA + ADT protein counts in one SODA project, joint QC, and multimodal reduction.

import icellpy as ic
# Tutorial steps for this track will appear here.
obj = ic.open_soda("project.soda")
Tutorial coming soon · bash

CITE-seq · bash CLI

Cellular indexing of transcriptomes and epitopes: RNA + ADT protein counts in one SODA project, joint QC, and multimodal reduction.

# Install CLI once (pick one):
#   iCellR2 install-cli
#   # or: export PATH="/path/to/iCellR2/exec:$PATH"

# Tutorial steps for this track will appear here.
iCellR2 open -soda project.soda

Tutorials · scATAC

scATAC

Chromatin accessibility: peak/fragment handling, QC, LSI/PCA-style reduction, and clustering under an ATAC modality.

Tutorial coming soon · R

scATAC · iCellR2

Chromatin accessibility: peak/fragment handling, QC, LSI/PCA-style reduction, and clustering under an ATAC modality.

library(iCellR2)
# Tutorial steps for this track will appear here.
obj <- open.soda("project.soda/")
Tutorial coming soon · Python

scATAC · iCellPy

Chromatin accessibility: peak/fragment handling, QC, LSI/PCA-style reduction, and clustering under an ATAC modality.

import icellpy as ic
# Tutorial steps for this track will appear here.
obj = ic.open_soda("project.soda")
Tutorial coming soon · bash

scATAC · bash CLI

Chromatin accessibility: peak/fragment handling, QC, LSI/PCA-style reduction, and clustering under an ATAC modality.

# Install CLI once (pick one):
#   iCellR2 install-cli
#   # or: export PATH="/path/to/iCellR2/exec:$PATH"

# Tutorial steps for this track will appear here.
iCellR2 open -soda project.soda

Tutorials · Multiomics

Multiomics

Joint RNA + ATAC (or other modalities) in one SODA project — shared cells, per-modality assays, and linked reductions.

Tutorial coming soon · R

Multiomics · iCellR2

Joint RNA + ATAC (or other modalities) in one SODA project — shared cells, per-modality assays, and linked reductions.

library(iCellR2)
# Tutorial steps for this track will appear here.
obj <- open.soda("project.soda/")
Tutorial coming soon · Python

Multiomics · iCellPy

Joint RNA + ATAC (or other modalities) in one SODA project — shared cells, per-modality assays, and linked reductions.

import icellpy as ic
# Tutorial steps for this track will appear here.
obj = ic.open_soda("project.soda")
Tutorial coming soon · bash

Multiomics · bash CLI

Joint RNA + ATAC (or other modalities) in one SODA project — shared cells, per-modality assays, and linked reductions.

# Install CLI once (pick one):
#   iCellR2 install-cli
#   # or: export PATH="/path/to/iCellR2/exec:$PATH"

# Tutorial steps for this track will appear here.
iCellR2 open -soda project.soda