Skip to main content

ECA-PP logo: scattered cells organized into a consistent atlas

ECA-PP: Standardized Single-Cell Preprocessing

Give real-world single-cell data a consistent starting point.

ECA-PP version on PyPI Python 3.10 or newer Starts from H5AD data Part of the Ensemble Cell Atlas ecosystem

Why ECA-PP?     What you get     Try it     FAQ     Further reading


ECA-PP prepares published single-cell RNA sequencing datasets for reuse. Starting from an H5AD file, it finds expression counts, standardizes gene names, calculates quality-control measurements, and identifies useful batch and cell-type metadata. You get prepared data and a record of the evidence behind each decision.

ECA-PP belongs to the Ensemble Cell Atlas (ECA) ecosystem. It handles routine preprocessing for ECA-RSI (Recursive Self-Improvement), ECA's automated data governance system, so that system can focus on quality assessment, annotation, and iterative refinement. You can also use ECA-PP independently in your own pipeline.


🔬 Why standardize before analysis?

Public single-cell data reflects the choices of many different authors. Expression matrices arrive as text tables, sparse matrix files, Seurat objects, or H5AD files, often with metadata in separate supplements. Converting them into one format solves only part of the problem.

Inside an H5AD file, expression values may be raw, normalized, or scaled. Gene names may mix old symbols and Ensembl IDs. Sample and cell-type columns may use unfamiliar names, duplicate one another, or contain missing values. Even existing QC measurements may have been calculated using different gene sets.

ECA-PP gives these recurring problems a shared treatment:

  • Consistent preprocessing across studies. Counts checks, gene mapping, and QC use a common implementation. QC and normalized expression are calculated on the same final gene set.

  • Metadata choices supported by data. Small integration trials test batch candidates for improved mixing and preservation of cell-type structure. Technical and donor factors take priority over biological conditions.

  • Automation you can inspect. Model suggestions pass programmatic checks; built-in rules keep column identification moving when a model is unavailable. Decisions, changes, and unresolved questions are recorded for review.


📦 What you get

  • A standardized dataset. An H5AD with counts, normalized expression, standardized gene names, QC measurements, and preserved author metadata.

  • Guidance for downstream analysis. Proposed batch and existing cell-type columns, evidence for each selection, and an assessment of whether batch correction is needed.

  • A record of what happened. Each step writes a result.json describing its outcome, changes, and issues that need attention. Your source file stays unchanged.


Where it fits

General-purpose agents can usually download files, unpack archives, and script conversions into .h5ad, the AnnData format used by Scanpy. ECA-PP starts at H5AD, where decisions about counts, gene identity, QC, and batch structure need domain-specific standards applied consistently across studies.

Stage Responsibility
Upstream tools or agents Gather published files and convert them into H5AD.
ECA-PP Standardize the data and evaluate metadata using shared rules and recorded evidence.
ECA-RSI Coordinate subsequent quality review, annotation, and iterative refinement.

ECA-PP currently prepares data and evaluates metadata. It does not assign new biological cell-type labels, filter individual low-quality cells or doublets, or produce a final integrated atlas.

Follow the main path below; the lower branches show required review, dataset rejection, and the trial loop used to evaluate metadata. Click the diagram for an interactive version with search, zoom, and guided views.

ECA-PP workflow: input H5AD, standardization, prepared data, metadata identification with integration trials, recorded decisions, and handoff to ECA-RSI. Unresolved standardization choices need review; unsuitable inputs are rejected.


🚀 Try it

1. Install

Use Python 3.10 or newer, preferably in a dedicated environment. ECA-PP runs on CPUs.

pip install "eca-pp[probe,openai]==0.5.1"

This also installs stancounts and stangene, the counts-recovery and gene-mapping dependencies. To work on ECA-PP itself, clone this repository and use pip install ".[probe,openai]" instead.

2. Standardize your dataset

Replace your-data.h5ad with your input file:

eca-pp-standardize your-data.h5ad -o results/standardize

Open results/standardize/result.json to check the outcome. A successful run produces standardized.h5ad. If a required choice is unresolved, such as the species, the report explains what needs clarification before you continue.

Dataset size checks and gene filtering

