Two combinatorial optimization problems for SNP discovery using base-specific cleavage and mass spectrometry

Background The discovery of single-nucleotide polymorphisms (SNPs) has important implications in a variety of genetic studies on human diseases and biological functions. One valuable approach proposed for SNP discovery is based on base-specific cleavage and mass spectrometry. However, it is still very challenging to achieve the full potential of this SNP discovery approach. Results In this study, we formulate two new combinatorial optimization problems. While both problems are aimed at reconstructing the sample sequence that would attain the minimum number of SNPs, they search over different candidate sequence spaces. The first problem, denoted as SNP - MSP, limits its search to sequences whose in silico predicted mass spectra have all their signals contained in the measured mass spectra. In contrast, the second problem, denoted as SNP - MSQ, limits its search to sequences whose in silico predicted mass spectra instead contain all the signals of the measured mass spectra. We present an exact dynamic programming algorithm for solving the SNP - MSP problem and also show that the SNP - MSQ problem is NP-hard by a reduction from a restricted variation of the 3-partition problem. Conclusions We believe that an efficient solution to either problem above could offer a seamless integration of information in four complementary base-specific cleavage reactions, thereby improving the capability of the underlying biotechnology for sensitive and accurate SNP discovery.


Background
Single nucleotide polymorphisms (SNPs) is a common type of DNA sequence variations that occur when a single nucleotide base is altered at a specific locus. They are among the most important genetic factors that contribute to human disease and biological functions. However, discovering novel SNPs is a scientifically challenging task. Among others, one valuable approach proposed for SNP discovery is based on base-specific cleavage and mass spectrometry [1][2][3].
The SNP discovery approach based on base-specific cleavage and mass spectrometry usually adopts a data-acquisition procedure as summarized below. First, a target sample DNA sequence is PCR-amplified using primers that incorporate the T7 promoter sequences. Then, the PCR products are in-vitro transcribed and subsequently digested with the endonuclease RNase A in four base-specific cleavage reactions. Each reaction can cleave the sample sequence to completion at all loci wherever a specific base is found. Finally, the matrix-assisted laser desorption/ionization time-of-flight mass spectrometry (MALDI-TOF MS) is applied to the cleavage products, resulting in four measured mass spectra, each corresponding to one base-specific cleavage reaction.
Since each cleavage product is expected to be made of three non-cleavage bases, it is fairly straightforward to calculate the base composition from its measured mass signal. With all these base compositions in hand, the task of discovering SNPs in the sample sequence is now left to a computational solution. In principle, this computational solution shall find a way to integrate the four complementary base-specific mass spectra, and then identify those SNPs that necessarily account for the unanticipated base compositions (i.e., corresponding to the measured mass signal changes as compared with an in-silico predicted mass spectra from a reference sequence). See Figure 1 for schematic outline of the SNP discovery approach using base-specific cleavage and mass spectrometry.
The early proof-of-concept studies on the above SNP discovery approach using base-specific cleavage and mass spectrometry were presented in [3][4][5], where the identification of SNPs however was done by visual inspection. Shortly afterwards, two automated computational solutions were developed [1,2]: one was implemented in the proprietary MassARRAY™ SNP Discovery software package from Sequenom, Inc. and the other implemented in the software package called RNaseCut which is instead freely available online [6]. In particular, the solution in [1] mainly comprises of two separate procedures. It first computes all potential SNPs that give rise to each unanticipated based composition and then score them by taking into account the mass spectrometry data from the four base-specific cleavage reactions. Thus, the integration of the four base-specific cleavage reactions was done only in the second step. Apparently, such an integration strategy is far from being optimal, as at least it assumes that the occurrences of potential SNPs are independent in the first step.
In this paper, we study two new combinatorial optimization problems to exploit the full potential of the above SNP discovery approach. While both problems are aimed at reconstructing the sample sequence that would attain the minimum number of SNPs, they search over different candidate sequence spaces. The first problem, denoted as SNP−MS P , limits its search to sequences whose in silico predicted mass spectra have all their signals contained in the measured mass spectra. In contrast, the second problem, denoted as SNP -MS Q , limits its search to sequences whose in silico predicted mass spectra instead contain all the signals of the measured mass spectra. Then, we present an exact dynamic programming algorithm for solving the SNP−MS P problem and also show that the SNP -MS Q problem is NP-hard by a reduction from the restricted variation of the 3-partition problem [7,8].

