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`)
    

Reading images needs the spatial extra:

pip install 'mantispy[spatial]'

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

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

Built distribution (wheel)

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

Total release size: 872.3 kB

Release files / mantispy-0.1.0a2.tar.gz

Download URL mantispy-0.1.0a2.tar.gz
Size 414.7 kB
Tags Source
SHA-256 checksum
How to use checksums
43ec750ab7afe021483c976bfad3c5c5d6414fe000d773dbe369be64c4ee57f3
BLAKE2b-256 checksum
How to use checksums
9788451185c1d9c618df69f31fbca78d4b5969476825c05223047383098b58b3
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 Oct 29, 2026.

Transparency log

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

Download URL mantispy-0.1.0a2-py3-none-any.whl
Size 457.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f0c1dc8595dcfd3867619063bcfd229e30be6f420e69cbabe9d3a0da556f1a68
BLAKE2b-256 checksum
How to use checksums
11c504fe77f1e8ae2c17409bc696243398b3f96baca5d6f332f274c045f09eec
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 Oct 29, 2026.

Transparency log

Security for mantispy 0.1.0a2

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.0a2.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 Oct 29, 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