PoolParty Documentation
PoolParty is a Python package that streamlines the design of complex DNA sequence libraries. Each library is specified as a computational graph in a few lines of code, with sequences generated on demand. Over 50 built-in operations cover nucleotide- and codon-level mutagenesis, scanning, barcode generation, and more. Applications include massively parallel reporter assays, deep mutational scanning, and in silico analysis of genomic models.
Why PoolParty?
Designing DNA libraries often involves combining multiple types of sequence modifications (mutations, insertions, deletions, replacements) across multiple regions. PoolParty lets you:
Chain operations: Build pipelines from operations like
mutagenize,deletion_scan, andinsertion_scanto produce complex variant librariesTag regions: Mark segments of a sequence with XML-style tags so operations can target them by name
Track construction history: Each sequence carries a design card recording how it was built, ready for filtering and analysis
Style output: Visual annotations highlight mutations, deletions, and regions for quick auditing
PoolParty provides over 50 built-in operations across six categories. See Operations for the full catalog.
Installation
Install from PyPI:
pip install poolparty
Or install from source:
git clone https://github.com/jbkinney/poolparty-statetracker.git
cd poolparty-statetracker/poolparty
pip install -e .
Example
Stack different variant types into a single barcoded library:
import poolparty as pp
pp.init()
template = pp.from_seq("ACGT<cre>GGAAAGCGGGCAGTGAGC</cre>TTTT<bc/>GGGG")
mutations = template.mutagenize(region="cre", num_mutations=1)
deletions = template.deletion_scan(region="cre", deletion_length=5)
combined = pp.stack([mutations, deletions])
library = combined.insert_kmers(region="bc", length=10).named("library")
library.print_library(num_seqs=6, seed=0)
ACGT<cre>GGAAAGCGGGCAG-----</cre>TTTT<bc>TTCGGGATAG</bc>GGGG
ACGT<cre>GGAAAGCGGACAGTGAGC</cre>TTTT<bc>TACCTATTTT</bc>GGGG
ACGT<cre>GGA-----GGCAGTGAGC</cre>TTTT<bc>CTTGAATGGC</bc>GGGG
ACGT<cre>GGAGAGCGGGCAGTGAGC</cre>TTTT<bc>CGCAGCCTGG</bc>GGGG
ACGT<cre>GGAAAG-----AGTGAGC</cre>TTTT<bc>AACTGGTCGG</bc>GGGG
The Quickstart Guide walks through each concept step by step. For complete real-world examples, see the Tutorials.
Contents
Reference
Indices and Tables
See Also
StateTracker: Composable states for combinatorial enumeration (used internally by PoolParty)