Preliminaries
Let s Σ* denote a string over the four-base alphabet = {A, C, G, T}. The length of s is denoted by |s|, the i-th base of s by s[i], and the substring of s from the i-th base to the j-th base by s[i, j], for 1 ≤ i ≤ j ≤ |s|. We use Î to denote the empty string so that |Î| = 0. The concatenation of two strings s and t is denoted by s · t, and the concatenation of l copies of a string s is denoted by s l .
Given a string s and a cut base x ∈ , a cleavage fragment refers to a substring of s that does not contain x and that cannot be extended in either side without crossing a base x. Formally, the substring s[i, j] is a cleavage fragment with respect to the cut base x if the following three conditions are satisfied: In addition, the empty string ε is a cleavage fragment if there exits i [1,|s| − 1] such that s[i] = s[i + 1] = x. Given a cleavage fragment, we use A i C j G k T l to denote its base composition of i As, j Cs, k Gs, and l Ts. In [1], this base composition is termed as a compomer of the string s with respect to the cut base x. The whole set of compomers is hence called the compomer spectrum of the string  Example 1 Let s := ACATGCTACATTA. Then, the string s contains four cleavage fragments with respect to the cut base A: C, TGCT, C, and TT. With respect to the cut base T, it instead contains five cleavage fragments: ACA, GC, ACA, Î, and A. Their respective compomer spectra are C A (s) = {A 0 C 1 G 0 T 0 , A 0 C 1 G 1 T 2 , A 0 C 0 G 0 T 2 } and C T (s) = {A 2 C 1 G 0 T 0 , A 0 C 1 G 1 T 0 , A 0 C 0 G 0 T 0 , A 1 C 0 G 0 T 0 }. Note that each compomer appears in a compomer spectrum at most once.

Problem formulation
Let d H (s, s ) denote the Hamming distance between two strings s and s of equal length. It measures the minimum number of substitutions required to transform one string into the other. Given a collection of compomer spectra C = {C x : x ∈ } of an unknown string s (i.e., the sample DNA sequence experimented) which can in principle be generated from a mass spectrometry experiment, and a string s (i.e., the reference DNA sequence) which is believed to differ from the unknown string s by a number of substitutions only, we formulate below two combinatorial optimization problems for SNP discovery.
Definition 2 (The SNP − MS P problem) Given a string s and a collection of compomer spectra C = {C x : x ∈ }, find a string s such that C x (s ) ⊆ C x , for all x ∈ and d H (s, s ) is minimized. Definition 3 (The SNP − MS Q problem) Given a string s and a collection of compomer spectra C = {C x : x ∈ }, find a string s such that C x ⊆ C x (s ), for all x ∈ and d H (s, s ) is minimized. The only difference between the above two problem formulations is that one requires C x (s ) ⊆ C x and the other requires C x ⊆ C x (s ), for all the cut bases. Once the string s is found, it is easy to identify the SNPs in s , i.e., those base substitutions that transform s into s. Example 4 In this example, we let := {A, T} for simplicity. Given the string s:= ATAAT and the set C = {C A , C T } of compomer spectra (of an unknown string) where The feasible solutions to the SNP−MS P problem for the above instance include the strings such as ATATA, TATAT, TTATT, ATATT, and ATTAT. Their respective Hamming distances to the input string s are 2, 3, 2, 1, and 1. The string s = TTAAT is not a feasible solution because the compomer The feasible solutions to the SNP − MS Q problem for the above instance include the strings such as TTATA, TATTA, ATATT, and ATTAT. Their respective Hamming distances to the input string s are 3, 5, 1, and 1. The string s = TTAAT is not a feasible solution because the compomer The measured mass spectra of a sample sequence are rarely perfect in practice. Some peaks may actually represent noises, while some true signal peaks are missing. The problem SNP−MS P is so formulated that its computational solution would be robust against noisy peaks but susceptible to missing peaks (i.e., there is a good chance to recover the sample sequence even if some noisy peaks are present in the measured mass spectra, but the chance would become much less if there are some true signal peaks missing). In contrast, the problem SNP -MS Q is so formulated that its computational solution would be robust against missing peaks but susceptible to noisy peaks.
We noticed that several computational problems in the literature that are more or less related to our problems introduced above. In [9], a so-called sequencing from compomers problem was studied which, like the SNP−MS P problem, also aimed to reconstruct the sample sequence from a given collection of compomer spectra, but without help of a reference sequence. In [10], the spectral alignment problem differs from the SNP−MS P problem mainly by its exploration on short read sequencing data rather than the mass/compomer spectra data, which may lead to wide implications in the subsequent algorithm design and complexity analysis. Moreover, in [1], a so-called SNP discovery from mass spectrometry problem was defined in a similar way to the SNP -MS Q problem. However, it has only a single compomer as input, as opposed to a collection of four complementary compomer spectra used in the SNP -MS Q problem.

Results
An exact dynamic programming algorithm for SNP−MS P In this subsection, we shall describe an exact dynamic programming algorithm for solving the SNP−MS P problem. Without loss of generality, we may assume in the remaining of this section that every base of Σ will eventually occur in the optimal solution to a given instance of the SNP−MS P problem. Consequently, only those feasible solutions that contains all the bases of Σ need to be considered when we search for the optimal solution. In case some base x would not occur in the optimal solution s note that it becomes relatively easy to find s since we would have s ∈ L x ∩ R x and |s'| = |s|. See below for definitions of L x and R x .
Let us start with some preliminary definitions and notations. For a string s, a cleavage fragment s[i, j] is called internal if neither i = 1 nor j = |s|, left-ended if i = 1, or right-ended if j = |s|. In addition, a cleavage fragment Î is always considered internal. Given a collection of compomer spectra C , we call a string is I-compatible if the compomers of its internal cleavage fragments are all contained in C (under the respective cut base). A string is called L-compatible (resp. R-compatible) if it is I-compatible and if the compomers of its left-ended (resp. rightended) cleavage fragments are all contained in C as well.
Example 5 Consider the string s given in Example 1. The four cleavage fragments of s with respect to the cut base A are all internal. Among the five cleavage fragments of s with respect to the base T, the first cleavage fragment ACA is left-ended, the last cleavage fragment A is right-ended, and the other three cleavage fragments in the middle are all internal. Table 1 whether each of the given strings is I-compatible, L-compatible, or R-compatible with C .

