
License: MEME Suite (FIMO) is licensed under Custom (MEME Suite Academic License) and has restrictions around commercial use and may require explicit attribution when utilized. Please refer to the license 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.

- Unwanted motifs: Strong matches (low p-values) result in high penalties, encouraging sequences without these binding sites
- Wanted motifs: Strong matches result in low penalties (rewards), while missing wanted motifs result in high penalties
- No motif specification: Any motif matches are penalized (novelty constraint)
API Reference
Configuration for sequence motif constraint using MEME.This class defines configuration parameters for evaluating DNA sequences against
known transcription factor binding motifs using MEME Suite’s Find Individual
Motif Occurrences tool. The constraint searches for position weight matrix
motifs in sequences and can either encourage specific motifs (wanted) or discourage
them (not_wanted), enabling design of sequences with controlled sites.
Motif names must match exactly with the names in the MEME file (case-sensitive).
Use the MOTIF lines in the .meme file to identify available motif names.
Path to MEME format motif file (.meme) containing PWMs.
FIMO scan parameters (p-value threshold, both-strands); defaults match FIMO’s nucleotide behavior.
Motifs that should be present: ‘all’ (all motifs), ‘none’ (no requirement), or list of motif names.
Motifs that should NOT be present: ‘all’ (reject all), ‘none’ (allow all), or list of motif names.
Scaling factor to adjust penalty magnitude (>1 = stricter, <1 = more lenient). Example: 1.0
If True, automatically sets unwanted motifs as complement of wanted motifs
How to aggregate penalties: ‘smart’ (adaptive), ‘average’, ‘max’ (strictest), ‘percentile’Options:
smart, average, max, percentileWhich percentile to use when aggregation=‘percentile’ (0-100)
When both wanted and unwanted motifs exist, weight unwanted motifs more heavily in final score
ReturnsConstraintOutput
One result per sequence. Score ranges from 0.0
(all criteria satisfied) to 1.0 (severe violations). metadata
carries a single motif_constraint dict:-
penalty: Float overall penalty score (0.0-1.0) -
wanted: Sorted list of wanted motif names -
not_wanted: Sorted list of unwanted motif names -
found: Dictionary mapping motif names to their best (lowest) FIMO p-values -
details: Dictionary with per-motif scoring details including:penalty: Individual motif penaltystatus: “wanted_found”, “wanted_missing”, “unwanted”, or “unwanted_absent”p_value: FIMO p-value if motif was found
-
aggregation_info: Dictionary with aggregation statistics:method: Aggregation method usedunwanted_count: Number of unwanted motif evaluationswanted_count: Number of wanted motif evaluationsunwanted_matches: Number of unwanted motifs foundwanted_matches: Number of wanted motifs found
Usage
Requiring specific transcription factor binding sites:python
Metadata
| Property | Value |
|---|---|
| Key | seq-motif |
| Function | seq_motif_constraint |
| Category | sequence_annotation |
| Mode | discrete |
| Uses GPU | False |
| Supported Types | dna |