Operations

PoolParty provides over 50 built-in operations for designing DNA sequence libraries. Each operation takes one or more Pools as input and returns a new Pool, so calls can be chained into a pipeline.


Key concepts

Most operations accept a mode parameter that controls whether outputs are enumerated exhaustively (sequential), sampled randomly (random), or uniquely determined by the input (fixed). Each operation’s mode and parameters determine how many output sequences it produces — see Operation Modes for details.

When operations are combined, the output pool’s num_states follows from the combination rule — multiplication, addition, or other patterns depending on the operation type. See Library Size for details and a worked example.

Every operation that accepts a pool argument is also available as a method on any Pool. pp.mutagenize(wt, ...) and wt.mutagenize(...) are equivalent, so operations can be chained left-to-right into a pipeline.


Source Operations

Create the initial Pools from which all downstream Pools are constructed. See Source Operations.


Transformation Operations

Modify sequence content through mutations, positional scanning, region manipulation, codon-level operations, and deterministic transforms.


Composition Operations

Combine sequences from multiple Pools, either by concatenating sequences end-to-end or by merging state spaces. See Composition Operations.


State Operations

Control which sequences are in a Pool and how they are ordered, including methods to replicate, sample, filter, score, and synchronize. See State Operations.