CellRater (gex)

The GEX CellRater scores a cell from its raw gene-count vector: counts over the 19208 genes listed in genes.txt (in that order) are CPM-normalised, log1p-transformed and passed through a small MLP that returns one scalar per cell.

CellRater is a meta-learned per-cell data valuation model for single-cell RNA-seq: it is trained by bilevel optimisation so that its scores, used as per-cell loss weights, improve the held-out loss of a UCE-style proxy model. Scores are raw logits; higher means the cell is more useful to the proxy in the published setting, and the relative ranking within one dataset is what carries meaning. Format: cellrater-npz-v1, cellrater 0.1.0.

Inputs

  • Raw (integer) UMI counts for the 19208 genes in genes.txt, in that order; genes missing from your data count as zero.
  • Gene symbols are matched exactly (case-sensitive).

Files

  • model.npz: weights and constructor config (__config__)
  • genes.txt: ordered gene symbols the model expects, one per line
  • config.json: kind, num_genes and the checkpoint config
  • README.md: this card

Usage

uv sync --extra anndata --extra hub
hf download snap-stanford/cellrater-gex --local-dir models/cellrater-gex
uv run cellrater-prepare --h5ad my_cells.h5ad --genes models/cellrater-gex/genes.txt --out my_cells.dataset
JAX_PLATFORMS=cpu uv run cellrater-score checkpoint=models/cellrater-gex/model.npz \
    dataset_path=my_cells.dataset gene_list_path=models/cellrater-gex/genes.txt output_dir=scores/my_cells

scores/my_cells/all_scores.npy is a (2, N) array: row 0 the corpus row index (your adata.obs order), row 1 the score. See docs/tutorial_score_your_cells.md in the cellrater repository for the full walk-through, including how to write the scores back into adata.obs.

Downloads last month
14
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Collection including snap-stanford/cellrater-gex