We show in
For each compomer A i C j G k T l ∈ C x in a given collection of compomer spectra C , we use I x (A i C j G k T l ) to denote the set of strings that (i) consist of i As, j Cs, k Gs, l Ts, (ii) contain exactly three distinct bases (i.e., three bases in the set Σ \ {x}), and (iii) are I-compatible with C . It is easy In particular, if there exists in A i C j G k T l a non-cut base whose composition value is zero, then we have |I Furthermore, we may define the following set }for the L-compatible strings and the R-compatible strings, respectively. Clearly, L x ⊆ I x and R x ⊆ I x , for all x Σ.
Example 7 Consider the collection of compomer spectra C given in Example 6. For the compomer A 0 C 1 G 1 T 2 ∈ C A , we have IA(A0C1G1T2) = {CGTT, CTTG, GCTT, GTTC, TCGT, TGCT, TTCG, TTGC}, and L A (A 0 C 1 G 1 T 2 ) = R A (A 0 C 1 G 1 T 2 ) = ∅. For the compomer Given a string t which could be a potential cleavage fragment with respect to the cut base x (i.e., the string t does not contain any base x), we say a string s begins with the string t if t · x is a prefix of s · x, or say a string s ends with the string t if x · t is the suffix of x · s. The following lemma is useful to design a dynamic programming algorithm for solving the SNP−MS P problem. Its easy proof is omitted. Recall that our discussions in this section are limited only to the feasible solutions containing all the bases of Σ.
Lemma 8 A string s' of length |s| is a feasible solution to the SNP−MS P problem if and only if -all the substrings of s are I-compatible with C , s begins with a string in L x for some x ∈ , and s ends with a string in R x for somex ∈ .
Suppose we have an input instance s, C of the SNP−MS P problem. Given a string t ∈ I x where x ∈ , we define H (i, t) to be the minimum Hamming distance between the prefix of s of length i and a string which is such that -all its substrings are I-compatible with C , -it begins with a string from L y for some y Σ, and -it ends with the given string t.
To compute H (i, t), we first find in the string x · t the rightmost position k at which the base (x · t)[k] is its first occurrence. Formally, we may write Then, let x':= (x · t)[k], p := (x · t)[1, k -1], and q := (x · t) [k,| x · t|]. Note that x' ≠ x and the string p contains all the bases of Σ except x'.
To compute H(i, t), we now use the following recurrence relation Note that the minimization in the above is taken over all those strings t ′ in I x which have p as the suffix. If there is no such a string in I x , then we let H(i, t) = ∞. The initial conditions for the recurrence relation are given as follows: Theorem 10 Let s' be the string that leads to then s' would be an optimal solution to the input instance s, C of the SNP -MS P problem.
Proof: For the correctness of the above dynamic programming algorithm, we need to show that (i) every feasible solution of the SNP−MS P problem would be essentially evaluated by the dynamic programming algorithm, and (ii) every string evaluated by the dynamic programming algorithm must be a feasible solution of the SNP−MS P problem.
Let the string s' be a feasible solution. Consider a cleavage fragment t of s' that contains all the bases of Σ except its corresponding cut base x. Clearly, t ∈ I x and t is the suffix of a substring s' [1, i] for some integer i. Without loss of generality, we can further suppose that t ≠ s' [1, i]. To show (i), what we mainly need to show is that there exists a string t ∈ I x such that p is the suffix of t' and t' is the suffix of the substring s' [1, i -|q|], where x', p, and q are computed for the string t as described earlier. Indeed, we can find the string t ′ as follows. For the reader's convenience, we demonstrate in the following example how to find t from t. Let s' = ACATGCTACATTA, t = s' [4,7] = TGCT, i = 7, x = A, and C be the one as given in Example 6. Note thatt ∈ I A . Further, for the given string t = TGCT, we have x' = C, p = ATG, and q = CT. Then, we obtain that i' = 3 and then t' = s' [3, 7 − 2] = s' [3,5] = ATG. It is easy to check that p is the suffix of t', t' is the suffix of the substring s [1, i − |q|], and t ∈ I x .
On the other hand, let s' be a string evaluated by the dynamic programming algorithm. So, the string s' must begin with a string in L x for some x ∈ and end with a string in R y for some y ∈ . Consider a cleavage fragment t of s' that was used to construct the string s' during the backtracking procedure of the algorithm. Clearly, the string t contains all the bases of except its corresponding cut base x. Moreover, t ∈ I x and t is the suffix of a substring s' [1, i] for some integer i. Without loss of generality, we can further suppose t ≠ s' [1, i] and i = |s |, so that s'[i − |t|] = s'[i + 1] = x. Let t' be the string considered next to the string t during the backtracking procedure of the algorithm. Thus, we have t ∈ I x such that p is the suffix of t' and t is the suffix of the substring s' [1, i − |q|], where x', p, and q are computed for the string t as described earlier.
In conclusion, for every internal cleavage fragment of s'[i ′ , |s ′ |], its base composition is contained in C under the respective cut base. Therefore, the extended substring s'[i', |s'|] is still I-compatible with C .
Note that computing each entry H(i, t) of the dynamic programming table may take time O |s| · |I | , where |I | = |I A | + |I C | + |I G | + |I T |. Hence, the above dynamic programming algorithm can be done in time O(|s| 2 · |I | 2 ). In the worst case, we may have |I | = O (|s|!), that is, |I | is in the factorial order of the input problem size. In practice, however, we would expect |I | not too large to be manageable, because cleavage fragments are usually of small size. Therefore, the above dynamic programming algorithm could be a practically feasible solution to the problem SNP−MS P , especially when compared to the brute-force algorithm which needs to examine all the possible strings s'. For the special case where | | = 2, SNP−MS P is actually an easy problem, as we can see from the above that |I | = O (|s|) .
Corollary 11 The above dynamic programming algorithm can solve the SNP − MS P problem in polynomial time when | | = 2.
The NP-hardness of SNP -MS Q This subsection is dedicated to prove that the SNP -MS Q problem is NP-hard. We begin with a brief introduction of the 3-partition problem.
Definition 12 (The general form of the 3-partition problem) Given a multiset of positive integers A = {a 1 , a 2 , · · · , a n } where n = 3m and n i=1 a i = mB, can we partition the multiset A into m multisets A 1 , A 2 , · · · , A m , such that the sum of each multiset is equal to B?
The 3-partition problem is strongly NP-complete [7]. Therefore, it remains NP-complete even when the integers in A and the integer B are encoded in unary. In this case, the size of a problem instance is Θ(nB). In contrast, it becomes O(n log B) when using the binary encoding of integers.
Definition 13 (The restricted variation of the 3-partition problem) Given a set of positive integers A = {a 1 , a 2 , · · · , a n } where n = 3m, n i=1 a i = mB, and B 4 < a i < B 2 , ∀1 ≤ i ≤ n, can we partition the set A into m subsets A 1 , A 2 , · · · , A m , such that the sum of each subset is equal to B?
There are two constraints imposed in the above restricted variation of the 3-partition problem. The first one limits A to be a set so that all the integers in A are distinct. The second one limits all the integers in A strictly between B 4 and B 2 , which subsequently enforces every subset A i to consist of exactly three elements. Interestingly, this restricted variation of the 3-partition problem remains strongly NP-complete [8], just like the general form of the 3-partition problem. Note that the second constraint B 4 < a i < B 2 was actually not imposed in [8]. But, it can be easily done by adding B to each a i and then multiplying B by 4.
Proof: We prove it by a reduction from the above restricted variation of the 3-partition problem. As an input for 3-partition, we are given a set of distinct positive integers A = {a 1 , a 2 , · · · , a n } where n = 3m, n i=1 a i = mB, and B 4 < a i < B 2 , ∀1 ≤ i ≤ n. Then, we construct an instance s, C of the SNP -MS Q problem as follows: -Let s be the string such that s · T = (G B+2 T) m . That is, let s · T be the concatenation of m copies of the fragment GG · · · GT, where each fragment consists of (B + 2) consecutive base Gs followed by one base T. Note that |s| = m(B + 3) − 1 = mB + 3m − 1.
First, we check whether this construction can be done in polynomial time in the size of the input instance of the 3-partition problem. Since the restricted variation of the 3-partition problem is strongly NP-complete, we may encode the integers in unary so that the size of the input instance is Θ(nB). In the above reduction, we can easily see that the first step can be done in constant time, the second step in time O(mB), and the third step in time O(n log B). Therefore, the total time needed for construction is O(nB), no more than time polynomial in the size of the input instance of the 3-partition problem.
Next, we show that every feasible solution s″ to the reduced instance s, C of the SNP -MS Q problem is such that (i) C T (s ) = C T , (ii) s″ contains exactly 3m − 1 base Ts, and (iii) d H (s, s″) ≥ 2m. For each compomer G a i T 0 ∈ C T ⊆ C T (s ), there exists at least one cleavage fragment G a i in s″ that is obtained with respect to the cut base T. Since all the integers a i are distinct, all such cleavage fragments shall be pairwise non-overlapping.
Thus, the string s′′ contains at least n i=1 a i = mB base Gs and at least n − 1 = 3m -1 base Ts. On the other hand, since |s| = mB + 3m -1, the string s″ hence consists of exactly mB + 3m− 1 bases. Therefore, we can deduce that s″ contains exactly 3m − 1 base Ts and further that C T (s ) cannot have any other compomer than those in C T . By construction, we also know that the string s contains exactly m − 1 base Ts, which hence implies that d H (s, s″) ≥ 2m. Now, we are going to show that there exists a valid partition for the input instance of the 3-partition problem if and only if there exists an optimal solution s ′ for the reduced instance of the SNP -MS Q problem such that d H (s, s') = 2m.
Suppose that A can be partitioned into m sub-setsA 1 , A 2 , · · · , A m such that, for each subset A i = {a i 1 , a i 2 , a i 3 }, its size is three and its integer elements adds up to exactly B, that is, |A i = 3|and 3 j=1 a i j = B, ∀1 ≤ i ≤ m. Then, we use the following procedure to find the string s': 1. s := ∅ ; 2. for i = 1 to m 3. for j = 1 to 3 4.
s + = G a i j T ; // append the string G a i j T to s' 5. end 6. end 7. s':= s'[1, |s'| − 1]; // remove the last base T As one can easily check, the resulting string s' is such that |s'| = mB + 3m − 1, C G ⊆ C G (s ), and C T ⊆ C T (s ). Therefore, s' is a feasible solution to the reduced instance s, C of the SNP -MS Q problem. On the other hand, since It hence follows that s′ is indeed an optimal solution to the reduced instance s, C of the SNP -MS Q problem.
Conversely, suppose that the string s' is an optimal solution to the reduced instance s, C of the SNP -MS Q problem such that d H (s, s') = 2m. Then, we use the following procedure to find a partition A 1 , A 2 , · · · , A m of A: 1. s := s · T; s':= s' · T; 2. − 1] is a substring of s that consists of (B + 2) base Gs; it is located either strictly between two consecutive base Ts or strictly between one base T and one end of the string s. [1, m]. Then, we can see that A 1 , A 2 , ..., A m is a partition of A such that the sum of integers in each subset is equal to B.

