region_multiscan ================ Insert multiple named region tags into a sequence simultaneously, producing one variant per combination of non-overlapping tag positions. Use ``mode='sequential'`` to enumerate every valid arrangement deterministically; ``mode='random'`` samples one arrangement per draw. .. code-block:: python import poolparty as pp pp.init() ---- Parameters ---------- .. list-table:: :header-rows: 1 :widths: auto * - Parameter - Type - Default - Description * - ``pool`` - ``Pool | str`` - *(required)* - The Pool to scan. Can also be a plain sequence string. * - ``tag_names`` - ``list[str] | str`` - *(required)* - Tag name(s) to insert. A single string is reused for every insertion; a list assigns one name per insertion. * - ``num_insertions`` - ``int`` - *(required)* - Number of region tags to insert simultaneously. * - ``positions`` - ``list | list[list] | None`` - ``None`` - Valid insertion positions (0-based, nontag-relative). A flat list or ``None`` shares positions across all insertions; a list-of-lists assigns per-insertion positions. * - ``region`` - ``str | list | None`` - ``None`` - Restrict the scan to a named region (string) or a ``[start, stop]`` coordinate pair. * - ``remove_tags`` - ``bool | None`` - ``None`` - When ``True`` and ``region`` is a region name, strip the constraint region tags from the output. * - ``region_length`` - ``int | list[int]`` - ``0`` - Number of bases each scanning window spans. ``0`` = zero-length point tag. A single int applies to all insertions; a list assigns per-insertion lengths. * - ``insertion_mode`` - ``str`` - ``'ordered'`` - ``'ordered'`` assigns tag_names left-to-right to positions; ``'unordered'`` enumerates all valid tag-to-position assignments. * - ``min_spacing`` - ``int | None`` - ``None`` - Minimum gap (in bases) between adjacent region tags. * - ``max_spacing`` - ``int | None`` - ``None`` - Maximum gap (in bases) between adjacent region tags. * - ``prefix`` - ``str | None`` - ``None`` - Prefix for the operation node name in the pool graph. * - ``mode`` - ``str`` - ``'random'`` - ``'sequential'`` enumerates every valid arrangement as a separate state; ``'random'`` samples one per draw. * - ``num_states`` - ``int | None`` - ``None`` - Override the automatically-computed state count. * - ``iter_order`` - ``float | None`` - ``None`` - Enumeration order when combined with other pools. * - ``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.region_multiscan` in the :doc:`API Reference `. Examples -------- Two simultaneous point tags (region_length=0) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``region_length=0`` places two zero-length tags at every valid pair of positions in an 8-mer. With ``insertion_mode='ordered'`` (the default), ``a`` always appears to the left of ``b``. .. code-block:: python wt = pp.from_seq("ATCGATCG") scan = pp.region_multiscan(wt, tag_names=["a", "b"], num_insertions=2, region_length=0, mode="sequential") scan.print_library() .. raw:: html