Algorithm Search⌘K

Problemcore

Planted motif problem

Also called planted (l; d)-motif problem.

Recover a hidden string of length l from random background sequences, when a copy of it with at most d mismatches was planted in each sequence.

The planted motif problem is a test form of motif finding in which the answer is known. A hidden string MM of length LL is chosen, and a copy of MM with at most dd changed letters is put into each of nn random sequences. The task is to find MM from the sequences alone. Pevzner and Sze posed the case L=15L = 15, d=4d = 4 as a challenge in 2000, because the methods of that time failed on it. The decision form of the problem is NP-complete.

In plain words

Someone writes a secret word of 15 letters. They make 20 random DNA strings of 600 letters each. Into each string they copy the word, but before each copy they change 4 of its letters, at random places. So no two copies are the same, and none is equal to the secret word.

You get the 20 strings and the numbers 15 and 4, and you must find the secret word. The hard part is that two copies can differ in up to 8 letters, while many pairs of random pieces of the strings are just as close as that by chance. A method that compares the pieces two at a time sees millions of false matches for each true one.

Definition

The literature writes ll for the motif length; this page writes LL, as the other motif pages do. Positions are 1-based on this page.

The model. Fix nn, GG, LL and d<Ld < L. Each background sequence s1,…,sns_1, \ldots, s_n has GG letters drawn independently and uniformly from {A,C,G,T}\{A, C, G, T\}. A motif MM of length LL is drawn uniformly. For each ii, an instance MiM_i with dH(M,Mi)≤dd_H(M, M_i) \le d replaces the window of sis_i that starts at a position pip_i, 1≤pi≤W=G−L+11 \le p_i \le W = G - L + 1. Here dHd_H is the Hamming distance. In the model of Pevzner and Sze each instance has exactly dd changes: dd positions are picked at random, and each picked letter becomes one of the other three letters at random.

An (L,d)(L, d) motif of the sequences is a string vv of length LL such that every sis_i has a window tit_i with dH(v,ti)≤dd_H(v, t_i) \le d. The planted motif MM is one of them.

The search problem. Given s1,…,sns_1, \ldots, s_n, LL and dd, find the planted motif MM and the positions pip_i.

The decision problem. Given strings s1,…,sns_1, \ldots, s_n and integers LL and dd, does an (L,d)(L, d) motif exist? This is the decision form of the closest substring problem, with no assumption on how the strings were made.

Variants

  • At most dd or exactly dd changes. The search for (L,d)(L, d) motifs is the same in both; only the statistics of the instances differ.
  • Sites in only some sequences. In real data a factor may not bind every sequence. A quorum version asks for a string with a dd match in at least qq of the nn sequences.
  • Edit distance. Insertions and deletions in the instances give the edited motif problem; the methods on this page do not handle it.
  • All motifs. Exact methods list every (L,d)(L, d) motif. The output can then hold the planted one and spurious ones, as below.

Examples

A small case. With a fixed seed, the test generator of these pages plants MM = AATTA (L=5L = 5, d=1d = 1) in n=4n = 4 sequences of length G=12G = 12:

ii sis_i pip_i instance dH(M,Mi)d_H(M, M_i)
1 TCGAATCACAAC 4 AATCA 1
2 CTAGTTACTCTT 3 AGTTA 1
3 GCTAGATTACGT 5 GATTA 1
4 AACTAGTGGGAC 1 AACTA 1

A check of all 45=10244^5 = 1024 strings finds that AATTA is the only (5,1)(5, 1) motif of these four sequences. No instance equals MM, and two instances can differ in 2 letters: AATCA and AGTTA differ at positions 2 and 4.

The challenge. Pevzner and Sze used n=20n = 20, G=600G = 600, L=15L = 15 and d=4d = 4. Their Table 1 (a measurement, on 8 random samples) gives the average performance coefficient ∣K∩P∣/∣K∪P∣|K \cap P| / |K \cup P|, where KK is the set of planted letter positions and PP is the set of predicted ones: CONSENSUS 0.07, GibbsDNA 0.12, MEME 0.10, WINNOWER 0.92 and SP-STAR 0.84.

Known algorithms

method type time source
pattern enumeration: test each of the 4L4^L strings exact O(4LnWL)O(4^L n W L) folklore; see median string
neighborhood enumeration: test each string within dd of a window of s1s_1 exact O(WV(L,d)⋅nWL)O(W V(L, d) \cdot n W L) folklore
branch and bound on the string tree exact O(4LnWL)O(4^L n W L) worst case Jones and Pevzner 2004
WINNOWER: filter a graph of windows to its nn-cliques exact on the graph, heuristic filter polynomial per round Pevzner and Sze 2000
SP-STAR: local improvement of star-shaped sets of windows heuristic polynomial per round Pevzner and Sze 2000
PROJECTION: hash on random positions, then EM randomized heuristic depends on the trials Buhler and Tompa 2002

Here V(L,d)=∑i=0d(Li)3iV(L, d) = \sum_{i=0}^{d} \binom{L}{i} 3^i is the number of strings within distance dd of a fixed string. The second method is right because MM is within dd of the instance in s1s_1, so MM is in the neighborhood of some window of s1s_1. For (15,4)(15, 4), V=123,841V = 123{,}841, so it tests 586×123,841≈7.3×107586 \times 123{,}841 \approx 7.3 \times 10^7 strings, against 415≈1.07×1094^{15} \approx 1.07 \times 10^9 for the first method.

AlgorithmTimeSpacePropertiesCode
Random projection motif findingO(m (n W k + B I n W L)) worstO(n W + L) extrarandomizednot exactofflineiterative1 language
WINNOWERO(n^2 W^2 L + E^2 n W + W^n) worstO(n W + E) extradeterministicnot exactofflinerecursive1 language

Bounds

Theorem. The decision problem is NP-complete.

Proof. It is in NP: a string vv and one window in each sequence are a certificate, and the check takes O(nL)O(nL) time. For hardness, reduce from the closest string problem over the binary alphabet: given binary strings x1,…,xnx_1, \ldots, x_n of length LL and an integer dd, is there a binary vv with dH(v,xi)≤dd_H(v, x_i) \le d for all ii? Frances and Litman (1997) proved it NP-complete. Write each xix_i over {A,C}\{A, C\} with 0↦A0 \mapsto A and 1↦C1 \mapsto C, and take G=LG = L, so each sequence has one window, itself. A binary center gives an (L,d)(L, d) motif at once. Conversely, let vv be an (L,d)(L, d) motif over {A,C,G,T}\{A, C, G, T\}. Change every G or T of vv into A. At such a position every xix_i had a mismatch, since xix_i holds A or C there, and after the change only the strings with C mismatch. So no distance grows, and the new vv is a center over {A,C}\{A, C\}. The reduction takes linear time. □\square

  • Parameterized. Closest substring is W[1]-hard with the number nn of strings as the parameter, also over a binary alphabet (Fellows, Gramm and Niedermeier 2006). So an algorithm with time f(n)⋅poly(G)f(n) \cdot \mathrm{poly}(G) is not expected; see the W hierarchy. For a fixed LL the enumeration above is polynomial.
  • Approximation. Li, Ma and Wang (2002) give polynomial-time approximation schemes for closest string and closest substring: a center within (1+ϵ)d(1 + \epsilon) d of a window of every sequence.

Theorem (the distance of two instances). In the model with exactly dd changes, two instances M1M_1 and M2M_2 of the same motif have E[dH(M1,M2)]=2d−4d2/(3L)E[d_H(M_1, M_2)] = 2d - 4d^2/(3L).

Proof. Each instance changes a uniform random set of dd positions, so a fixed position is in both sets with probability (d/L)2(d/L)^2, and the expected number of shared positions is d2/Ld^2/L. A position changed in one instance only is a mismatch. There are 2(d−d2/L)2(d - d^2/L) of them on average. A position changed in both is a mismatch unless both picked the same of the three other letters, which has probability 1/31/3. So the expected distance is 2(d−d2/L)+23⋅d2/L=2d−4d2/(3L)2(d - d^2/L) + \frac{2}{3} \cdot d^2/L = 2d - 4d^2/(3L). □\square

For (15,4)(15, 4) this is 8−64/45≈6.588 - 64/45 \approx 6.58. Two random 15-mers are within distance 8 with probability about 0.0566. With 20 sequences of 600 letters there are (202)⋅5862=65,245,240\binom{20}{2} \cdot 586^2 = 65{,}245{,}240 pairs of windows from different sequences, so about 3.69×1063.69 \times 10^6 random pairs are as close as the worst pair of instances, against (202)=190\binom{20}{2} = 190 pairs of instances. This is the ratio of about 20,000 to 1 that Pevzner and Sze give.

