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

# Sigma70 Promoter Strength

> Evaluate sigma-70 promoter similarity for DNA sequences

<div class="page-hero">
  <img class="page-hero-banner" src="https://proto-bio.github.io/proto-assets/images/constraint/sigma70-promoter/hero.png" alt="Sigma70 Promoter Strength" />
</div>

<p class="entity-disclaimer">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.</p>

<hr class="entity-rule" />

<div class="tool-tab-bar entity-source-bar"><span class="tool-tab-wrap"><span class="tool-tab badge-source entity-source-tab"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 18 22 12 16 6" /><polyline points="8 6 2 12 8 18" /></svg> Source</span></span></div>

<a href="https://github.com/evo-design/proto-language/blob/d3b7822f74ea64747cc751a3b2ab1aa6b799ac47/proto_language/constraint/sequence_annotation/sigma70_promoter_constraint.py#L201" target="_blank" class="tab-panel source-panel entity-source-panel">
  <div class="source-info">
    <img noZoom src="https://github.com/evo-design.png?size=40" class="source-avatar" width="36" height="36" />

    <span class="source-path">evo-design/proto-language<span class="source-subpath">/proto\_language/constraint/sequence\_annotation/sigma70\_promoter\_constraint.py</span></span>
  </div>

  <span class="panel-goto-btn source-goto-btn"><span><svg width="14" height="14" viewBox="0 0 24 24" fill="currentColor"><path d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z" /></svg> View source</span></span>
</a>

<div class="entity-contributors"><span class="entity-contributors-label">Constraint contributors</span><span class="entity-contributors-people"><a class="entity-contributor" href="https://github.com/dguo8412" target="_blank" rel="noopener" title="dguo8412: 3 commits"><img noZoom class="entity-contributor-avatar" src="https://avatars.githubusercontent.com/u/46211285?v=4&s=64" alt="" loading="lazy" /><span class="entity-contributor-login">dguo8412</span></a></span></div>
Evaluate E. coli sigma-70 promoter similarity using PWM-based scoring.

This constraint function evaluates bacterial promoter similarity by scanning
DNA sequences for sigma-70-dependent promoter elements. It identifies putative
-35 and -10 boxes, scores them based on similarity to consensus
sequences weighted by position-specific conservation probabilities, evaluates
the spacer distance between them, and combines these scores into an overall
promoter similarity prediction.

The scoring model is based on RegulonDB experimental data for E. coli sigma-70
promoters and uses three components:

1. **PWM score**: Position weight matrix score based on conservation probabilities
2. **Match count**: Simple count of consensus matches (out of 12 positions)
3. **Spacer length**: Deviation from optimal 17 bp spacer

The function scans sequences to find the best-scoring promoter configuration
within the allowed spacer range \[min\_spacer, max\_spacer]. For short sequences
(≤32 bp), it treats the entire sequence as a fixed promoter. For longer
sequences, it exhaustively scans all positions.

## API Reference

