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.13 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 supported install. While no final release exists, pip and uv both fall back to the newest alpha pre-release, so a plain install works:

    uv add mantispy  # in a uv project; `uv init` creates one
    pip install mantispy  # or with pip
    
  2. Install the latest development version:

    uv add git+https://github.com/scverse/mantispy  # in a uv project
    pip install git+https://github.com/scverse/mantispy.git  # or with pip
    

    Cloning the repository and running uv sync is for contributors, see the contributing guide.

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

uv add 'mantispy[spatial]'  # in a uv project
pip install 'mantispy[spatial]'  # or with pip

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.0a5

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.0a5
File Size Uploaded Provenance Actions
mantispy-0.1.0a5.tar.gz 733.5 kB With provenance Details for mantispy-0.1.0a5.tar.gz

Built distribution (wheel)

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

Total release size: 1.4 MB

Release files / mantispy-0.1.0a5.tar.gz

Download URL mantispy-0.1.0a5.tar.gz
Size 733.5 kB
Tags Source
SHA-256 checksum
How to use checksums
3b6fc52a0ba3395c227f5573c2a2af961f4f0cb91503b6017557915df45407ec
BLAKE2b-256 checksum
How to use checksums
ac1b478123125970080b10692689390fb90ba9c4b7cb4accd4d1c4ee42668778
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 24, 2026.

Transparency log

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

Download URL mantispy-0.1.0a5-py3-none-any.whl
Size 627.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a47484cb8c705240df480d2d2cd917477709b9d89fd6d80ff2005143d3d7c2a6
BLAKE2b-256 checksum
How to use checksums
3f63775db1e9f36f0bfbb80ccc991685bc06e055ff86edb9010ca2f5cd9dada8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 24, 2026.

Transparency log

Security for mantispy 0.1.0a5

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.0a5.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 24, 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