This release is a pre-release and may not be stable for production use.
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:
-
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
-
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 syncis for contributors, see the contributing guide.
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:
uv add 'mantispy[spatial,map]' # in a uv project
pip install 'mantispy[spatial,map]' # 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.0a4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mantispy-0.1.0a4.tar.gz | 455.6 kB | With provenance | Details for mantispy-0.1.0a4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mantispy-0.1.0a4-py3-none-any.whl | Python 3 | none | any | Details for mantispy-0.1.0a4-py3-none-any.whl |
Total release size: 955.0 kB
Release files / mantispy-0.1.0a4.tar.gz
| Download URL | mantispy-0.1.0a4.tar.gz |
|---|---|
| Size | 455.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a8926f2481e6b6fb817cc6948e41df02b9583bb0e8e12927e1969e702c7c5ac9
|
|
BLAKE2b-256 checksum How to use checksums |
a930b585a2f5e034e520a62b7d887bfc9f2925633b6b4da60fb0c1213a491d4b
|
| 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 11, 2026.
Transparency logRelease files / mantispy-0.1.0a4-py3-none-any.whl
| Download URL | mantispy-0.1.0a4-py3-none-any.whl |
|---|---|
| Size | 499.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b95e5a5ee339c78ee5782419e27ecbc0ef0b225434d3f9cd32fdcdaf9bbe0b58
|
|
BLAKE2b-256 checksum How to use checksums |
f6d7455393ca03712eb80d110b96e34399cd0be84beb689c612f0736eed9125a
|
| 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 11, 2026.
Transparency logSecurity for mantispy 0.1.0a4
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.
Attestation for mantispy-0.1.0a4.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 11, 2026.
Transparency logA 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.