This release is a pre-release and may not be stable for production use.
Scarf
[!IMPORTANT] Scarf 1.0 is coming soon. Install the
release candidate with
uv pip install --prerelease allow "scarf[extra]". The current stable release on PyPI is0.32.3.
Scarf is a Python framework for analysing single-cell RNA, ATAC, protein, and multi-omic data, from a few thousand cells to tens of millions.
| Problem | How Scarf solves it | What you get |
|---|---|---|
| Your dataset is larger than RAM | Out-of-core algorithms, and neighbour search streams from cell-major and gene-major layouts, inside a memory budget you set | No subsampling, so rare populations survive, benchmarked to 10M cells |
| The data is stored remotely and requires downloading | Fetches only the chunks an operation touches, and writes results to a store you own | Start analysing immediately, with one authoritative copy |
| A single parameter change costs hours of computation | Each step is fingerprinted by its settings and inputs, so reuse is by content, not by layer name | Only what changed recomputes, and the old version stays for comparison |
| Sub-population analysis leaves scattered copies that nobody can trace back | Subsets are masks in one file, and every result carries the cells and parameters behind it | A year later, a result still explains itself |
Install
Python 3.12+.
uv venv --python 3.12
uv pip install --python .venv "scarf[extra]"
Detailed installation instructions here
Quick start
import scarf
ds = scarf.DataStore(
"s3://bucket/10M_cells.zarr", # also gs://, hf://, or a local path
)
ds.pipeline.run() # convenience: QC → HVGs → PCA → graph → UMAP → clustering → markers
ds.plots.embedding(
layout_key="RNA_UMAP",
color_by="RNA_clusters",
)
Read the scRNA-seq tutorial for a granular workflow, or remote stores for cloud setups.
Documentation
Read workflow vignettes and API references on Read The Docs 📖
AI-assisted and autonomous workflows should start with Analysis with AI agents.
Scarf's capabilities
| Area | Methods |
|---|---|
| Modalities | scRNA-seq, scATAC-seq, CITE-seq, matched multi-omics |
| Core workflow | Quality control, feature selection, normalization, PCA and LSI, KNN graph, UMAP, densMAP, t-SNE, Leiden, Paris, marker search |
| Integration | Harmony, partial PCA, shared and weighted nearest neighbours, integration metrics |
| Mapping | Symphony-style reference mapping, label transfer, projection diagnostics |
| Trajectory | Population Balance Analysis pseudotime, expression dynamics and modules, multi-sink fate probabilities |
| Also included | Cell-cycle scoring, gene-set activity, graph-diffusion imputation, doublet scores, HTO demultiplexing, TopACeDo downsampling, pseudobulk export |
Citation
Dhapola et al. Scarf enables a highly memory-efficient analysis of large-scale single-cell genomics data. Nature Communications 13, 4616 (2022).
Support
Scarf is open source software released under the BSD 3-Clause License and maintained by Nygen.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scarf-1.0.0rc3.tar.gz.
File metadata
- Download URL: scarf-1.0.0rc3.tar.gz
- Upload date:
- Size: 961.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9688529be85f1363008e6b7e921706d1aa9bf2ec54d985813514447b2612686
|
|
| MD5 |
b1e2217ee0e40952572d2acc3b3c1cf7
|
|
| BLAKE2b-256 |
cbc8f3630fc6fe50eace2f37a9a876c5c27b3c0270feea29de263bfea2134a97
|
Provenance
The following attestation bundles were made for scarf-1.0.0rc3.tar.gz:
Publisher:
publish.yml on NygenAnalytics/scarf
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scarf-1.0.0rc3.tar.gz -
Subject digest:
b9688529be85f1363008e6b7e921706d1aa9bf2ec54d985813514447b2612686 - Sigstore transparency entry: 2340700285
- Sigstore integration time:
-
Permalink:
NygenAnalytics/scarf@9ccab5fe4e9a999cc6093874267e81355011611f -
Branch / Tag:
refs/tags/1.0.0rc3 - Owner: https://github.com/NygenAnalytics
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9ccab5fe4e9a999cc6093874267e81355011611f -
Trigger Event:
release
-
Statement type:
File details
Details for the file scarf-1.0.0rc3-py3-none-any.whl.
File metadata
- Download URL: scarf-1.0.0rc3-py3-none-any.whl
- Upload date:
- Size: 821.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ff6d9d01182b5a3657e02ea10a1a4916102b2f0c530b58b1f479e1c2f608745
|
|
| MD5 |
29b8752bff2a7109ef03e15051ddae7d
|
|
| BLAKE2b-256 |
8178cc8549afdcf84cea0e31a06598bfa1aebd513e08bd9f8d2acf337c5efc6a
|
Provenance
The following attestation bundles were made for scarf-1.0.0rc3-py3-none-any.whl:
Publisher:
publish.yml on NygenAnalytics/scarf
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scarf-1.0.0rc3-py3-none-any.whl -
Subject digest:
5ff6d9d01182b5a3657e02ea10a1a4916102b2f0c530b58b1f479e1c2f608745 - Sigstore transparency entry: 2340700288
- Sigstore integration time:
-
Permalink:
NygenAnalytics/scarf@9ccab5fe4e9a999cc6093874267e81355011611f -
Branch / Tag:
refs/tags/1.0.0rc3 - Owner: https://github.com/NygenAnalytics
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9ccab5fe4e9a999cc6093874267e81355011611f -
Trigger Event:
release
-
Statement type: