Skip to main content

scimappro

Documentation: https://pro.scimap.xyz

scimappro is a Python toolkit for spatial single-cell analysis workflows. It provides preprocessing, analysis, and plotting utilities for AnnData objects, large .h5ad datasets, and scverse SpatialData stores.

It is the professional edition of SCIMAP and a deliberate API break from it — see the migration guide.

Requirements

Python 3.12, 3.13, or 3.14.

Installation

pip install scimappro

The package runs immediately without a licence, in Starter mode: every function, on datasets up to 100,000 cells, single-threaded, with watermarked plots. Larger datasets, out-of-core streaming, SpatialData input, and parallel execution need a subscription — from $149/year for academics. See Pricing and Licensing.

Accounts, licences and devices live on the BioCognia platform at account.biocognia.com. Connect a device with a short code you approve there:

scimappro license activate
# Open https://account.biocognia.com/activate and enter BIOC-7F3K-9Q2M
# Waiting for approval (Ctrl-C to stop)...
scimappro license status

Add --trial for a 30-day trial. On an HPC cluster, run scimappro license activate --cluster --name O2 once from a login node. On an air-gapped machine, use an offline licence file — no step needs that machine to reach the internet:

scimappro license fingerprint --out device.json
# upload at https://account.biocognia.com, download device.bioc
scimappro license install device.bioc

scimappro reports anonymous usage data — which functions are called, how long they take, dataset sizes as ranges, and scrubbed error signatures. It never sends your data, file names, paths, sample names or results; see Usage reporting for every field, and scimappro telemetry show to read what is queued on your own machine before it goes. One command turns it off:

scimappro telemetry status   # what is being sent
scimappro telemetry off      # nothing at all

Optional extras:

pip install "scimappro[roi]"   # shapely, for hl.addExternalROI

Development

Dependencies are managed with uv and pinned in uv.lock.

SCIMAPPRO_PURE_PYTHON=1 uv sync --all-extras   # create the environment
uv run pytest                                  # run the test suite
uv sync --all-extras -p 3.12                   # or 3.13 / 3.14
uv lock --upgrade                              # re-resolve every dependency

SCIMAPPRO_PURE_PYTHON=1 skips Cython compilation. Released wheels are compiled; a development install does not need to be.

The test suite sets SCIMAPPRO_TESTING=1, which stops usage reporting: a maintainer's own runs and CI would otherwise be the loudest installations in the product data. Three generated files have --check modes that CI runs, and that need regenerating whenever the code they read changes:

uv run python tools/syncTelemetryWords.py      # the error-template vocabulary
uv run python tools/syncTelemetryVectors.py    # the allowlist the Worker validates against
uv run python tools/syncTelemetryDocs.py       # the field table in website/content/docs/telemetry.mdx

Documentation

The site is a Next.js app under website/, so it needs Node as well as Python. Neither toolchain is pulled in by pip install scimappro:

uv sync --group docs      # griffe, which reads the docstrings
cd website && npm ci      # Next, Fumadocs
npm run dev               # http://localhost:3000
npm run build             # what CI runs

Every API page and every tutorial page is generated on each build — from the docstrings and the notebooks respectively — and none of them is committed. uv run python tools/syncDocs.py --check validates the inputs without writing.

.github/workflows/docs.yml deploys to https://pro.scimap.xyz on every push to main. See website/content/docs/contribute.mdx for the docstring conventions the API reference is generated from, and website/README.md for the layout of the site itself.

If the checkout lives on a cloud-synced folder (Dropbox, OneDrive), sync locks can break venv writes. Build the environment outside the synced tree instead:

UV_PROJECT_ENVIRONMENT=~/.venvs/scimappro uv sync --all-extras

Modules

Eight namespaces, split by what a function reads rather than by what it is for — anything that reads a coordinate is sp, even when the question it answers is a single-cell one.

  • scimappro.io: getting data in and out — vendor readers, readMcmicro, format conversion, storage, export.
  • scimappro.pp: preprocessing shared by imaging and transcriptomics — qcMetrics, rescale, normalizeTotal, pca, integrate.
  • scimappro.sc: what a cell is — phenotype, classify.
  • scimappro.sp: tissue architecture — the spatial graph, neighbourhood counts and motifs, distance, co-occurrence, proximity, autocorrelation, ligand–receptor scoring.
  • scimappro.tl: what works equally on cells, domains or samples — cluster, umap, foldChange, pseudobulk, rename — and the statistical framework the rest of the package feeds: compareGroups, associationTest, summarizeSamples, all testing at the unit of replication rather than across cells.
  • scimappro.cl: clinical association, linking those features to outcomes.
  • scimappro.pl: analytical plots.
  • scimappro.hl: helpers for external tools such as OMERO.
  • scimappro.license: connect this device to a licence, inspect it, and release it.
  • scimappro.telemetry: see, change or switch off usage reporting.

