> ## Documentation Index
> Fetch the complete documentation index at: https://proto.evodesign.org/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Uracil Content

> Enforce uracil/thymine content within a specified range

![Uracil Content](https://proto-bio.github.io/proto-assets/images/constraint/uracil-content/hero.png)

This constraint is open source. Any third-party models, product names, or trademarks referenced are the property of their respective owners, and Proto is not affiliated with them.

***

&#x20;Source

![Proto](https://mintcdn.com/bio-pro/cMLt8hAqaP9M3LKy/assets/logo/logo-light.svg?fit=max\&auto=format\&n=cMLt8hAqaP9M3LKy\&q=85\&s=f5e5dfd1b8f9b9db3a0be0e2eb01f678)

evo-design/proto-language

&#x20;View source

[Open](https://github.com/evo-design/proto-language/blob/0824a53b9c4ed4c3ed45d82d06d250a40b1c9e7a/proto_language/constraint/sequence_composition/uracil_content_constraint.py#L57)

Constraint contributors[![](https://avatars.githubusercontent.com/u/21143637?v=4\&s=64)bviggiano](https://github.com/bviggiano)
Enforce uracil (U) content within a specified range.

Counts uracil, treating DNA thymine (`T`) as equivalent to RNA uracil (`U`), and
penalizes deviation from `[min_u, max_u]`.

## API Reference

ConfigUracilContentConfig[ Source](https://github.com/evo-design/proto-language/blob/0824a53b9c4ed4c3ed45d82d06d250a40b1c9e7a/proto_language/constraint/sequence_composition/uracil_content_constraint.py#L21)

Configuration for the uracil (U) content constraint.

The penalty is `0` inside `[min_u, max_u]` and scales linearly with the deviation
outside it.

**min\_u** `number` (default: 0.0)

Minimum acceptable uracil content percentage (0-100)

**max\_u** `number` (default: 100.0)

Maximum acceptable uracil content percentage (0-100)

ReturnsConstraintOutput

One result per sequence. `score` is `0.0` when U content is
within range and scales linearly with deviation otherwise; `metadata` carries
`uracil_content`.

## Usage

```python python icon="python" theme={null}
from proto_language.core import Constraint
from proto_language.constraint import uracil_content_constraint, UracilContentConfig

constraint = Constraint(
    inputs=[segment],
    function=uracil_content_constraint,
    function_config=UracilContentConfig(
        # Configure parameters here
    ),
)

scores = constraint.evaluate()
```

## Metadata

| Property | Value |
| - | - |
| Key | `uracil-content` |
| Function | `uracil_content_constraint` |
| Category | `sequence_composition` |
| Mode | `discrete` |
| Uses GPU | `False` |
| Supported Types | `dna`, `rna` |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.