deletion_scan ============= Slide a deletion window of fixed length across the sequence (or a named region) and, at each position, remove those bases. By default deleted positions are filled with ``-`` gap characters so all output sequences remain alignment-compatible. Pass ``deletion_marker=None`` to produce shorter sequences instead. .. 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. * - ``deletion_length`` - ``int`` - *(required)* - Width of the deletion window in bases. A sequence of length *L* produces *L* - ``deletion_length`` + 1 variants. * - ``deletion_marker`` - ``str | None`` - ``'-'`` - Character used to fill deleted positions. Pass ``None`` to remove deleted bases entirely (output sequences are shorter than the input). * - ``region`` - ``str | None`` - ``None`` - Name of a tagged region to restrict the scan to. Flanking sequences are never modified. * - ``positions`` - ``list[int] | None`` - ``None`` - Explicit list of window start positions. ``None`` = all valid positions. * - ``mode`` - ``str`` - ``'random'`` - ``'sequential'`` iterates left-to-right; ``'random'`` shuffles. * - ``num_states`` - ``int | None`` - ``None`` - Fix the total number of output states. * - ``style`` - ``str | None`` - ``None`` - Named display style applied to the deletion marker. Only takes effect when ``deletion_marker`` is not ``None``. * - ``iter_order`` - ``int | None`` - ``None`` - Dimension-name ordering for downstream multi-pool iteration. * - ``prefix`` - ``str | None`` - ``None`` - Prefix for auto-generated sequence names. ---- .. note:: Only the most commonly used parameters are shown above. For the full parameter list, see :func:`~poolparty.deletion_scan` in the :doc:`API Reference `. Examples -------- Single-base deletion with default marker ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Delete one base at each of the 8 positions in an 8-mer; deleted positions are marked with ``-``. .. code-block:: python wt = pp.from_seq("ACGTACGT") dels = wt.deletion_scan(deletion_length=1, mode="sequential", style="grey") dels.print_library() .. raw:: html