Every function in these modules accepts AnnData, .h5ad, SpatialData, and .zarr inputs through its data argument.

Example

import scimappro as sm

# Preprocessing
# sm.pp.rescale(...)

# Analysis
# sm.sp.spatialDistance(...)

# Plotting
# sm.pl.heatmap(...)

Coding agents

Tell SCIMAP Pro what you want to learn biologically. The agent finds the right analysis, explains the plan, and runs the right functions for you -- you do not need to know any function names.

pip install "scimappro[ai]"
scimappro ai init

That configures every coding agent on the machine -- Claude Code, Codex CLI, Cursor, VS Code Copilot, Gemini CLI, Claude Desktop -- to use scimappro's MCP server. Then restart your agent and ask it something real:

Do T cells sit closer to tumour cells than expected in my sections?

It inspects the dataset, reads the spatial-analysis skill, searches 128 functions by intent, tells you what the result could and could not support as a claim, runs it, and reports exactly what it wrote. Everything runs locally; your data never leaves the process. scimappro ai doctor checks it is working.

The same description of the package is readable from Python, with no agent involved:

sm.ai.search("which cell types sit next to which")
sm.ai.describe("sp.spatialDistance")["experimental_unit"]

See website/content/docs/ai.mdx for the tools, the four scope states, and the nine scientific skills.

SpatialData support

Every public function takes its cell table as the first argument, named data. It accepts an AnnData, a path to an .h5ad file, a scverse SpatialData, or a path to a .zarr SpatialData store:

import scimappro as sm
import spatialdata as sd

sdata = sd.read_zarr("sample.zarr")

# In memory: the returned SpatialData carries the result in its table.
sdata = sm.sp.spatialDistance(sdata, sdataTable="table")
sdata.tables["table"].uns["spatial_distance"]

# On disk: rewrite just that table inside the store it came from.
sm.sp.spatialDistance(sdata, sdataTable="table", outputDir="sample.zarr")
  • sdataTable names the table to work on. Leave it out when the store has exactly one table; with several, scimappro raises a ValueError listing them.
  • Functions read coordinates from obs['X_centroid']/obs['Y_centroid'] and group cells by obs['imageid']. When a table lacks those columns, scimappro derives them from the elements the table annotates — imageid from the region-key column and the centroids from the annotated shapes, points, or labels — and stores them on the table, preserving row order.
  • With outputDir=None the updated SpatialData is returned, with its table modified in memory. Supplying outputDir writes <inputFilename>.zarr there and returns None; if outputDir points at the store the object was read from, only the table is rewritten in place.
  • streamData=True works for a .zarr store as it does for an .h5ad: its table is read and written where it lies. Passing it alongside an in-memory SpatialData warns and continues in memory, since its tables are already loaded.

Functions that build a new table (sc.classify, tl.rename, pp.dropFeatures, hl.addExternalROI) replace the table inside the SpatialData you passed and return that container. Keep the table's region_key and instance_key obs columns intact, or the write-back will not validate.

Converting an existing cell table

io.toSpatialData turns a scimap-style AnnData (or .h5ad) into a SpatialData: one circles element per image holding that image's cell centroids, with the whole table attached to those elements.

sdata = sm.io.toSpatialData(adata)                      # radius from obs['Area']
sm.io.toSpatialData(adata, outputDir="converted")       # writes converted/<name>.zarr

Every obs column is preserved, so nothing is lost even though the geometry is two-dimensional. radius takes an obs column name or a number when you do not want sqrt(Area / pi); CellID is generated as 1..n when the table has no instance-key column; and image ids that are not valid element names are sanitised into a separate region column, leaving imageid untouched.

License

SCIMAP Pro End User Licence Agreement 1.0 (LicenseRef-Scimappro-EULA-1.0) — see LICENSE.

Commercial software, free to install and use in Starter mode. You own your results and any analysis code you write against the public API, and you may publish or commercialize those freely. Redistribution and licence sharing are not permitted.

Versions 0.1.0 and 0.1.1 were released under the Scimappro Academic License 1.0 and remain available under those terms.

