> ## 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.

# Enformer Track Activity

> Score DNA target activity on selected Enformer output tracks.

![Enformer Track Activity](https://proto-bio.github.io/proto-assets/images/constraint/enformer-track-activity/hero.png)

> [!NOTE]
>
> **License:** Enformer uses Apache-2.0 for code and CC-BY-4.0 for model weights and may require explicit attribution when utilized. Please refer to the [code license](https://github.com/google-deepmind/deepmind-research/blob/master/LICENSE) and [model weights license](https://github.com/google-deepmind/deepmind-research/blob/master/enformer/README.md) for full terms.

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;Tools Used Tools Used  Source Source  Cite Cite

![](https://proto-bio.github.io/proto-assets/images/tool/enformer/social.png)

&#x20;Go to Tool Page

[Open](https://proto.evodesign.org/docs/tools/sequence-scoring/enformer.md)

![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/1a97e675c7e5e4ae0e92be91b1bb7b49f1331104/proto_language/constraint/sequence_annotation/enformer_track_activity_constraint.py#L229)

@articleavsec2021enformer

```bibtex theme={null}
@article{avsec2021enformer,
  title={Effective gene expression prediction from sequence by integrating long-range interactions},
  author={Avsec, {\v{Z}}iga and Agarwal, Vikram and Visentin, Daniel and Ledsam, Joseph R and Grabska-Barwinska, Agnieszka and Taylor, Kyle R and Assael, Yannis and Jumper, John and Kohli, Pushmeet and Kelley, David R},
  journal={Nature Methods},
  volume={18},
  number={10},
  pages={1196--1203},
  year={2021},
  publisher={Nature Publishing Group},
  doi={10.1038/s41592-021-01252-x}
}
```

&#x20;Copy citation

Constraint contributors[![](https://avatars.githubusercontent.com/u/61667248?v=4\&s=64)adititm](https://github.com/adititm)[![](https://avatars.githubusercontent.com/u/21143637?v=4\&s=64)bviggiano](https://github.com/bviggiano)
Score target proposals for selected Enformer output tracks.

## API Reference

ConfigEnformerTrackActivityConfig[ Source](https://github.com/evo-design/proto-language/blob/1a97e675c7e5e4ae0e92be91b1bb7b49f1331104/proto_language/constraint/sequence_annotation/enformer_track_activity_constraint.py#L58)

Configuration for Enformer track-activity scoring.

**organism** `enum` (default: human)

Enformer species head to use: human or mouse.

Options: `human`, `mouse`

**enformer\_output\_tracks** `List[integer]` (default: \[0])

Enformer output track IDs to average before scoring.

**score\_intervals** `array`

Optional target-relative intervals to score. If omitted, scores the full target.

**direction** `enum` (default: maximize)

Whether high activity or low activity is preferred.

Options: `maximize`, `minimize`

**activity\_threshold** `number` (default: 200.0)

Activity value treated as saturating success for the objective.

**device** `string` (default: cuda)

CUDA device for Enformer inference.

**batch\_size** `integer` (default: 1)

Candidate sequences per Enformer forward batch.

**trim\_prefix\_bp** `integer` (default: 0)

Leading target bases to ignore before scoring.

ReturnsConstraintOutput

One result per proposal; `score` is in `[0, 1]`, lower is better.

## Usage

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

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

scores = constraint.evaluate()
```

## Metadata

| Property | Value |
| - | - |
| Key | `enformer-track-activity` |
| Function | `enformer_track_activity_constraint` |
| Category | `sequence_annotation` |
| Mode | `dual` |
| Uses GPU | `True` |
| Supported Types | `dna` |


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