How many spurious motifs (a heuristic). A fixed string is within dd of a random window with probability Pd=V(L,d)/4LP_d = V(L, d)/4^L. If the windows were independent, a sequence would hold a dd match with probability 1−(1−Pd)W1 - (1 - P_d)^W, and the expected number of (L,d)(L, d) motifs made by chance would be 4L(1−(1−Pd)W)n4^L (1 - (1 - P_d)^W)^n. For n=20n = 20 and G=600G = 600:

(L,d)(L, d) V(L,d)V(L, d) PdP_d match in one sequence expected spurious motifs
(15, 4) 123,841 1.15×10−41.15 \times 10^{-4} 0.065 2.2×10−152.2 \times 10^{-15}
(14, 4) 91,771 3.42×10−43.42 \times 10^{-4} 0.182 4.2×10−74.2 \times 10^{-7}
(16, 5) 1,225,093 2.85×10−42.85 \times 10^{-4} 0.154 2.3×10−72.3 \times 10^{-7}
(18, 6) 15,886,504 2.31×10−42.31 \times 10^{-4} 0.126 7.1×10−87.1 \times 10^{-8}
(9, 2) 352 1.34×10−31.34 \times 10^{-3} 0.549 1.6

So the (15,4)(15, 4) motif is the only one with high probability, and the problem is well posed. In the harder cases of Buhler and Tompa, (14,4)(14, 4), (16,5)(16, 5) and (18,6)(18, 6), background windows are close to the motif more often, but a unique answer is still expected. For (9,2)(9, 2) with these sizes, chance alone gives an (L,d)(L, d) motif, and no method can tell the planted one from the others.

Reductions

  • To motif finding. An (L,d)(L, d) motif with its windows is a choice of sites whose largest distance to a center is at most dd, so its total distance score is at most ndnd. The motif finding methods with the total score can find it, but a choice with a small total score need not have a small largest distance.
  • To cliques. Make a graph with one vertex for each window and an edge between windows of different sequences at distance at most 2d2d. The instances of a planted motif are pairwise within 2d2d by the triangle inequality, so they form an nn-clique in an nn-partite graph. WINNOWER uses this view; finding a largest clique is the clique problem.
  • From closest string. The NP-completeness proof above.

Applications

  • Benchmarks. The model gives inputs with a known answer, so the success rate of a method can be measured. Many motif finding papers after 2000 report results on (15,4)(15, 4) and harder cases.
  • Design of methods. The analysis of two instances showed why methods that start from pairs of similar windows fail on subtle signals, and led to WINNOWER, PROJECTION and the exact enumeration methods.
  • Real binding sites. Real sites are not planted uniformly and the background is not uniform, so success on planted data is a necessary test, not proof of success on promoters.

References

  1. Pavel A. Pevzner and Sing-Hoi Sze, Combinatorial approaches to finding subtle signals in DNA sequences, 2000, pp. 269 to 278, the planted (l, d) motif problem, the (15, 4) challenge, the expected distance of two instances and the comparison of CONSENSUS, GibbsDNA, MEME, WINNOWER and SP-STAR
  2. Jeremy Buhler and Martin Tompa, Finding motifs using random projections, Journal of Computational Biology 9(2), 2002, pp. 225 to 242, the planted motif model and the harder (14, 4), (16, 5) and (18, 6) cases
  3. Moti Frances and Ami Litman, On covering problems of codes, Theory of Computing Systems 30(2), 1997, pp. 113 to 119, NP-completeness of the radius of a binary code (the closest string problem)
  4. Michael R. Fellows, Jens Gramm and Rolf Niedermeier, On the parameterized intractability of motif search problems, Combinatorica 26(2), 2006, pp. 141 to 167, W[1]-hardness of closest substring in the number of strings, also for a binary alphabet
  5. Ming Li, Bin Ma and Lusheng Wang, On the closest string and substring problems, Journal of the ACM 49(2), 2002, pp. 157 to 171, polynomial-time approximation schemes for closest string and closest substring

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW2 basic
  • a contract.yaml