
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.
Path to directory containing MEME Suite binaries (must include fimo).
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 |