Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

mantispy

Tests Build Coverage Documentation PyPI Python Version License pre-commit

mantispy brings Cell Painting and other image-based profiling data into the scverse ecosystem, from reading what a pipeline wrote through quality control, normalization and batch correction to evaluating what survived. It is for biologists and computational scientists who analyze Cell Painting or similar image-based screens in Python. mantispy is in alpha: the API may still change.

import mantispy as mt
import scanpy as sc

cells = mt.io.read_profiles("analysis/", platemap="platemap.csv")  # an ExportToSpreadsheet directory, or profile files
mt.pp.annotate_controls(cells)  # assumes the negative control is labeled "DMSO"; see negcon= for other names
mt.pp.image_qc(cells)  # which fields were out of focus
mt.pp.normalize(cells, by="Metadata_Plate", reference="negcon")  # robust MAD against the negative controls
wells = mt.tl.aggregate(cells)  # cells -> wells

mt.pp.feature_select(wells)  # flags features in var["selected"]
wells = mt.pp.subset_features(wells)  # keeps only those
sc.pp.pca(wells, n_comps=20)  # hit calling reads distances on a PCA, as the covariance of all features is singular
mt.tl.hit_calling(wells, use_rep="X_pca")  # which perturbations moved
mt.pl.hits(wells)

pp prepares, tl computes, pl plots, metrics evaluates a correction, io reads and writes, and ds downloads public screens. Everything operates on an AnnData, so scanpy's PCA, neighbors, UMAP and Leiden work on the same object. io.read_plate reads the images behind the profiles as SpatialData.

To start, From a CellProfiler run shows how to read a screen and Hits, effects and cell loss how to call hits on it. Neither needs your own data, and mt.ds.bbbc021() downloads a public screen.

Set mt.settings.verbosity = 2 when you first run your own screen. Several steps drop features or wells, and they log it at that level.

Please refer to the documentation, in particular the API documentation.

Installation

You need to have Python 3.12 or newer installed on your system. If you don't have Python installed, we recommend installing uv.

We recommend managing dependencies in project-specific virtual environments to avoid dependency conflicts. This is most convenient using package managers such as uv. Choose from the options below to install mantispy:

  1. Install the latest release from PyPI. The current release is an alpha pre-release, so pip needs --pre:

    pip install --pre mantispy  # (or `uv add --prerelease allow mantispy`)
    
  2. Install the latest development version:

    pip install git+https://github.com/scverse/mantispy.git  # (or `uv add`)
    

Optional extras add features: spatial (reading images as SpatialData), map (copairs retrieval metrics), harmony and integration (batch correction and its scoring), and interactive (plotly plots). Install the ones you need, for example:

pip install 'mantispy[spatial,map]'

The installation guide says what each extra pulls in.

Release notes

See the releases page.

Contact

For questions and help requests, you can reach out in the scverse discourse. If you found a bug, please use the issue tracker.

License

mantispy is released under the BSD 3-Clause license.

Citation

A preprint describing mantispy is in preparation. Until then, cite the repository directly.

scverse

mantispy is part of the scverse® project (website, governance) and is fiscally sponsored by NumFOCUS. If you like scverse® and want to support our mission, please consider making a tax-deductible donation to help the project pay for developer time, professional services, travel, workshops, and a variety of other needs.

Metadata

Release files for mantispy 0.1.0a3

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

Source distribution (sdist)

Source distribution for mantispy 0.1.0a3
File Size Uploaded Provenance Actions
mantispy-0.1.0a3.tar.gz 418.8 kB With provenance Details for mantispy-0.1.0a3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mantispy 0.1.0a3
File Interpreter ABI Platform Actions
mantispy-0.1.0a3-py3-none-any.whl Python 3 none any Details for mantispy-0.1.0a3-py3-none-any.whl

Total release size: 880.2 kB

Release files / mantispy-0.1.0a3.tar.gz

Download URL mantispy-0.1.0a3.tar.gz
Size 418.8 kB
Tags Source
SHA-256 checksum
How to use checksums
79dfdf473e3de15a63c128847393d1e5a4bab223aa4453f00961ee1428c66c82
BLAKE2b-256 checksum
How to use checksums
0e4c4ef91e3a265d7dd0e8a9d5b1b67d68e46d0da1637446d3bd66137ddc4d9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.

Transparency log

Release files / mantispy-0.1.0a3-py3-none-any.whl

Download URL mantispy-0.1.0a3-py3-none-any.whl
Size 461.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bfcc533ecbe9091c7bcab40bcc1b0f1c241cd688b1333a64c09229bed93eed49
BLAKE2b-256 checksum
How to use checksums
11897e22624003616a7fe2aef19fd81ca43a25f1062d8998dd850e29837e4cad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.

Transparency log

Security for mantispy 0.1.0a3

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mantispy-0.1.0a3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.

Transparency log

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