Metadata-Version: 2.4
Name: mpralib
Version: 0.10.6
Summary: Library to analyze count data of MPRA experiments.
Home-page: https://github.com/kircherlab/MPRAlib
Author: Max Schubach
Author-email: Max Schubach <max.schubach@bih-charite.de>
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10,<3.15
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: pandas
Requires-Dist: click
Requires-Dist: scikit-learn
Requires-Dist: scipy
Requires-Dist: anndata>=0.11.3
Requires-Dist: seaborn
Requires-Dist: matplotlib
Requires-Dist: jsonschema
Requires-Dist: tqdm
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: coverage; extra == "test"
Dynamic: author
Dynamic: classifier
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# MPRAlib

[![Documentation Status](https://readthedocs.org/projects/mpralib/badge/?version=latest)](https://mpralib.readthedocs.io/latest/?badge=latest)
[![DOI](https://zenodo.org/badge/913714670.svg)](https://doi.org/10.5281/zenodo.18173084)
[![GitHub License](https://img.shields.io/github/license/kircherlab/MPRAlib)](https://github.com/kircherlab/MPRAlib/blob/master/LICENSE)
[![GitHub Release](https://img.shields.io/github/v/release/kircherlab/MPRAlib)](https://github.com/kircherlab/MPRAlib/releases/latest)
[![PyPI version](https://badge.fury.io/py/mpralib.svg)](https://badge.fury.io/py/mpralib)
[![Bioconda Version](https://img.shields.io/conda/vn/bioconda/mpralib?label=bioconda)](https://bioconda.github.io/recipes/mpralib/README.html)
[![Tests](https://github.com/kircherlab/MPRAlib/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/kircherlab/MPRAlib/actions/workflows/tests.yml)
[![Coverage badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/kircherlab/MPRAlib/python-coverage-comment-action-data/endpoint.json)](https://htmlpreview.github.io/?https://github.com/kircherlab/MPRAlib/blob/python-coverage-comment-action-data/htmlcov/index.html)
[![GitHub Issues](https://img.shields.io/github/issues/kircherlab/MPRAlib)](https://github.com/kircherlab/MPRAlib/issues)
[![GitHub Pull Requests](https://img.shields.io/github/issues-pr/kircherlab/MPRAlib)](https://github.com/kircherlab/MPRAlib/pulls)

MPRAlib is a Python library and CLI for processing MPRA (Massively Parallel Reporter Assay) data.

## Citation

If you use MPRAlib in your work, please cite:

> Rosen JD, Vasanthakumari AD, Salomon K, de Lange N, Dash PM, Keukeleire P, Hassan A, Barrera A, Krupkin B, Oualline G, Kircher M, Love MI, Schubach M. Uniform processing and analysis of IGVF massively parallel reporter assay data with MPRAsnakeflow. *Genome Research* (2025). doi: [10.1101/gr.281462.125](https://doi.org/10.1101/gr.281462.125)

## Installation

### PyPI

```bash
pip install mpralib
```

### Conda

From the bioconda channel

```bash
conda install -c bioconda mpralib
```

## Usage

### Command Line Interface

Use the `mpralib` command to access various functionalities.

#### Validate a file

MPRAlib provides a CLI tool for validating MPRA data files against supported schemas.

```bash
mpralib validate-file <schema> --input <input_file>
```

- `<schema>`: One of `reporter-sequence-design`, `reporter-barcode-to-element-mapping`, `reporter-experiment-barcode`, `reporter-experiment`, `reporter-element`, `reporter-variant`, `reporter-genomic-element`, `reporter-genomic-variant`
- `<input_file>`: Path to your data file (e.g., `.tsv.gz`, `.bed.gz`)

**Example:**

```bash
mpralib validate-file reporter-sequence-design --input data/reporter_sequence_design.example.tsv.gz
```

### Python API

In general MPRAlib is ment to be used as a library. Please have a look at our notebook [mpralib.ipynb](https://github.com/kircherlab/MPRAlib/blob/master/examples/mpralib.ipynb) for a more detailed example.

## License

MIT License

## Links

- [Documentation](https://mpralib.readthedocs.io)
- [Issues](https://github.com/kircherlab/MPRAlib/issues)
