add_prefix
Add a label prefix to sequence names without modifying the sequences themselves. Useful for marking which branch of a pipeline produced each sequence.
import poolparty as pp
pp.init()
Parameters
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
|
(required) |
Input pool. |
|
|
(required) |
Prefix string appended to each sequence name. |
|
|
|
Iteration priority for downstream multi-pool iteration. |
Note
Only the most commonly used parameters are shown above. For the full
parameter list, see add_prefix() in the
API Reference.
Examples
Label sequences from different branches
wt = pp.from_seq("ACGTACGT")
branch = pp.mutagenize(wt, num_mutations=1, prefix="mut", mode="random")
tagged = pp.add_prefix(branch, "experiment1")
tagged.print_library()
tagged: seq_length=8, num_states=1
ACGTGCGT
See add_prefix().