join
Concatenate a list of pools (or plain strings) end-to-end into a single composite pool. Every combination of one sequence from each input pool is produced (Cartesian product). Pass a spacer string to insert a fixed linker between adjacent segments.
import poolparty as pp
pp.init()
Parameters
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
|
(required) |
List of |
|
|
|
Fixed string inserted between every adjacent pair of segments. Not itself a pool dimension. |
|
|
|
Controls which pool varies fastest when enumerating combinations. The pool with the smallest value is the inner loop. Can also be set on each individual pool. |
|
|
|
Prefix for auto-generated sequence names. |
|
|
|
Display style applied to the joined result. |
Note
Only the most commonly used parameters are shown above. For the full
parameter list, see join() in the
API Reference.
Examples
Join two pools (all pairwise combinations)
Joining two multi-sequence pools produces every combination of one sequence from each input.
left = pp.from_seqs(["AA", "CC"], mode="sequential")
right = pp.from_seqs(["GG", "TT"], mode="sequential")
pool = pp.join([left, right])
pool.print_library()
AATT
CCGG
CCTT
Join with a fixed spacer
spacer_str inserts a constant linker between every adjacent pair.
left = pp.from_seq("ACGT")
right = pp.from_seqs(["AAAA", "CCCC", "GGGG"], mode="sequential")
pool = pp.join([left, right], spacer_str="TTT")
pool.print_library()
ACGTTTTCCCC
ACGTTTTGGGG
Controlling iteration order with iter_order
The pool with the smallest iter_order value varies fastest (inner loop).
Here b is the inner loop and a is the outer loop.
a = pp.from_seqs(["A", "C"], mode='sequential', iter_order=2) # outer (slower)
b = pp.from_seqs(["G", "T"], mode='sequential', iter_order=1) # inner (faster)
pool = pp.join([a, b])
pool.print_library()
AT
CG
CT
Join three pools with a literal string segment
Plain strings in the list are treated as fixed single-sequence pools,
eliminating the need to call from_seq() for constant flanks.
promoter = pp.from_seqs(["AAAA", "CCCC"], mode="sequential")
insert = pp.from_seqs(["GCGC", "TATA"], mode="sequential")
pool = pp.join([promoter, "NNNNN", insert])
pool.print_library()
AAAANNNNNTATA
CCCCNNNNNGCGC
CCCCNNNNNTATA
See join().