from_seqs ========= Create a pool that draws from an explicit list of sequences. By default the pool samples uniformly at random; pass ``mode='sequential'`` to iterate through the list in order. .. code-block:: python import poolparty as pp pp.init() ---- Parameters ---------- .. list-table:: :header-rows: 1 :widths: auto * - Parameter - Type - Default - Description * - ``seqs`` - ``list[str]`` - *(required)* - List of DNA strings. Must not be empty. * - ``pool`` - ``Pool | None`` - ``None`` - Background pool. When provided with ``region``, each sequence replaces the content of that region. Requires ``region``. * - ``region`` - ``str | None`` - ``None`` - Region to replace in ``pool``. Required when ``pool`` is provided. * - ``seq_names`` - ``list[str] | None`` - ``None`` - Explicit label for each sequence; populates the ``seq_name`` column in :func:`~poolparty.generate_library` output. Cannot be used with ``prefix``. * - ``prefix`` - ``str | None`` - ``None`` - Prefix for auto-generated names (e.g. ``'seq_'`` produces ``'seq_0'``, ``'seq_1'``, …). Cannot be used with ``seq_names``. * - ``mode`` - ``str`` - ``'random'`` - ``'sequential'`` iterates through ``seqs`` in order (cycling if ``num_states`` exceeds the list length); ``'random'`` samples uniformly at random. * - ``num_states`` - ``int | None`` - ``None`` - Number of states to generate. In ``'sequential'`` mode, cycles if greater than ``len(seqs)`` or clips if less. * - ``iter_order`` - ``int | None`` - ``None`` - Dimension-name ordering for downstream multi-pool iteration. * - ``style`` - ``str | None`` - ``None`` - Display style applied to every generated sequence. * - ``cards`` - ``dict | list | None`` - ``None`` - Design card columns to include in library output. ---- .. note:: Only the most commonly used parameters are shown above. For the full parameter list, see :func:`~poolparty.from_seqs` in the :doc:`API Reference `. Examples -------- Basic list, random mode ~~~~~~~~~~~~~~~~~~~~~~~ ``mode='random'`` (the default) — each draw picks one sequence uniformly at random. This example sets it explicitly and shows one representative draw. .. code-block:: python pool = pp.from_seqs( ["AAAA", "CCCC", "GGGG", "TTTT"], mode="random", ) pool.print_library() .. raw:: html