Metadata-Version: 2.4
Name: pairplex
Version: 0.3.0
Summary: Demultiplex single-cell antibody repertoires with precision and paired insight.
Author-email: Benjamin Nemoz <bnemoz@scripps.edu>
License: MIT License
        
        Copyright (c) 2025 Benjamin Nemoz
        
        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.
        
Project-URL: Homepage, https://github.com/brineylab/pairplex
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
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: Topic :: Scientific/Engineering :: Bio-Informatics
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: abstar>=0.7.3
Requires-Dist: abutils>=0.5.3
Requires-Dist: click
Requires-Dist: edlib
Requires-Dist: natsort
Requires-Dist: polars
Requires-Dist: pyspoa
Requires-Dist: tqdm
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Dynamic: license-file

![](https://img.shields.io/pypi/v/pairplex.svg?colorB=blue)
[![tests](https://github.com/brineylab/pairplex/actions/workflows/pytest.yml/badge.svg)](https://github.com/brineylab/pairplex/actions/workflows/pytest.yml)
![](https://img.shields.io/pypi/pyversions/pairplex.svg)
![](https://img.shields.io/badge/license-MIT-blue.svg)

# PairPlex: large-scale natively paired antibody sequencing


<p align="center">
  <img src="./pairplex/data/pairplex_logo_borders.png" alt="pairplex Logo" width="400"/>
</p>

<br>

PairPlex uses combinatorial barcoding (inspired by [UDA-seq](https://doi.org/10.1038/s41592-024-02586-y)) to perform cost-effective sequencing of large numbers of natively paired antibodies by massively overloading 10x Genomics reactions.

<br>

## Installation
PairPlex can be installed with `pip`:
``` bash
pip install pairplex
```

Alternatively, you can install from source (which may not be entirely stable, so use at your own risk):
``` bash
git clone https://github.com/brineylab/pairplex
cd pairplex
pip install .
```

Installation can be quickly confirmed by checking the version:
``` bash
pairplex version
```
If the current version is displayed, installation was successful.

<br>

## Usage

##### CLI
``` bash
pairplex run /path/to/sequencing_data /path/to/output_directory
```

Sequencing data can be provided as a single FASTA/Q file or a directory containing one or more FASTA/Q files (optionally gzip compressed). If a directory is provided, all files in the directory will be processed (recursively).

Providing the `merge_paired_reads` option will instruct PairPlex to merge paired-end sequencing reads with [fastp](https://github.com/OpenGene/fastp) prior to processing, so the output of Illumina's `bcl2fastq` or Element's `bases2fastq` can be used directly as input:

``` bash
pairplex run --merge_paired_reads /path/to/paired_reads /path/to/output_directory
```

By default, we assume Illumina-style naming conventions for paired-end read files. For paired FASTQ files produced by Element's `bases2fastq`, the `platform` option should be set to `element`.
``` bash
pairplex run --merge_paired_reads --platform element /path/to/paired_reads /path/to/output_directory
```
> [!NOTE]
>If the sequencing data is already merged (or wasn't paired-end to begin with), the `platform` option is not used, since the file naming conventions are only needed to match file pairs for read merging.

The complete list of CLI options can be displayed by running:
``` bash
pairplex run --help
```

##### API
``` python
import pairplex

pairplex.run(
    sequences="/path/to/sequencing_data",
    output_directory="/path/to/output_directory",
    merge_paired_reads=True,
)
```

<br>

## Citation
If you are using Pairplex or the dataset generated of paired antibody sequences, please cite:




