Skip to content
Back to skills

Ai Science Enformer Regulatory

ASecurity

Enformer architecture for regulatory prediction from DNA, in-silico mutagenesis (ISM), and variant prioritization

  • 4 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added May 27, 2026
data-aipythongogit

Security analysis

A100/100

Scanned May 27, 2026

npx -y skills add Pavel-Kravchenko/Bioinformatics --skill ai-science-enformer-regulatory --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ai Science Enformer Regulatory?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Ai Science Enformer Regulatory
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/pavel-kravchenko-ai-science-enformer-regulatory/badge)](https://www.skillsdirectory.com/skills/pavel-kravchenko-ai-science-enformer-regulatory)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: ai-science-enformer-regulatory
description: "Enformer architecture for regulatory prediction from DNA, in-silico mutagenesis (ISM), and variant prioritization"
tool_type: python
primary_tool: NumPy
---

# Enformer: Regulatory Activity from DNA

## Key Facts

- **Input**: one-hot DNA (196,608 bp × 4). Centered on region of interest
- **Output**: 896 bins × 128 bp (~115 kb predicted region) across ~5,313 tracks (CAGE, DNase, ATAC, ChIP-seq, 100+ cell types)
- **Architecture**: Stem conv → 6 dilated conv blocks → 11 transformer layers (8 heads, relative pos encodings) → pointwise conv
- **Training**: Poisson log-likelihood loss, softplus output, hg38 + mm10
- **Borzoi** extends to 524 kb input, 32 bp resolution, RNA-seq coverage (including splicing patterns)

## Gotchas

- **196 kb context**: outer flanks provide context but are not predicted — only central ~115 kb
- **ISM vs gradient methods**: ISM is simple but O(3L) model calls. DeepLIFT/GradCAM are faster but need model internals
- The 11 transformer layers are what differentiate Enformer from conv-only baselines (Basenji2)

## In-Silico Mutagenesis (ISM)

```python
import numpy as np

def mutate_base(seq: str, pos: int, alt: str) -> str:
    return seq[:pos] + alt + seq[pos + 1:]

def ism_scores(seq: str, pos: int, model_fn):
    baseline = model_fn(seq)
    ref = seq[pos]
    effects = {}
    for alt in "ACGT":
        if alt == ref:
            continue
        effects[alt] = model_fn(mutate_base(seq, pos, alt)) - baseline
    return ref, baseline, effects
```

## Variant Prioritization

Rank by absolute predicted effect on track of interest. Combine with population frequency, GWAS/eQTL evidence, and experimental context.

```python
def score_variant(seq, pos, alt, track, model_fn):
    base = model_fn(seq)[track]
    mut = model_fn(mutate_base(seq, pos, alt))[track]
    return float(mut - base)
```

## Sources

- [Avsec et al. 2021, Enformer (Nature Methods)](https://www.nature.com/articles/s41592-021-01252-x)
- [DeepMind Enformer](https://github.com/google-deepmind/deepmind-research/tree/master/enformer)
- [Borzoi](https://github.com/calico/borzoi)

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…