<div class="api-model-section api-model-static api-config-section">
  <div class="api-model-header"><span class="api-model-badge api-config-badge">Config</span><span class="api-model-name">Sigma70PromoterConfig</span><a href="https://github.com/evo-design/proto-language/blob/d3b7822f74ea64747cc751a3b2ab1aa6b799ac47/proto_language/constraint/sequence_annotation/sigma70_promoter_constraint.py#L15" target="_blank" class="func-table-btn func-source-btn api-model-source"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 18 22 12 16 6" /><polyline points="8 6 2 12 8 18" /></svg> Source</a></div>

  Configuration for sigma-70 promoter similarity constraint.

  This class defines configuration parameters for evaluating bacterial promoter
  similarity using a position weight matrix (PWM) model of E. coli sigma-70 promoters.
  The model scores promoter elements based on similarity to consensus sequences
  for the -35 and -10 boxes, the spacer distance between them, and
  the total number of matches to consensus. This approach is based on RegulonDB
  experimental data for E. coli sigma-70-dependent promoters.

  The scoring combines three components:

  1. PWM score: Similarity to consensus sequences weighted by conservation
  2. Match count: Number of exact matches to consensus (out of 12 positions)
  3. Spacer length: Distance between -35 and -10 boxes

  <Note>
    The constraint scans sequences to find the best-scoring promoter within
    the allowed spacer range. For sequences ≤32 bp, it treats the entire
    sequence as a single promoter (first 6 bp = -35, last 6 bp = -10). For
    longer sequences, it scans all possible positions.

    The final penalty combines three components:

    1. **Box penalty** = (1 - match\_weight) \* PWM\_penalty + match\_weight \* match\_penalty
    2. **Total penalty** = (1 - spacer\_weight) \* box\_penalty + spacer\_weight \* spacer\_penalty
  </Note>

  <ParamField path="consensus_35" type="string" default="TTGACA">
    -35 box consensus sequence (6 bp, typically TTGACA for E. coli sigma-70)
  </ParamField>

  <ParamField path="consensus_10" type="string" default="TATAAT">
    -10 box consensus sequence (6 bp Pribnow box, typically TATAAT for E. coli sigma-70)
  </ParamField>

  <ParamField path="probs_35" type="List[number]" default="[0.69, 0.79, 0.61, 0.56, 0.54, 0.54]">
    Position-specific conservation probabilities for -35 box (6 values). From RegulonDB.
  </ParamField>

  <ParamField path="probs_10" type="List[number]" default="[0.77, 0.76, 0.6, 0.61, 0.56, 0.82]">
    Position-specific conservation probabilities for -10 box (6 values). From RegulonDB.
  </ParamField>

  <ParamField path="optimal_spacer" type="integer" default="17">
    Optimal spacer length between -35 and -10 boxes in base pairs (typically 17±1 bp)
  </ParamField>

  <ParamField path="spacer_sigma" type="number" default="1.5">
    Standard deviation for spacer length penalty. Lower values = stricter spacing requirement.
  </ParamField>

  <ParamField path="spacer_weight" type="number" default="0.3">
    Weight (0-1) for spacer penalty in total score. Higher = spacing more important.
  </ParamField>

  <ParamField path="gamma" type="number" default="0.1">
    PWM score exponent for non-linearity. Lower values = more sensitive to mismatches.
  </ParamField>

  <ParamField path="k_opt" type="integer" default="8">
    Optimal number of matches to consensus (out of 12 total positions)
  </ParamField>

  <ParamField path="match_sigma" type="number" default="2.0">
    Standard deviation for match count penalty
  </ParamField>

  <ParamField path="match_weight" type="number" default="0.3">
    Weight (0-1) for match count penalty in total score
  </ParamField>

  <ParamField path="min_spacer" type="integer" default="14">
    Minimum acceptable spacer length in bp
  </ParamField>

  <ParamField path="max_spacer" type="integer" default="20">
    Maximum acceptable spacer length in bp
  </ParamField>
</div>

<div class="api-model-section api-model-static api-output-section">
  <div class="api-model-header"><span class="api-model-badge api-output-badge">Returns</span><span class="api-model-name">ConstraintOutput</span></div>

  One result per sequence. Score ranges from 0.0 (perfect
  promoter, exact consensus with optimal spacer) to 1.0 (poor/no promoter).
  `metadata` carries a single `sigma70` dict with the following fields:

  **For valid promoters found:**

  * `sigma70_score`: Float overall penalty score (0.0-1.0)
  * `pos`: Integer start position of the -35 box in the sequence
  * `box35`: String sequence of the -35 box (6 bp)
  * `box10`: String sequence of the -10 box (6 bp)
  * `spacer_len`: Integer spacer length between boxes (bp)
  * `total_matches`: Integer total matches to consensus (out of 12)
  * `pwm_penalty`: Float PWM-based penalty component (0.0-1.0)
  * `match_penalty`: Float match count penalty component (0.0-1.0)
  * `spacer_penalty`: Float spacer length penalty component (0.0-1.0)

  **For sequences too short (\<12 bp):**

  * `sigma70_score`: Float 1.0 (maximum penalty)
  * `reason`: String "too\_short"

  **For sequences with invalid spacer (12-32 bp range):**

  * `sigma70_score`: Float 1.0 (maximum penalty)
  * `reason`: String "invalid\_spacer"
</div>

## Usage

Evaluating a canonical sigma-70 promoter:

```python python icon="python" theme={null}
>>> from proto_language.core import Sequence, SequenceType
>>> promoter_seq = Sequence(
...     "TTGACAATGATACTTAGATTCACTTATAATACTAGTAG",  # 17 bp spacer
...     "dna",
... )
>>> config = Sigma70PromoterConfig()
>>> results = sigma70_promoter_constraint([(promoter_seq,)], config)
>>> print(results[0].score)  # e.g., 0.08 (strong promoter)
>>> sigma70 = results[0].metadata["sigma70"]
>>> print(f"-35: {sigma70['box35']}, -10: {sigma70['box10']}")  # TTGACA, TATAAT
```

## Metadata

| Property        | Value                         |
| --------------- | ----------------------------- |
| Key             | `sigma70-promoter`            |
| Function        | `sigma70_promoter_constraint` |
| Category        | `sequence_annotation`         |
| Mode            | `discrete`                    |
| Uses GPU        | `False`                       |
| Supported Types | `dna`                         |
