> ## 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 Chromatin Accessibility MORSE

> Score a DNA target for a Morse-code chromatin accessibility pattern using Enformer.

![Enformer Chromatin Accessibility MORSE](https://proto-bio.github.io/proto-assets/images/constraint/enformer-chromatin-accessibility-morse/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/d58aca210f720d4729abbfe6a8050f5c50ca0246/proto_language/constraint/sequence_annotation/enformer_chromatin_accessibility_morse_constraint.py#L227)

@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/46211285?v=4\&s=64)dguo8412](https://github.com/dguo8412)
Score target proposals against an Enformer chromatin accessibility MORSE objective.

## API Reference

ConfigEnformerChromatinAccessibilityMorseConfig[ Source](https://github.com/evo-design/proto-language/blob/d58aca210f720d4729abbfe6a8050f5c50ca0246/proto_language/constraint/sequence_annotation/enformer_chromatin_accessibility_morse_constraint.py#L39)

Configuration for Enformer chromatin accessibility MORSE scoring.

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

Enformer species head to use: human or mouse.

Options: `human`, `mouse`

**pattern** `string` (default: .--. .-. --- - ---)

Morse pattern; use '.', '-', and spaces between letters.

**dot\_bp** `integer` (default: 25)

Length of each dot window.

**dash\_bp** `integer` (default: 75)

Length of each dash window.

**intra\_symbol\_gap\_bp** `integer` (default: 25)

Gap between symbols within a letter.

**inter\_letter\_gap\_bp** `integer` (default: 75)

Gap between letters in the Morse pattern.

**pattern\_start\_bp** `integer` (default: 0)

Target-relative start coordinate where the Morse pattern begins.

**pattern\_normalization** `enum` (default: global\_max)

Scale signal by full-output max, target-region max, or not at all.

Options: `global_max`, `region_max`, `none`

**contrast\_margin** `number` (default: 0.0)

Minimum normalized high-minus-low signal margin to reward.

**contrast\_weight** `number` (default: 0.0)

Penalty weight when the normalized contrast margin is too small.

**raw\_amplitude\_weight** `number` (default: 0.0)

Reward weight for larger raw target signal range.

**high\_window\_reward\_weight** `number` (default: 0.0)

Reward weight for larger raw signal in dot and dash windows.

**low\_window\_penalty\_weight** `number` (default: 0.0)

Penalty weight for larger raw signal in gap windows.

**window\_stat\_transform** `enum` (default: log1p)

Transform for raw amplitude and window-mean reward terms.

Options: `log1p`, `identity`

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

CUDA device for Enformer inference.

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

Candidate sequences per Enformer model batch.

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

Leading target bases to ignore before accessibility scoring.

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

Enformer chromatin-accessibility tracks; defaults by organism.

**enformer\_track\_reduce\_method** `enum` (default: mean)

How to combine selected Enformer tracks.

Options: `mean`, `min`, `std`, `lcb`

## Usage

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

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

scores = constraint.evaluate()
```

## Metadata

| Property | Value |
| - | - |
| Key | `enformer-chromatin-accessibility-morse` |
| Function | `enformer_chromatin_accessibility_morse_constraint` |
| Category | `sequence_annotation` |
| Mode | `discrete` |
| Uses GPU | `True` |
| Supported Types | `dna` |


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