Metadata-Version: 2.4
Name: mapqc
Version: 0.1.0
Summary: A metric for the evaluation of single-cell query-to-reference mappings
Project-URL: Documentation, https://mapqc.readthedocs.io/
Project-URL: Homepage, https://github.com/theislab/mapqc
Project-URL: Source, https://github.com/theislab/mapqc
Author: Lisa Sikkema
Maintainer-email: Lisa Sikkema <lisasikkema4@gmail.com>
License: MIT License
        
        Copyright (c) 2025, Lisa Sikkema
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.10
Requires-Dist: scanpy
Requires-Dist: scikit-learn
Requires-Dist: session-info2
Provides-Extra: dev
Requires-Dist: pre-commit; extra == 'dev'
Requires-Dist: twine>=4.0.2; extra == 'dev'
Provides-Extra: doc
Requires-Dist: docutils!=0.18.*,!=0.19.*,>=0.8; extra == 'doc'
Requires-Dist: ipykernel; extra == 'doc'
Requires-Dist: ipython; extra == 'doc'
Requires-Dist: myst-nb>=1.1; extra == 'doc'
Requires-Dist: pandas; extra == 'doc'
Requires-Dist: setuptools; extra == 'doc'
Requires-Dist: sphinx-autodoc-typehints; extra == 'doc'
Requires-Dist: sphinx-book-theme>=1; extra == 'doc'
Requires-Dist: sphinx-copybutton; extra == 'doc'
Requires-Dist: sphinx-tabs; extra == 'doc'
Requires-Dist: sphinx>=4; extra == 'doc'
Requires-Dist: sphinxcontrib-bibtex>=1; extra == 'doc'
Requires-Dist: sphinxext-opengraph; extra == 'doc'
Provides-Extra: test
Requires-Dist: coverage; extra == 'test'
Requires-Dist: pytest; extra == 'test'
Description-Content-Type: text/markdown

# mapQC

[![Tests][badge-tests]][tests]
[![Documentation][badge-docs]][documentation]

[badge-tests]: https://img.shields.io/github/actions/workflow/status/theislab/mapqc/test.yaml?branch=main
[badge-docs]: https://img.shields.io/readthedocs/mapqc

A metric for the evaluation of single-cell query-to-reference mappings

## Getting started

Please refer to the [documentation](https://mapqc.readthedocs.io/), in particular, the [API documentation](https://mapqc.readthedocs.io/en/latest/api/index.html) for detailed package documentation. For reproduction of the results in the paper, check out the [mapQC reproducibility repository](https://github.com/theislab/mapqc_reproducibility). <br><br>
Below a few notes on how and when to use MapQC:

### What does mapQC do?

MapQC evaluates the quality of a query-to-reference mapping, and outputs a cell-level mapQC score for every query cell. MapQC scores higher than 2 indicate a large distance of the query cell to the reference. Given a healthy/control reference, we expect query controls to have low mapQC scores, and query case/disease cells to have higher mapQC scores in the case of case-specific cellular phenotypes. You can thus use mapQC scores to assess, in a quantitative manner, if your mapping was successful.

![Overview of mapQC workflow](https://raw.githubusercontent.com/theislab/mapqc/main/docs/_static/images/mapQC_concept_figure.png)
<p style="margin-top: 0;"><small><i>Overview of mapQC's workflow</i></small></p>

### What are the data requirements for using mapQC?

In short, you need one AnnData object, including:
- A large scale reference, including only its healthy/control cells.
- A mapped query dataset, with healthy/control cells (must-have) and case/perturbed cells (if you have them).
- Metadata (query/reference status, study, sample, and optionally clustering and cell type annotations)
- A mapping-derived embedding including both the reference and the query

In the [quick-start tutorial notebook](./docs/notebooks/mapqc_quickstart.ipynb) we provide a more extensive description of the exact data requirements.


## Installation

You need to have Python 3.10 or newer installed on your system.

There are several alternative options to install mapqc:

1) Install the latest release of `mapqc` from [PyPI][]:

```bash
pip install mapqc
```

1. Install the latest development version:

```bash
pip install git+https://github.com/theislab/mapqc.git@main
```

## Release notes

See the [changelog][].

## Contact

I am happy to hear any comments, suggestions, or even bugs that you run into. I would like to make this package run as smoothly as possible! So for any of these, submit an issue on the mapQC GitHub page and I will be glad to help.

## Citation

> t.b.a

[mambaforge]: https://github.com/conda-forge/miniforge#mambaforge
[scverse discourse]: https://discourse.scverse.org/
[issue tracker]: https://github.com/theislab/mapqc/issues
[tests]: https://github.com/theislab/mapqc/actions/workflows/test.yml
[documentation]: https://mapqc.readthedocs.io
[changelog]: https://mapqc.readthedocs.io/en/latest/changelog.html
[api documentation]: https://mapqc.readthedocs.io/en/latest/api.html
[pypi]: https://pypi.org/project/mapqc