The community edition, SCIMAP, is MIT-licensed and stays free. Sales: sales@scimap.xyz. Support: support@scimap.xyz.

Metadata

Release files for scimappro 0.1.24

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for scimappro 0.1.24
File Actions
scimappro-0.1.24-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details for scimappro-0.1.24-cp314-cp314-win_amd64.whl
scimappro-0.1.24-cp314-cp314-macosx_12_0_arm64.whl CPython 3.14 CPython 3.14 macOS 12.0+ ARM64 Details for scimappro-0.1.24-cp314-cp314-macosx_12_0_arm64.whl
scimappro-0.1.24-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details for scimappro-0.1.24-cp313-cp313-win_amd64.whl
scimappro-0.1.24-cp313-cp313-macosx_12_0_arm64.whl CPython 3.13 CPython 3.13 macOS 12.0+ ARM64 Details for scimappro-0.1.24-cp313-cp313-macosx_12_0_arm64.whl
scimappro-0.1.24-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for scimappro-0.1.24-cp312-cp312-win_amd64.whl
scimappro-0.1.24-cp312-cp312-macosx_12_0_arm64.whl CPython 3.12 CPython 3.12 macOS 12.0+ ARM64 Details for scimappro-0.1.24-cp312-cp312-macosx_12_0_arm64.whl

Total release size: 99.6 MB

Release files / scimappro-0.1.24-cp314-cp314-win_amd64.whl

Download URL scimappro-0.1.24-cp314-cp314-win_amd64.whl
Size 15.5 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
c957f211cf9378ee4805486fc1a9b9012b919a583f0c28a75d1e4b1fcc84a887
BLAKE2b-256 checksum
How to use checksums
6941d4ea4d07e84a5c93660f331f5ab96634b1a06a95689244ff73594849813e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.14

Release files / scimappro-0.1.24-cp314-cp314-macosx_12_0_arm64.whl

Download URL scimappro-0.1.24-cp314-cp314-macosx_12_0_arm64.whl
Size 17.9 MB
Tags CPython 3.14 macOS 12.0+ ARM64
SHA-256 checksum
How to use checksums
a2a91f0c6ac55f964d061df72a6ed2cdd14338988867c541cc9e14e34509c404
BLAKE2b-256 checksum
How to use checksums
f98156adee2e9e4f24ac0b78229a0dcf73a3476ab21c1f0f8af6da29c1e47542
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.14

Release files / scimappro-0.1.24-cp313-cp313-win_amd64.whl

Download URL scimappro-0.1.24-cp313-cp313-win_amd64.whl
Size 15.2 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
33741bf699f9a46c2ce41b03e5e17a88d76488e4817245159794c8e250ebbf6c
BLAKE2b-256 checksum
How to use checksums
657003b86973495cc2e285b8c2d49cbabb34a1e40779559e187b0da7ff87fa70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.14

Release files / scimappro-0.1.24-cp313-cp313-macosx_12_0_arm64.whl

Download URL scimappro-0.1.24-cp313-cp313-macosx_12_0_arm64.whl
Size 17.8 MB
Tags CPython 3.13 macOS 12.0+ ARM64
SHA-256 checksum
How to use checksums
e85a36a28bec8be23aadd0f030d87097a054d84d57e1212951faa1212eee8b4c
BLAKE2b-256 checksum
How to use checksums
626a328345da4870d5ef460644e1dd6ce267f8c643643bf38532a01b31225c5b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.14

Release files / scimappro-0.1.24-cp312-cp312-win_amd64.whl

Download URL scimappro-0.1.24-cp312-cp312-win_amd64.whl
Size 15.3 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
b092d8cee3e79b5e3e1a58ec9430aed444ac591befdbc6af013fba5679a64b03
BLAKE2b-256 checksum
How to use checksums
8d4614cfa58921056e148be96a90472afbbe312715163a47d6ff4a143150b862
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.14

Release files / scimappro-0.1.24-cp312-cp312-macosx_12_0_arm64.whl

Download URL scimappro-0.1.24-cp312-cp312-macosx_12_0_arm64.whl
Size 17.9 MB
Tags CPython 3.12 macOS 12.0+ ARM64
SHA-256 checksum
How to use checksums
6b2496ffd543fbef8fa8e8f7e9ae2d72c5fcf37145e75a9113293879d898493e
BLAKE2b-256 checksum
How to use checksums
1ad59d35779e8735326400f6faf536b6b89c9bd940e41dbf07b518e0022f5f69
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.14

Security for scimappro 0.1.24

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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