Extensions to edit distance
Naturally we may extend our previous problem formulations to the edit distance (i.e., Levenshtein distance). The resulting two new problems are formally defined as follows.
Definition 15 (The SNP−MS P problem) Given a string s and a collection of compomer spectra C = {C x : x ∈ }, find a string s' such that C x (s ) ∈ C x , for all × Σ and d E (s, s') is minimized.
Definition 16 (The SNP -MS Q problem) Given a string s and a collection of compomer spectra C = {C x : x ∈ }, find a string s' such that C x ⊆ C x (s ), for all x ∈ and d E (s, s') is minimized. These extensions make it possible to detect not only base substitutions but also base insertions and deletions. Hence, they would permit the mutation discovery in DNA sequences (see [1]). In the Additional file 1, we show that both SNP−MS P and SNP -MS Q are theoretically NP-hard, together with an exact dynamic programming algorithm for solving the SNP−MS P problem.

Conclusions
To exploit the full potential of the SNP discovery approach using base-specific cleavage and mass spectrometry, in this paper we have studied two new combinatorial optimization problems, called SNP−MS P and SNP -MS Q , respectively. We believe that any efficient solution to either problem could offer a more seamless integration of information in four complementary basespecific reactions than previously done in [1,2], thereby improving the capability of the underlying biotechnology (i.e., base-specific cleavage and mass spectrometry) for sensitive and accurate SNP discovery.
Although we cannot change the inherent complexity of our proposed dynamic programming algorithm for the SNP−MS P problem, we believe that by improving and optimizing its implementation, the compute runtime can be significantly reduced to the extent suitable for practical use. On the other hand, the NP-hardness result indicates that in the most general situation, solving the SNP -MS Q problem exactly in polynomial time is impossible unless P = NP. In more realistic situations where only a very few SNPs (e.g., two or three SNPs) occur in a target sample sequence, however, the problem can be quite easily tackled, e.g., using an exhaustive search approach. In the future work, we shall try to prove that the SNP−MS P problem is NP-hard and develop an efficient heuristic algorithm for the SNP -MS Q problem for practical use.

Additional material
Additional file 1: Extensions to edit distance. The analysis results for the problems SNP -MS Pe and SNP -MS Q e are presented. See "Additional file 1.pdf".