Skip to main content

zmip — zoom-in pipeline

ZMIP: Zoom-In Pipeline

Refine cell populations within each lineage after multi-sample integration.

Why zoom in? · Get started · Results · Documentation

ZMIP takes an annotated dataset from MSP, analyzes each lineage separately, and refines cell-type labels using marker genes and quality evidence. It writes updated annotations, records removed or reassigned cells, and produces reports for review.

Why zoom in?

Differences between major cell types can dominate a global analysis. Recomputing features, neighbors, and clusters within a lineage helps examine its finer populations. ZMIP uses this local view to refine labels and review remaining quality concerns. When there are too few cells for stable subgroup analysis, small lineages retain their existing annotations.

How it works

An AI assistant groups cells into lineages using the existing labels and embedding. Each selected lineage is re-embedded independently, then reviewed using marker genes, quality measurements, and signals from other lineages. The program checks the submitted decisions before merging the results back into the global dataset.

flowchart LR
    A[MSP annotated dataset] --> B[Plan lineages]
    B --> C[Re-embed each lineage]
    C --> D[Review labels and quality]
    D --> E[Merge annotations and reports]
    B -->|Small lineages: keep labels| E

What you get

The output includes a refined H5AD, a global HTML report linking to detailed lineage reports, and cell-level records of removals and reassignments. Original MSP annotations remain available for comparison; retained cells keep their input expression, counts, and global embedding.

Get started

Start with MSP's annotated.h5ad, including its annotations, counts, batch metadata, graph, and UMAP. ZMIP currently uses a source-based installation; follow the installation guide and activate the resulting environment. Set your Volcengine Ark API key, then run:

export ARK_API_KEY="YOUR_ARK_API_KEY"
HARNESS=openai python -m zmip msp_out/annotated.h5ad --outdir zmip_out

Read your results

After a successful run, open zmip_out/report.html in your browser. Check the lineage plan, follow the links to review local labels and supporting genes, then inspect removed and reassigned populations. To share all reports, copy the output directory with its subdirectories so the links still work.

File Contents
report.html Global summary and links to lineage reports
annotated_zmip.h5ad Retained cells with refined annotations
zmip_removed.csv Removed cells and their recorded sources
zmip_reassigned.csv Cells assigned to another lineage's coarse label
<lineage>/report.html Local analysis, evidence, and annotation decisions

Does ZMIP change my data?

Your input file stays unchanged. Cells removed by local filtering or the annotation agent are excluded from the final H5AD. Reassigned cells receive new labels; they are not re-embedded in the destination lineage during this run. Global plots retain MSP's embedding. See the input and output reference for fields and details.

Can I resume a run?

Repeat the same command to reuse completed, verified stages. Agent settings such as --max-turns or --model may differ between runs; only unfinished lineages use the new values. If you change the input, analysis settings, or runtime, use a new output directory to keep both analyses, or add --force to recompute the plan and all selected lineages. To rebuild only the global report, run:

python -m zmip.report zmip_out

Validation

An isolated installation passed 99 tests, and an OpenAI/Doubao run completed the workflow on 256 Fu2022 cells, including independent data checks and resume without model calls. This checks the workflow at small scale; full-dataset performance and biological accuracy remain unvalidated. See validation records and remaining checks.

Further reading

ZMIP follows OSP for sample-level review and MSP for integration within the ECA-RSI workflow. See inputs and outputs for data conventions, runtime options for installation and configuration, and GitHub issues for questions or problems. ZMIP uses the MIT license.

Download files

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

Source Distribution

zmip-0.2.0.tar.gz (56.8 kB view details)

Uploaded Source

Built Distribution

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

zmip-0.2.0-py3-none-any.whl (49.2 kB view details)

Uploaded Python 3

File details

Details for the file zmip-0.2.0.tar.gz.

File metadata

  • Download URL: zmip-0.2.0.tar.gz
  • Upload date:
  • Size: 56.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.9

File hashes

Hashes for zmip-0.2.0.tar.gz
Algorithm Hash digest
SHA256 040f5acf9d4d9d3b4d521077634a5d9048eb6e296417bb8802dcb2053078267b
MD5 57272d74a128fe79bbd9fe624a25650b
BLAKE2b-256 b36d4194b574fc2b99aaa78713079a3a5cdd5b3e29bf626ac54ab521764100d0

See more details on using hashes here.

File details

Details for the file zmip-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: zmip-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 49.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.9

File hashes

Hashes for zmip-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6e3fce44dd554e8905a5bb4477733923900e1fdfe7cc032fd185e5ed2ea7fa1a
MD5 d7098af85222bef707f682da201c4535
BLAKE2b-256 b797ebca941cb8b7a7c83d9890ad3042624c859c007815bd51cba646574551b1

See more details on using hashes here.

Release history Release notifications | RSS feed

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

This release

0.2.0 This release

2 files

0.1.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