clear_annotation
================
Strip all XML region tags and non-molecular characters from sequences, then
uppercase the result. This produces clean, undecorated sequences suitable for
export (e.g., writing to FASTA) or for operations that do not accept tagged
input. When a ``region=`` is specified, only the content inside that tagged
segment is cleaned; the outer tags themselves are removed from the output
according to the ``remove_tags`` setting.
.. code-block:: python
import poolparty as pp
pp.init()
----
Parameters
----------
.. list-table::
:widths: auto
:header-rows: 1
* - Parameter
- Type
- Default
- Description
* - ``pool``
- ``Pool | str``
- *(required)*
- Parent pool or sequence string to transform.
* - ``region``
- ``str | list | None``
- ``None``
- Region to transform: marker name, ``[start, stop]``, or ``None`` for
the full sequence.
* - ``remove_tags``
- ``bool | None``
- ``None``
- If ``True`` and ``region`` is a marker name, strip marker tags from
the output.
* - ``iter_order``
- ``float | None``
- ``None``
- Enumeration order when combined with other pools.
* - ``prefix``
- ``str | None``
- ``None``
- Prefix for sequence names in the resulting pool.
----
.. note::
Only the most commonly used parameters are shown above. For the full
parameter list, see :func:`~poolparty.clear_annotation` in the
:doc:`API Reference `.
Examples
--------
Strip tags from a region-tagged sequence
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Remove the ``cre`` open/close tags and uppercase every base, producing a
plain sequence with no markup.
.. code-block:: python
wt = pp.from_seq("AAAA