The default checks require at least 100 cells and 5,000 detected genes across the whole dataset. A gene is detected if it has a nonzero count in at least one cell. This is not a requirement for each cell to express 5,000 genes.

By default, features that cannot be mapped to a canonical gene are removed from the output. Use --keep-unmapped to retain them. The dataset-level gene threshold is checked again after gene mapping and filtering.

See the tutorial's options for adjusting size checks or specifying the species and counts layer.

3. Identify batch and cell-type columns

After successful standardization, run:

eca-pp-identify-columns results/standardize/standardized.h5ad \
  -o results/columns

For AI-assisted decisions, set ARK_API_KEY in your environment before running this command. The default uses Doubao Turbo through the OpenAI Agents SDK. Without model credentials, ECA-PP uses built-in rules and integration trials.

Read results/columns/result.json for the selected columns and supporting evidence. For example, ECA-PP may identify a sequencing channel as the batch but conclude that the cells are already sufficiently mixed and correction is unnecessary.

Find the output files
File Contents
results/standardize/standardized.h5ad Prepared expression data, gene identifiers, and QC measurements.
results/standardize/result.json Input checks, counts source, species, gene changes, and review notes.
results/columns/result.json Selected metadata, correction assessment, decisions, and trial results.
results/columns/batch.tsv Batch labels when the selected grouping is derived from barcodes or multiple columns; created only when needed.

FAQ

Does ECA-PP change my original data?

The source file stays unchanged. ECA-PP writes a separate dataset, preserves author metadata, and backs up fields it replaces. Gene mapping and filtering changes are recorded. Standardization may reject a whole dataset that fails its checks, but does not remove individual cells from an accepted dataset.

What does an empty batch or cell-type result mean?

null means no suitable column was selected. This can be a valid outcome when evidence is insufficient. A selected batch with correction: "unnecessary" means the evidence did not support correcting it. Neither conclusion should be confused with an execution error; check the outcome and reasons in result.json.

Do I need an AI model?

Standardization runs locally by default; optional AI assistance is available for unresolved species inference. Column identification uses a model when configured and falls back to built-in rules when it is unavailable. See the model configuration guide for backend and model choices.

Can I recover counts from normalized data?

ECA-PP uses stancounts to recover counts from supported transformed inputs when possible. Recovery depends on the data; unsupported or ambiguous cases are reported rather than silently treated as raw counts.


📖 Further reading

For users: the hands-on tutorial walks through a real mouse dataset, result interpretation, common options, model setup, and reruns. The tutorial is currently in Chinese. Each command also provides --help.

For developers: the standardization specification and column-identification specification describe methods, interfaces, and tests. Download the interactive architecture diagram to open it in a browser.

Continue in the ECA ecosystem: ECA-RSI coordinates downstream analysis, including sample-level QC and annotation with OSP.

For questions, unexpected results, or feature requests, open an issue.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

eca_pp-0.5.1.tar.gz (88.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

eca_pp-0.5.1-py3-none-any.whl (76.4 kB view details)

Uploaded Python 3

File details

Details for the file eca_pp-0.5.1.tar.gz.

File metadata

  • Download URL: eca_pp-0.5.1.tar.gz
  • Upload date:
  • Size: 88.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.1

File hashes

Hashes for eca_pp-0.5.1.tar.gz
Algorithm Hash digest
SHA256 2fab3ffd764b3d997ac18ba167d06f5dd1bcb7c0881f3686d86e06638472ebc5
MD5 8204ffe4027ef704736ec67406a0c4eb
BLAKE2b-256 f049a1533ef30c172b28aa04698459087ea2f4df76968ccc23a183b85fde7d74

See more details on using hashes here.

File details

Details for the file eca_pp-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: eca_pp-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 76.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.1

File hashes

Hashes for eca_pp-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a672ea127c0f7765a5db20ad20348b8d3a5a03f13eeaa27a121eab9d5ade26b6
MD5 e209f4ed05fd07bd88a6853b7a51f6c0
BLAKE2b-256 bf68bc88b16dc3fa70db8b12f4d67d99a89625bed4e34f038bd28cf3100f6a4a

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.5.1 This release

2 files

0.5.0

2 files

0.4.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page