Email updates

Keep up to date with the latest news and content from BMC Bioinformatics and BioMed Central.

Open Access Highly Accessed Methodology article

Fast index based algorithms and software for matching position specific scoring matrices

Michael Beckstette12*, Robert Homann12, Robert Giegerich2 and Stefan Kurtz3

Author Affiliations

1 International NRW Graduate School in Bioinformatics and Genome Research, Center for Biotechnology (CeBITec), Bielefeld University, D-33594 Bielefeld, Germany

2 Technische Fakultät, Universität Bielefeld, Postfach 100 131, D-33501 Bielefeld, Germany

3 Zentrum für Bioinformatik, Universität Hamburg, 20146 Hamburg, Germany

For all author emails, please log on.

BMC Bioinformatics 2006, 7:389  doi:10.1186/1471-2105-7-389


The electronic version of this article is the complete one and can be found online at: http://www.biomedcentral.com/1471-2105/7/389


Received:20 April 2006
Accepted:24 August 2006
Published:24 August 2006

© 2006 Beckstette et al; licensee BioMed Central Ltd.

This is an Open Access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/2.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Abstract

Background

In biological sequence analysis, position specific scoring matrices (PSSMs) are widely used to represent sequence motifs in nucleotide as well as amino acid sequences. Searching with PSSMs in complete genomes or large sequence databases is a common, but computationally expensive task.

Results

We present a new non-heuristic algorithm, called ESAsearch, to efficiently find matches of PSSMs in large databases. Our approach preprocesses the search space, e.g., a complete genome or a set of protein sequences, and builds an enhanced suffix array that is stored on file. This allows the searching of a database with a PSSM in sublinear expected time. Since ESAsearch benefits from small alphabets, we present a variant operating on sequences recoded according to a reduced alphabet. We also address the problem of non-comparable PSSM-scores by developing a method which allows the efficient computation of a matrix similarity threshold for a PSSM, given an E-value or a p-value. Our method is based on dynamic programming and, in contrast to other methods, it employs lazy evaluation of the dynamic programming matrix. We evaluated algorithm ESAsearch with nucleotide PSSMs and with amino acid PSSMs. Compared to the best previous methods, ESAsearch shows speedups of a factor between 17 and 275 for nucleotide PSSMs, and speedups up to factor 1.8 for amino acid PSSMs. Comparisons with the most widely used programs even show speedups by a factor of at least 3.8. Alphabet reduction yields an additional speedup factor of 2 on amino acid sequences compared to results achieved with the 20 symbol standard alphabet. The lazy evaluation method is also much faster than previous methods, with speedups of a factor between 3 and 330.

Conclusion

Our analysis of ESAsearch reveals sublinear runtime in the expected case, and linear runtime in the worst case for sequences not shorter than |<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M1','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M1">View MathML</a>|m + m - 1, where m is the length of the PSSM and <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M1','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M1">View MathML</a> a finite alphabet. In practice, ESAsearch shows superior performance over the most widely used programs, especially for DNA sequences. The new algorithm for accurate on-the-fly calculations of thresholds has the potential to replace formerly used approximation approaches. Beyond the algorithmic contributions, we provide a robust, well documented, and easy to use software package, implementing the ideas and algorithms presented in this manuscript.

Background

Position specific scoring matrices (PSSMs) have a long history in sequence analysis (see [1]). A high PSSM-score in some region of a sequence often indicates a possible biological relationship of this sequence to the family or motif characterized by the PSSM. There are several databases utilizing PSSMs for function assignment and annotation, e.g., PROSITE [2], PRINTS [3], BLOCKS [4], EMATRIX [5], JASPAR [6], or TRANSFAC [7]. While these databases are constantly improved, there are only few improvements in the programs searching with PSSMs. E.g., the programs FingerPrintScan [8], BLIMPS [4], and MatInspector[9] still use a straightforward <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M2','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M2">View MathML</a>(mn)-time algorithm to search a PSSM of length m in a sequence of length n. In [10] the authors presented a method based on Fourier transformation. A different method introduced in [11] employs data compression. To the best of our knowledge there is no software available implementing these two methods. The most advanced program in the field of searching with PSSMs is EMATRIX [12], which incorporates a technique called lookahead scoring. The lookahead scoring technique is also employed in the suffix tree based method of [13]. This method performs a limited depth first traversal of the suffix tree of the set of target sequences. This search updates PSSM-scores along the edges of the suffix tree. Lookahead scoring allows to skip subtrees of the suffix tree that do not contain any matches to the PSSM. Unfortunately, the method of [13] has not found its way into a widely available and robust software system. In [14], the development of new, more efficient algorithms for searching with PSSMs is considered an important problem, which still needs better solutions.

In this paper, we present a new, non-heuristic algorithm for searching with PSSMs. With any non-heuristic PSSM searching algorithm, the performance in terms of sensitivity and specificity solely depends on the used PSSM and threshold, i.e. given a PSSM and threshold, all these algorithms give exactly the same results. For the generation of PSSMs from aligned sequences, numerous different methods, were described in literature over the last decades [1,5,15-17]. Rather than improving PSSMs, we focus on improvements in terms of time and space efficiency when searching with PSSMs, independently of their underlying generation method. The overall structure of our proposed search algorithm is similar to the method of [13]. However, instead of suffix trees we use enhanced suffix arrays, a data structure which is as powerful as suffix trees (cf. [18]). Enhanced suffix arrays provide several advantages over suffix trees, which make them more suitable for searching with PSSMs:

• While suffix trees require about 12n bytes in the best available implementation (cf. [19]), the enhanced suffix array used for searching with PSSMs only needs 9n bytes of space.

• While the suffix tree is usually only computed in main memory, the enhanced suffix array is computed once and stored on file. Whenever a PSSM is to be searched, the enhanced suffix array is mapped into main memory which requires no extra time.

• While the depth first traversal of the suffix tree suffers from the poor locality behavior of the data structure (cf. [20]), the enhanced suffix array provides optimal locality, because when searching with PSSMs it is sequentially scanned from left to right.

One of the algorithmic contributions of this paper is a new technique that allows to skip parts of the enhanced suffix array containing no matches to the PSSM. Due to the skipping, our algorithm achieves an expected running time that is sublinear in the size of the search space (i.e., the size of the nucleotide or protein database). As a consequence, our algorithm scales very well for large data sizes.

Since the running time of our algorithm increases with the size of the underlying alphabet, we developed a filtering technique, utilizing alphabet reduction, that achieves better performance especially on sequences/PSSMs over the amino acid alphabet.

When searching with a PSSM, it is important to determine a suitable threshold for a PSSM-match. Usually, the user prefers to specify a significance threshold (i.e., an E-value or a p-value) which has to be transformed into an absolute score threshold for the PSSM under consideration. This can be done by computing the score distribution of the PSSM, using well-known dynamic programming (DP, for short) methods, e.g., [12,21-23]. Unfortunately, these methods are not fast enough for large PSSMs. For this reason, we have developed a new, lazy evaluation algorithm that only computes a small fraction of the complete score distribution. Our algorithm speeds up the computation of the threshold by factor of at least 3, compared to standard DP methods. This makes our algorithm applicable for on-the-fly computations of the score thresholds.

The new algorithms described in this paper are implemented as part of the PoSSuM software distribution. This is available free of charge for non-commercial research institutions. For details, see [24]. Parts of this contribution appeared as [25] in proceedings of GCB2004.

Results

PSSMs and lookahead scoring: LAsearch

A PSSM is an abstraction of a multiple alignment of related sequences. We define it as a function M : [0, m - 1] × <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M1','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M1">View MathML</a> → ℝ, where m is the length of M and <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M1','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M1">View MathML</a> is a finite alphabet. Usually M is represented by an m × |<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M1','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M1">View MathML</a>| matrix, see Figure 1 for an example. Each row of the matrix reflects the frequency of occurrence of each amino acid or nucleotide at the corresponding position of the alignment. From now on, let M be a PSSM of length m and let w[i] denote the character of w at position i for 0 ≤ i < m. Further on, w[i..j] denotes the string starting at position i and ending at position j. We define <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M3','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M3">View MathML</a> for a sequence w <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M1','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M1">View MathML</a>m of length m. sc (w, M) is the match score of w w.r.t. M. The score range of a PSSM is the interval [scmin(M), scmax(M)] with <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M4','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M4">View MathML</a> and <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M5','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M5">View MathML</a>. Given a sequence S of length n over alphabet <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M1','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M1">View MathML</a> and a score threshold th, the PSSM matching problem is to find all positions j ∈ [0, n - m] in S and their assigned match scores, such that sc (S[j..j + m - 1], M) ≥ th.

thumbnailFigure 1. Amino acid PSSM. Amino acid PSSM of length m = 10 of a zinc-finger motif. If the score threshold is th = 400, then only substrings beginning with C or V can match the PSSM, because all other amino acids score below the intermediate threshold th0 = th - σ0 = 400 - 398 = 2. That is, lookahead scoring will skip over all substrings which begin with amino acids different from C and V. Here σd, d ∈ [0, m - 1] denotes the maximal score that can be achieved in the last m - d - 1 positions of the PSSM as defined in the text.

A simple algorithm for the PSSM matching problem slides along the sequence and computes sc (w, M) for each w = S [j..j + m - 1], j ∈ [0, n - m]. The running time of this algorithm is <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M2','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M2">View MathML</a>(mn). It is used e.g., in the programs FingerPrintScan [8], BLIMPS [4], MatInspector[9], and MATCH [17].

In [12], lookahead scoring is introduced to improve the simple algorithm. Lookahead scoring allows to stop the calculation of sc (w, M) when it is clear that the given overall score threshold th cannot be achieved. To be more precise, we define <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M6','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M6">View MathML</a>, maxd := max{M(d, a) | a <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M1','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M1">View MathML</a>}, and <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M7','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M7">View MathML</a> for any d ∈ [0, m - 1]. pfxscd(w, M) is the prefix score of depth d. σd is the maximal score that can be achieved in the last m - d - 1 positions of the PSSM. Let thd := th - σd be the intermediate threshold at position d. The correctness of lookahead scoring, not shown in [12], is implied by the following Lemma:

Lemma 1 The following statements are equivalent:

(1) pfxscd (w, M) ≥ thd for all d ∈ [0, m - 1],

(2) sc(w, M) ≥ th.

Proof: (1)⇒(2): Suppose that (1) holds. Then <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M8','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M8">View MathML</a> and

<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M9','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M9">View MathML</a>

(2)⇒(1): Suppose that (2) holds. Let d ∈ [0, m - 1]. Then

<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M10','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M10">View MathML</a>

Hence sc(w, M) ≥ th implies <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M11','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M11">View MathML</a>. Since M(h, w[h]) ≤ maxh for h ∈ [0, m - 1], we conclude

<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M12','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M12">View MathML</a>

and hence

<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M13','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M13">View MathML</a>

The Lemma suggests a necessary condition for a PSSM-match which can easily be exploited: When computing sc(w, M) by scanning w from left to right, one checks for d = 0,1,..., m - 1, if the intermediate threshold thd is achieved. If not, the computation can be stopped. See Figure 1 for an example of intermediate thresholds and their implications.

The lookahead scoring algorithm (herein after called LAsearch) runs in <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M2','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M2">View MathML</a>(kn) time, where k is the average number of PSSM-positions per sequence position actually evaluated. In the worst case, k <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M2','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M2">View MathML</a>(m), which leads to the worst case running time of <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M2','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M2">View MathML</a>(mn), not better than the simple algorithm. However, k is expected to be much smaller than m, leading to considerable speedups in practice.

Our reformulation of lookahead scoring and its implementation is the basis for improvements and evaluation in the subsequent sections.

PSSM searching using enhanced suffix arrays: ESAsearch

The enhanced suffix array for a given sequence S of length n consists of three tables suf, lcp, and skp. Let $ be a symbol in <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M1','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M1">View MathML</a>, larger than all other symbols, which does not occur in S. suf is a table of integers in the range 0 to n, specifying the lexicographic ordering of the n + 1 suffixes of the string S$. That is, Ssuf[0], Ssuf[1], ... ,Ssuf[n] is the sequence of suffixes of S$ in ascending lexicographic order, where Si = S[i..n - 1]$ denotes the i-th nonempty suffix of the string S$, for i ∈ [0, n]. See Figure 2 for an example. suf can be constructed in <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M2','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M2">View MathML</a>(n) time [26] and requires 4n bytes.

thumbnailFigure 2. Relationship between enhanced suffix array and suffix tree. The enhanced suffix array consisting of tables suf, lcp, skp (left) and the suffix tree (right) for sequence S = caaaaccacac. Some skp entries are shown in the tree as red arrows: If skp[i] = j, then an arrow points from row i to row j. For clarity, suffixes corresponding to suf[i] are given in table Ssuf[i].

lcp is a table in the range 0 to n such that lcp[0] := 0 and lcp[i] is the length of the longest common prefix of Ssuf[i - 1] and Ssuf[i], for i ∈ [1, n]. See Figure 2 for an example. Table lcp can be computed in linear time given table suf [27]. In practice PSSMs are used to model relatively short, local motifs and hence do not exceed length 255. For searching with PSSMs we therefore do not access values in table lcp larger than 255, and hence we can store lcp in n bytes.

skp is a table in the range 0 to n such that skp[i] := min({n + 1} ∪ {j ∈ [i + 1, n] | lcp[i] > lcp[j]}). In terms of suffix trees, skp[i] denotes the lexicographically next leaf that does not occur in the subtree below the branching node corresponding to the longest common prefix of Ssuf[i - 1] and Ssuf[i]. Figure 2 shows this relation. Table skp can be computed in <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M2','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M2">View MathML</a>(n) time given suf and lcp. For the algorithm to be described we assume that the enhanced suffix array for S has been precomputed.

In a suffix tree, all substrings of S of a fixed length m can be scored with a PSSM by a depth first traversal of the tree. Using lookahead scoring, one can skip certain subtrees that do not contain matches to the PSSM. Since suffix trees have several disadvantages (see the introduction), we use enhanced suffix arrays to search PSSMs. Like in other algorithms on enhanced suffix arrays (cf. [18]), one simulates a depth first traversal of the suffix tree by processing the arrays suf and lcp from left to right. To incorporate lookahead scoring while searching we must be able to skip certain ranges of suffixes in suf. To facilitate this, we use table skp. We will now make this more precise.

For i ∈ [0, n], let vi = Ssuf[i], li = min{m, |vi|} - 1, and di = max({-1} ∪ {d ∈ [0, li] |pfxscd (vi, M) ≥ thd}). Now observe that di = m - 1 ⇔ pfxscm-1 (vi, M) ≥ thm-1 sc (vi, M) ≥ th. Hence, M matches at position j = suf[i] if and only if di = m - 1. Thus, to solve the PSSM searching problem, it suffices to compute all i ∈ [0, n] satisfying di = m - 1. We compute di along with Ci[d] = pfxscd (vi, M) for any d ∈ [0, di]. d0 and C0 are easily determined in <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M2','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M2">View MathML</a>(m) time. Now let i ∈ [1, n] and suppose that di-1 and Ci-1[d] are determined for d ∈ [0,di-1]. Since vi-1 and vi have a common prefix of length lcp[i], we have Ci[d] = Ci-1[d] for all d ∈ [0, lcp[i] - 1]. Consider the following cases:

• If di-1 + 1 ≥ lcp[i], then compute Ci[d] for d ≥ lcp[i] while d li and Ci[d] ≥ thd. We obtain di = d.

• If di-1 + 1 < lcp[i], then let j be the minimum value in the range [i + 1, n + 1] such that all suffixes vi, vi+1,...,vj-1 have a common prefix of length di-1+ 1 with vi-1. Due to the common prefix we have pfxscd(vi-1, M) = pfxscd(vr, M) for all d ∈ [0, di-1 + 1] and r ∈ [i, j - 1]. Hence di-1 = dr for r ∈ [i, j - 1]. If di-1 = m - 1, then there are PSSM matches at all positions suf[r] for r ∈ [i, j - 1]. If di-1 <m - 1, then there are no PSSM matches at any of these positions. That is, we can directly proceed with index j. We obtain j by following a chain of entries in table skp: compute a sequence of values j0 = i, j1 = skp[j0],...,jk = skp[jk-1] such that di-1 + 1 < lcp[j1],...,di-1 + 1 < lcp[jk-1], and di-1 + 1 ≥ lcp[jk]. Then j = jk.

These case distinctions lead to the program ESAsearch (see Figures 3, 4).

thumbnailFigure 3. Algorithm ESAsearch. The algorithm ESAsearch formulated in pseudocode. See text for detailed explanations of the used notions.

thumbnailFigure 4. Function skipchain of the ESAsearch algorithm. Function skipchain computes a chain of entries in table skp to skip certain ranges of suffixes in table suf.

We illustrate the ideas of algorithm ESAsearch, formally described above, with the following example. Let M be a PSSM of length m = 2 over alphabet <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M1','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M1">View MathML</a> = {a, c} with M(0, a) = 1, M(0, c) = 3, M(1, a) = 3, and M(1, c) = 2. For a given threshold of th = 6 we obtain intermediate thresholds th0 = 3 and th1 = 6. To search with M in the enhanced suffix array for sequence S = caaaaccacac as given in Figure 2, we start processing the enhanced suffix array suf top down by scoring the first suffix Ssuf[0] = aaaaccacac$ with M from left to right. For the first character of Ssuf[0] we obtain a score of pfxsc0(Ssuf[0],M)= M(0, a) = 1 which is below the first intermediate threshold th0= 3. Hence we set d0 = -1 and notice that we can skip all suffixes of S that start with character 'a'. Further on, with a lookup in lcp[1] = 3 we find that Ssuf[1] and Ssuf[0] share a common prefix of length 3 and d0 + 1 = -1 + 1 < lcp[1] = 3 (second case described above). The next suffix that may match M with th = 6 is Ssuf[6] = caaaaccacac$. Suffixes Ssuf[1], Ssuf[2],... Ssuf[5] can be skipped since they all share a common prefix with Ssuf[0] of at least length 1. That is, they begin all with character 'a' and would also miss the first intermediate threshold th0 = 3 when scored. We find Ssuf[6] by following a chain of entries in table skp: skp[1] = 2, skp[2] = 3, and skp[3] = 6. When scoring Ssuf[6] we compute pfxsc0(Ssuf[6], M) = M(0,c) = 3 and pfxsc1(Ssuf[6], M) = M(0, c) + M(1, a) = 6 and store them for reuse in C[0] and C[1]. Since d6 = 1 = m - 1 = 1 holds, we report suf[6] = 0 with score sc (Ssuf[6], M) = pfxsc1(Ssuf[6],M) = 6 as a matching position. With lookups in lcp[7] = 2 and lcp[8] = 3 we notice that Ssuf[7] and Ssuf[8] share a common prefix of at least two characters with Ssuf[6]. Hence we report suf[7] = 6 and suf[8] = 8 with score C[1] = 6 as further matching positions. We proceed with the scoring of Ssuf[9]. Since lcp[9] = 1 holds, we obtain the score for the first character 'c' from array C with pfxsc0(Ssuf[9], M) = C[0]. After scoring the second character of Ssuf[9], pfxsc1(Ssuf[9], M) = 5 <th1 = 6 holds and we miss the second intermediate threshold and continue with the next suffix. The last two suffixes Ssuf[10] and Ssuf[11] in suf do not have to be considered since their lengths are smaller than to m = 2 (not counting the sentinel character $) and therefore they cannot match M. We end up with matching positions 0, 6, and 8 of M in S with match score 6. To find these matches, we processed the enhanced suffix array suf top down and scored suffixes from left to right, facilitating the additional information given in tables lcp and skp to avoid rescoring of characters of common prefixes of suffixes and to skip suffixes that cannot match M for the given threshold.

Analysis

The Ci arrays can be stored in a single <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M2','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M2">View MathML</a>(m) space array C as any step i only needs the Ci specific to that step. Ci solely depends on Ci-1, and Ci[0..d - 1] = Ci-1[0..d - 1] holds for a certain d<m, i.e., the first d entries in Ci are known from the previous step, and thus C can be organized as a stack. No other space (apart from the space for the enhanced suffix array) depending on input size is required for ESAsearch, leading to an <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M2','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M2">View MathML</a>(m) space complexity.

The worst case for ESAsearch occurs, if th scmin(M) (M matches at each position in S), and no suffix of S shares a common prefix with any other suffix. In this case lookahead scoring does not give any speedup and every suffix must be read up to depth to m, leading to an <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M2','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M2">View MathML</a>(nm) worst case time complexity. This is not worse but also not better than the complexity for LAsearch. Next we show that, independent of the chosen threshold th, the overall worst case running time boundary for ESAsearch drops to <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M2','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M2">View MathML</a>(n + m) under the assumption that

n ≥ |<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M1','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M1">View MathML</a>|m + m - 1     (1)

holds.

The shorter the common prefixes of the neighboring suffixes, the slower ESAsearch runs. Thus to analyze the worst case, we have to consider sequences containing as many different substrings of some length q as possible. Observe that a sequence can contain at most |<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M1','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M1">View MathML</a>|q different substrings of length q > 0, independent of its length. To analyze the behavior of ESAsearch on such a sequence, we introduce the concept of suffix-intervals on enhanced suffix arrays, similar to lcp-intervals as used in [18].

Definition 1 An interval [i, j], 0 ≤ i j n, is a suffix-interval with offset ℓ ∈ {0,..., n}, or ℓ-suffix-interval, denoted ℓ-[i, j], if the following three conditions hold:

1. lcp[i] < ℓ

2. lcp[j + 1] < ℓ

3. lcp[k] ≥ ℓ for all k ∈ {x | i + 1 ≤ x j}

An lcp-interval, or ℓ-interval, with lcp-value ℓ ∈ {0,..., n} is a suffix-interval ℓ - [i, j] with i <j and lcp[k] = ℓ for at least one k ∈ {i + 1,..., j}.

Every lcp-interval ℓ - [i, j] of an enhanced suffix array for text S corresponds to an internal node v in a suffix tree for S, and the length of the string spelled out by the edge labels on the path from the root node to v is equal to ℓ. Leaves are represented as singleton intervals, ℓ - [i, j] with i = j. We say that suffix-interval ℓ - [i, j] embeds suffix-interval ℓ+ - [k, l], if and only if ℓ+ > ℓ, i k <l j, and if there is no suffix-interval ℓ' - [r, s] with ℓ < ℓ' < ℓ+ and i r k <l s j. As an example for ℓ-suffix-intervals, consider the enhanced suffix array given in Figure 2. [0, 5] is a 1-suffix-interval, because lcp[0] = 0 < 1, lcp[5 + 1] = 0 < 1, and lcp[k] ≥ 1, for all k, 1 ≤ k ≤ 5. Suffix-interval 2-[3,5] is embedded in 1-[0,5], but 3-[0,1] is not. Consider an enhanced suffix array of a sequence which contains all possible substrings of length q. There are |<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M1','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M1">View MathML</a>| 1-suffix-intervals, |<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M1','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M1">View MathML</a>|2 2-suffix-intervals, and so on. Consequently, up to depth q, there are a total of

<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M14','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M14">View MathML</a>

ℓ-suffix-intervals (1 ≤ ℓ ≤ q). This corresponds to the number of internal nodes and leaves in a suffix tree, which is atomic up to at least depth q under our assumptions.

Since we are considering sequences that contain all possible substrings of length q, there are |<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M1','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M1">View MathML</a>|dd-suffix-intervals at any depth d, 1 ≤ d q. Let d-[i, j] be a d-suffix-interval. We know that pfxscd (vi, M) is a partial sum of pfxscq (vi, M), and because vi[0.. d - 1] = vi + 1 [0..d - 1] = ... = vj [0.. d - 1], pfxscd(vi, M) is also a partial sum of pfxscq (vk, M) for i k j. That is, after ESAsearch has calculated pfxscd(vi, M) at depth d, at any suffix-interval (d + 1) - [r, s] embedded in d-[i, j] it suffices to only calculate the "rest" of pfxscq (vk, M). At any depth d, the algorithm calculates pfxscd+1 (vr, M) = pfxscd (vi, M) + M(d, vr[d]), meaning that all prefix scores at depth d + 1 in a d-suffix-interval can be computed from the prefix scores at depth d by |<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M1','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M1">View MathML</a>| matrix look-ups and additions as there are |<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M1','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M1">View MathML</a>| embedded (d + 1)-suffix-intervals. There are |<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M1','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M1">View MathML</a>|d d-suffix-intervals at depth d. Hence, it takes ESAsearch a total of |<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M1','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M1">View MathML</a>|d·|<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M1','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M1">View MathML</a>| matrix look-ups and additions to advance from depth d to d + 1, and thus we conclude that the algorithm requires a total of <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M2','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M2">View MathML</a>(Eq) operations to compute all scores for all substrings of length q.

Suppose that ESAsearch has read suffix vi in some step up to depth q - 1 such that character vi[q - 1] is the last one read. If lcp[i + 1] ≥ q holds, then the algorithm has found a suffix-interval q-[i, j] with a yet unknown right boundary j, otherwise j = i. ESAsearch reports all suf[k] with k ∈ [i, j] as matching positions by scanning over table lcp starting at position i until lcp[k] < lcp[i] (such that it finds j = k - 1), and continues with suffix vk at depth lcp[k]. Hence processing such a suffix-interval requires one matrix look-up and addition to compute the score, and j - i + 1 steps to report all matches and find suffix vk. Since suffix-intervals do not overlap, the total length of all suffix-intervals at depth q can be at most n, so the total time spent on reporting matches is bounded by n.

There are three cases to consider when determining the time required for calculating the match scores for a PSSM of length m. Let p : = m - q.

1. If p = 0 (⇒ m = q), then the time required to calculate all match scores is in <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M2','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M2">View MathML</a>(Eq) as discussed above.

2. If p < 0 (⇒ m<q), then none of the m-suffix-intervals are singletons since we assumed that the sequence under consideration contains all possible substrings of length q, i.e., there must be suffixes sharing a common prefix of length m, and the time required to calculate all match scores is in <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M2','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M2">View MathML</a>(Em).

3. If p > 0 (⇒ m > q), then every m-suffix-interval can be a singleton, and all prefix scores for the PSSM prefix of length q are calculated in <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M2','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M2">View MathML</a>(Eq) time. However, the remaining scores for the pending substrings of length p must be computed for every suffix longer than q, taking <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M2','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M2">View MathML</a>(np) additional time, and leading to a total <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M2','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M2">View MathML</a>(Eq + np) worst case time complexity for computing all match scores.

Note that a text containing |<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M1','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M1">View MathML</a>|q different substrings must have a certain length, which must be at least |<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M1','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M1">View MathML</a>|q. In fact, a minimum length text that contains all strings of length q has length n = |<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M1','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M1">View MathML</a>|q + q - 1. It represents a de Bruijn sequence[28] without wrap-around, i.e., a de Bruijn sequence with its first q - 1 characters concatenated to its end. Since a de Bruijn sequence without wrap-around represents the minimum length worst case, we infer from Equation (2) that Eq <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M2','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M2">View MathML</a>(n). Hence, if m = q, then it takes <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M2','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M2">View MathML</a>(n) time to calculate all match scores. If m <q, then Em <Eq and thus it takes sublinear time. If m > q, it takes <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M2','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M2">View MathML</a>(n + np) time.

We summarize the worst case running time of ESAsearch for preprocessing a PSSM M of length m, searching with M, and reporting all matches with their match scores, as

<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M2','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M2">View MathML</a>(n + n·max {0, p} + m).

Hence, the worst case running time is <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M2','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M2">View MathML</a>(n + m) for p ≤ 0, implying that this time complexity holds for any PSSM of length m and threshold on any text of length n ≥ |<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M1','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M1">View MathML</a>|m + m - 1, as already stated in Inequality (1).

In practice, large numbers of suffixes can be skipped if the threshold is stringent enough, leading to a total running time sublinear in the size of the text, regardless of the relation between n and m. ESAsearch reads a suffix up to depth m unless an intermediate score falls short of an intermediate threshold, and skips intervals with the same or greater lcp if this happens. Right boundaries of skipped suffix-intervals are found quickly by following the chain of skip-values (see function skipchain in Figure 4). It are these jumps that make ESAsearch superior in terms of running time to LAsearch in practice. The best case is indeed <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M2','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M2">View MathML</a>(|<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M1','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M1">View MathML</a>|) which occurs whenever there is no score in the first row of the PSSM that is greater than th0.

See Figure 5 for examples of enhanced suffix arrays, constructed from texts S and T that consist of all strings of a certain length m over some alphabet. In these enhanced suffix arrays no suffix shares a prefix of length m with any other suffix, forcing ESAsearch to compute scores for each suffix. But with the intermediate scores available while processing the suffixes, it takes exactly Em steps to compute the scores, as can be figured out by manually applying ESAsearch to the depicted enhanced suffix arrays. For S, exactly <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M15','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M15">View MathML</a>, for T, exactly <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M16','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M16">View MathML</a> operations are needed to compute all |<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M1','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M1">View MathML</a>|m n - m + 1 possible scores (and to find all matches since S and T are both de Bruijn sequences without wrap-around). Only a single match is reported per matching substring, leading to Em <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M2','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M2">View MathML</a>(n) operations to be performed during the search phase.

thumbnailFigure 5. Minimum size enhanced suffix arrays for worst case analysis. Enhanced suffix arrays for text S = cagataaccgtcttggc, consisting of all strings of length m = 2 over an alphabet of size 4, and T = ccaaacaccc, consisting of all strings of length m = 3 over an alphabet of size 2.

Performance improvements via alphabet transformations

Inequality (1) provides the necessary condition for <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M2','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M2">View MathML</a>(n + m) worst case running time. We now assume that m in Inequality (1) identifies not the length of a PSSM, but the threshold dependent expected reading depth for some PSSM. We denote this expected depth by m*(th) ≤ m and continue denoting the PSSM's length by m. As seen before, for PSSMs with length m, such that p = m - m*(th), the worst case running time is <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M2','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M2">View MathML</a>(n + n·max {0, p} + m), but the expected running time is <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M2','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M2">View MathML</a>(n + m), as on average we expect p ≤ 0. Inequality (1) with m substituted by m*(th) implies <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M17','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M17">View MathML</a> (n) ≥ m*(th). That is, to achieve linear worst case running time for the amino acid alphabet, m*(th) needs to be very small. For instance, if n = 207, then the search time is guaranteed to be linear in n only for PSSMs with a maximum length of 7, and expected to be linear for PSSMs with expected reading depth of 7. Observe that for |<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M1','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M1">View MathML</a>| = 4, m*(th) needs to be smaller or equal to 15 to achieve linear or sublinear running times. This provides the motivation to reduce the alphabet size by transforming <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M1','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M1">View MathML</a> into a reduced size <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M18','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M18">View MathML</a> such that |<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M18','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M18">View MathML</a>| < |<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M1','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M1">View MathML</a>|.

In practice, for reasonably chosen thresholds th, the performance of ESAsearch mainly depends on the fact that often large ranges of suffixes in the enhanced suffix array can be skipped. This is always the case if we drop below an intermediate threshold while calculating a prefix' score, and if that prefix is a common prefix of other suffixes. In terms of lcp-intervals, this means that we can skip all ℓ-intervals with ℓ ≥ m*(th) on average. In contrast to suffix-intervals, whose total count is in <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M2','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M2">View MathML</a>(n2), size and number of lcp-intervals depend on |<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M1','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M1">View MathML</a>|, as illustrated in Figure 6. We observe that smaller alphabet sizes imply (1) larger ℓ-intervals, and (2) an increasing number of ℓ-intervals for larger values of ℓ. Thus, by using reduced alphabets, we expect to skip larger and touch fewer lcp-intervals under the assumption that the average reading depth remains unchanged. Consequently, we expect to end up with an improved performance of ESAsearch. This raises the question for a proper reduction strategy for larger alphabets like the amino acid alphabet, and how this strategy can be incorporated into ESAsearch.

thumbnailFigure 6. Number of ℓ-intervals for various reduced alphabets. Numbers of ℓ-intervals for ℓ ∈ [1, 20] of different length for various reduced alphabets. We built the enhanced suffix array with sequences from the RCSB protein data bank (PDB) (total sequence length 4,264,239 bytes). The used reduced amino acid alphabets are given in Figure 8. Note that we limited the interval lengths in the figures to 5,000 to prevent distortion.

We now describe how to take advantage of reduced alphabets as fast filters in the ESAsearch algorithm. Let <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M1','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M1">View MathML</a> = {a0, a1,..., ak} and <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M18','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M18">View MathML</a> = {b0, b1,..., bl} be two alphabets, and Φ : <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M1','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M1">View MathML</a><a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M18','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M18">View MathML</a> a surjective function that maps a character a <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M1','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M1">View MathML</a> to a character b <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M18','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M18">View MathML</a>. We call Φ-1(b) the character class corresponding to b. For a sequence S = s1s2 ... sn <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M1','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M1">View MathML</a>n we denote the transformed sequence with <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M19','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M19">View MathML</a> = Φ(s1) Φ(s2) ... Φ(sn) ∈ <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M18','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M18">View MathML</a>n. Along with the transformation of the sequence, we transform a PSSM such that we have a one to one relationship between the columns in the PSSM and the characters in <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M18','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M18">View MathML</a>. We define the transformed PSSM <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M20','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M20">View MathML</a> of M as follows:

Definition 2 Let M be a PSSM of length m over alphabet <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M1','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M1">View MathML</a>, and Φ : <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M1','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M1">View MathML</a><a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M18','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M18">View MathML</a> a surjective function. The transformed PSSM <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M20','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M20">View MathML</a> is defined as a function <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M20','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M20">View MathML</a>: [0, m - 1] × <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M18','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M18">View MathML</a> → ℝ with

<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M20','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M20">View MathML</a> (i, b): = max {M(i, a) | a ∈ Φ-1 (b)}.     (3)

Figure 7 gives an example of the relationship between M and <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M20','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M20">View MathML</a>. <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M19','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M19">View MathML</a> can be easily determined from S in <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M2','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M2">View MathML</a>(n) time, <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M20','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M20">View MathML</a> in <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M2','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M2">View MathML</a>(|<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M1','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M1">View MathML</a>|m) time, given M. We define the set of matches to M on S and <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M20','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M20">View MathML</a> on <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M19','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M19">View MathML</a>, respectively, as

thumbnailFigure 7. PSSM alphabet transformation. In the left PSSM M we used the normal four letter nucleotide alphabet

<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M1','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M1">View MathML</a>

= {A, C, G, T} to describe a transcription factor binding site found in Hox A3 gene promoters. In the right PSSM

<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M20','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M20">View MathML</a>

we used a reduced two letter alphabet

<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M18','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M18">View MathML</a>

= {P, Y} that differs only between purine (adenine or guanine) and pyrimidine (cytosine or thymine) nucleotides. Hence we have two character classes: Φ-1(P) = {A, G} and Φ-1(Y) = {C, T}. Consequently

<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M20','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M20">View MathML</a>

(i, P) = max{M(i, a) | a ∈ {A, G}} and

<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M20','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M20">View MathML</a>

(i, Y) = max{M(i, a) | a ∈ {C, T}} ∀i ∈ [0, 8]

MS := {j ∈ [0, n - m] | sc (S[j..j + m - 1], M) ≥ th}

<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M21','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M21">View MathML</a> := {j ∈ [0, n - m] | sc (<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M19','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M19">View MathML</a>[j..j + m - 1], <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M20','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M20">View MathML</a>) ≥ th}.

Now observe that we can use matches of <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M20','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M20">View MathML</a> on <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M19','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M19">View MathML</a>, for the computation of matches of M on S, since MS <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M21','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M21">View MathML</a>. We prove that MS <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M21','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M21">View MathML</a> holds for all th ∈ [scmin (M), scmax(M)] by proving the more general statement given in the following Lemma.

Lemma 2 sc (w, M) ≤ sc (<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M22','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M22">View MathML</a>, <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M20','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M20">View MathML</a>) holds for all w <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M1','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M1">View MathML</a>m.

Proof:

<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M23','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M23">View MathML</a>

Thus the following implications follow directly

sc (w, M) ≥ th sc (<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M22','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M22">View MathML</a>, <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M20','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M20">View MathML</a>) ≥ th

i MS i <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M21','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M21">View MathML</a>

and we conclude: MS <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M21','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M21">View MathML</a> holds for th ∈ [scmin (M), scmax (M)].

Hence we can search with <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M20','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M20">View MathML</a> in <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M19','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M19">View MathML</a> prefiltering of matches to M in S, profiting of longer and larger ℓ-intervals in <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M19','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M19">View MathML</a> by extending algorithm ESAsearch as follows:

(1) Transform S into <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M19','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M19">View MathML</a> and build the enhanced suffix array for <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M19','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M19">View MathML</a>;

(2) Construct <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M20','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M20">View MathML</a> from M;

(3) Compute <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M21','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M21">View MathML</a> by searching with <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M20','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M20">View MathML</a> on the enhanced suffix array of <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M19','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M19">View MathML</a> using algorithm ESAsearch;

(4) For each i <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M21','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M21">View MathML</a> re-score match with σ = sc (S[i..i + m - 1], M), and report i and σ if and only if σ th.

As a further consequence of Definition 2 the maximum score values in each row of M and <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M20','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M20">View MathML</a> and thus the intermediate thresholds remain unchanged in the transformation process. Unfortunately the necessary PSSM transformation accompanying alphabet size reduction affects the expected reading depth m*(th) in such a way that it increases with more degraded alphabets, and therefore reduces the expected performance improvement. Due to maximization according to Equation (3) the matrix values in <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M20','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M20">View MathML</a> increase and we expect a decreased probability of falling short of an intermediate threshold early. Observe that there is a trade-off between increased expected reading depth and increased lcp-interval sizes at low reading depths. Therefore it is desirable to minimize the effect of maximization by grouping PSSM columns with similar score values, i.e., highly correlated columns. Since PSSMs reflect the properties of the underlying multiple alignment, we expect correlations of PSSM columns according to biologically motivated symbol similarities. Hence character correlation is the motivation for our alphabet reduction strategy.

Reduced amino acid alphabets

It is well known that various of the naturally occurring amino acids share certain similarities, like similar physiochemical properties. Accordingly, the complexity of protein sequences can be reduced by sorting these amino acids with similarities into groups and deriving a transformed, reduced alphabet [29]. These reduced alphabets contain symbols that represent a specific character class of the original alphabet. Since PSSMs and the sequences to be searched have to be encoded over the same alphabet, we are more interested in a single reduced alphabet suitable for all PSSMs under consideration, than in PSSM-specific reduced alphabets. The latter implies an unacceptable overhead of index generation for sequences over PSSM-specific alphabets, even though it may result in a lower expected reading depth. The basis for our reduction of the 20-letter amino acid alphabet to smaller alphabets are correlations indicated by the BLOSUM similarity matrix as described in [30]. That is, amino acid pairs with high similarity scores are grouped together (see Figure 8 for an example). Let a and b be two amino acids and Y a 20 × 20 score matrix, then a measure of amino acid correlation ca,b between a and b can be defined as

thumbnailFigure 8. Schemes for amino acid alphabet reduction. Reduction of the amino acid alphabet into smaller groups. Amino acid pairs are iteratively grouped together based on ther correlations ca,b (see text for the definition of ca,b), starting with the most correlated pairs, until al amino acids are divided into the desired number of groups. Here we used BLOSUM50 similarities for the determination of ca,b. Observe that, hydrophobic amino acids, especially (LVIM) and (FYW) are conserved in many reduced alphabets. The same is true for the polar (ST), (EDNQ), and (KR) groups. The smallest alphabet contains two groups that can be categorized broadly as hydrophobic/small (LVIMCAGSTPFYW) and hydrophilic (EDNQKRH).

<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M24','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M24">View MathML</a>

and amino acid pairs can be iteratively grouped together according to their correlations, starting with the most correlated pairs, until all the amino acids are divided into the desired number of groups.

Finding an appropriate threshold for PSSM searching: LazyDistrib

Probabilities and expectation values

The results of PSSM searches strongly depend on the choice of an appropriate threshold value th. A small threshold may produce a large number of false positive matches without any biological meaning, whereas meaningful matches may not be found if the threshold is too stringent. PSSM-scores are not equally distributed and thus scores of two different PSSMs are not comparable. It is therefore desirable to let the user define a significance threshold instead. The expected number of matches in a given random sequence database (E-value) is a widely accepted measure of the significance. We can compute the E-value for a known background distribution and length of the database by exhaustive enumeration of all substrings. However, the time complexity of such a computation is <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M2','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M2">View MathML</a>(|<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M1','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M1">View MathML</a>|mm) for a PSSM of length m. If the values in M are integers within a certain range [rmin, rmax] of size R = rmax - rmin + 1, then dynamic programming (DP) methods (cf. [12,21,22]) allow to compute the probability distribution (and hence the E-value) in <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M2','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M2">View MathML</a>(m2R|<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M1','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M1">View MathML</a>|) time.

In practice the probability distribution is often not exactly, or completely calculated due to concerns of speed. E.g., in the EMATRIX system [12] score thresholds are calculated and stored for probability values in the interval π = 10-1, 10-2,..., 10-40 only. Consequently, the user can only specify one of these p-value cutoffs. For the calculation of the p-value from a determined match score, EMATRIX uses log-linear interpolation on the stored thresholds. A different, commonly used strategy to derive a continuous distribution function uses the extreme value distribution as an approximation [31-33] of high scoring matches.

Even though it is widely accepted that high-scoring local alignment score distributions of the popular position independent scoring systems PAM and BLOSUM can be well approximated by an extreme value distribution, this cannot be generalized for arbitrary PSSMs.

To check whether an extreme value distribution is a suitable approximation for the distribution of PSSM match scores, we sampled the match scores of PSSMs arbitrarily chosen from the TRANSFAC and BLOCKS database. We randomly shuffled 1000 human promotor sequences of length 1200, taken from the database of transcriptional start sites (DBTSS) and 1000 protein sequences of length 365 (= average sequence length in Uniprot-Swissprot), respectively, preserving their mono-symbol composition. From the derived random PSSM match scores we took the best score for each sequence and calculated the empirical cumulative distribution function. If the match scores S are extreme value distributed, a X-Y plot with X = S and Y = log(- log(S)) should appear linear, since log<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M25','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M25">View MathML</a> holds. For the TRANSFAC PSSM shown in Figure 9, the X-Y plot clearly indicates that an extreme value distribution is not an appropriate approximation. For PSSM IPB003211A (see Figure 10) from the BLOCKS database, it seems as if the score distribution can be approximated quite well with an extreme value distribution. However, we then still have the problem of adequate parameter estimation for the distribution function. Since we do not make any assumptions about the used PSSMs in our algorithm, neither about the type of scores, nor the score range, a proper approximation of the score distribution of arbitrary PSSMs is not possible, without time consuming simulations. That is why we are more interested in an exact solution and thus we focus on the efficient computation of an exact discrete score distribution.

thumbnailFigure 9. Score distribution of TRANSFAC PSSM M00734. Histogram, cumulative score distribution function, X-Y plot, and normal probability plot of TRANSFAC PSSM M00734 (PSSM length m = 9).

thumbnailFigure 10. Score distribution of BLOCKS PSSM IPB003211A. Histogram, cumulative score distribution, X-Y plot, and normal probability plot of a PSSM taken from the BLOCKS database (Accession: IPB003211A; PSSM length m = 40), describing the UreI protein of Helicobacter pylori, a proton gated urea channel [36].

Calculation of exact PSSM score distributions

While recent publications focus on the computation of the complete probability distribution, what is required specifically for PSSM matching, is computing a partial cumulative distribution corresponding to an E-value resp. p-value specified by the user. Therefore, we have developed a new "lazy" method to efficiently compute only a small fraction of the complete distribution.

We formulate the problem we solve w.r.t. E-values and p-values: Given a user specified E-value η, find the minimum threshold TminE(η, M), such that the expected number of matches of M in a random sequence of given length is at most η. Given a user specified p-value π, find the minimum threshold <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M26','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M26">View MathML</a>(π, M), such that the probability that M matches a random string of length m is at most π. The threshold TminE (η, M) can be computed from <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M26','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M26">View MathML</a>(π, M) according to the equation TminE(π·(n - m + 1), M) = <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M26','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M26">View MathML</a>(π, M). Hence we restrict on computing <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M26','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M26">View MathML</a>(π, M).

Since all strings of length m have a score between scmin (M) and scmax(M), we conclude <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M26','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M26">View MathML</a>(1, M) = scmin (M) and <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M26','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M26">View MathML</a>(0, M) > scmax(M). To explain our lazy evaluation method, we first consider existing methods based on DP.

Evaluation with dynamic programming

We assume that at each position in sequence S, the symbols occur independently, with probability f (a) = (1/n)·|{i ∈ [0, n - 1] |S[i] = a}|. Thus a substring w of length m in S occurs with probability <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M27','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M27">View MathML</a> and the probability of observing the event sc (w, M) = t is <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M28','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M28">View MathML</a>. We obtain <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M26','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M26">View MathML</a>(π, M) by a look-up in the distribution:

<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M26','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M26">View MathML</a>(π, M) = min{t |scmin (M) ≤ t scmax (M), ℙ [sc (w, M) ≥ t] ≤ π}.

If the values in the PSSM M are integers in a range of width R, dynamic programming allows to efficiently compute the probability distribution. The dynamic programming aspect becomes more obvious by introducing for each k ∈ [0, m - 1] the prefix PSSM Mk : [0, k] × <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M1','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M1">View MathML</a> → ℕ defined by Mk (j, a) = M (j, a) for j ∈ [0, k] and a <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M1','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M1">View MathML</a>.

Corresponding distributions Qk (t) for k ∈ [0, m - 1] and t ∈ [scmin (Mk), scmax (Mk)], and Q-1(t), are defined by

<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M29','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M29">View MathML</a>

We have ℙ[sc (w, M) = t] = Qm-1 (t). The algorithm computing Qk determines a set of probability distributions for M0, ..., Mk. Qk is evaluated in <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M2','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M2">View MathML</a>(scmax (M)|<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M1','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M1">View MathML</a>|) time from Qk-1, summing up to <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M2','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M2">View MathML</a>(scmax (M) | <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M1','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M1">View MathML</a>| m) total time. See Figure 11 for an example.

thumbnailFigure 11. Evaluation with dynamic programming. The simple DP scheme computes all probability vectors Q0, Q1, Q2 completely within the green marked area, corresponding to score ranges of prefix PSSMs Mk. In contrast to the simple scheme, the restricted probability computation method computes only the upper end of the probability distribution until the given p-value threshold is exceeded, omitting parts of the green area. In this example we show how to compute the score threshold

<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M26','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M26">View MathML</a>

(π, M) for PSSM M of length m = 3 and a score range of [4,11] corresponding to a given p-value threshold of π =

<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M30','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M30">View MathML</a>

. For simplicity we assume a uniform character distribution of f(A) = f(C) = f(G) = f(T) =

<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M31','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M31">View MathML</a>

. Cells of the matrix that are computed in the step actually under consideration are marked red. In step d = 0, see (A), the algorithm computes Q2(11) recursively for all paths through M that achieve a score of 11, i.e. Q2(11) = Q1(8)·f(G), Q1(8) = Q0(4)·f(G), Q0(4) = Q-1(0)·f(A) = 1·

<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M31','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M31">View MathML</a>

, since AGG is the only path achieving score 11. It follows Q2(11) =

<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M32','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M32">View MathML</a>

. In step d = 1 all paths achieving a score of 11 - d = 10 to determine Q2(10) are computed, see (B). We conclude Q2(10) =

<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M33','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M33">View MathML</a>

. In this step, DP allows to reuse value Q1(8) without recomputation. In step d = 2, see (C) values Q1(7) and Q0(3) can be reused to compute Q2(9) =

<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M34','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M34">View MathML</a>

. In step d = 2 the cumulated probability Q2(11) + Q2(10) + Q2(9) =

<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M35','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M35">View MathML</a>

exceeds the given p-value threshold of π =

<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M30','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M30">View MathML</a>

, and the restricted probability computation method skips the rest of the computation. We obtain a score threshold of th = 10 correponding to π.

If we allow for floating point scores that are rounded to ε decimal places, the time and space requirement increases by a factor of 10ε. Conversely, if all integer scores share a greatest common divisor z, the matrix should be canceled down by z.

Restricted probability computation

In order to find <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M26','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M26">View MathML</a>(π, M) it is not necessary to compute the whole codomain of the distribution function Q = Qm-1. We propose a new method only computing a partial distribution by summing over the probabilities for decreasing threshold values scmax (M), scmax (M) - 1,..., until the given p-value π is exceeded (see Figures 11, 12).

thumbnailFigure 12. Restricted probability computation. Computation of the partial cumulative distribution function. Observe that in order to determine

<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M26','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M26">View MathML</a>

(π, M) for π = 0.3 we do not have to calculate the complete distribution in the score range [scmin(M), scmax(M)]. It is sufficient to calculate only the upper end (green area) starting with scmax(M) until ℙ[X S] ≥ π.

In step d we compute Q (scmax (M) - d) where all intermediate scores contributing to scmax (M) - d have to be considered. In analogy to lookahead scoring, in each row j of M we avoid all intermediate scores below the intermediate threshold thj because they do not contribute to Q(scmax (M) - d). The algorithm stops if the cumulated probability for threshold scmax (M) - d exceeds the given p-value π and we obtain <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M26','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M26">View MathML</a>(π, M) = scmax (M) - d + 1.

Lazy evaluation of the permuted matrix

The restricted computation strategy performs best if there are only few iterations (i.e., <a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M26','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M26">View MathML</a>(π, M) is close to scmax(M)) and in each iteration step the computation of Qk(t) can be skipped in an early stage, i.e., for small values of k. The latter occurs to be more likely if the first rows of M contain strongly discriminative values leading to the exclusion of the small values by comparison with the intermediate thresholds. An example of this situation is given in Figure 1. Since Qk(t) is invariant to the permutation of the rows of M, we can sort the rows of M such that the most discriminative rows come first. We found that the difference between the largest two values of a row is a suitable measure for the level of discrimination since a larger difference increases the probability to remain below the intermediate threshold. Since the rows of M are scanned several times, we save time by initially sorting each row in order of descending score. We divide the computation steps where the step d computes Q(scmax(M) - d): In step d = 0 only the maximal scores maxi, i ∈ [0, m - 1] in each row have to be evaluated.

In step d > 0 all scores M(i, a) ≥ maxi - d may contribute to Q(scmax(M) - d). Since in general a score value M(i, a) ≥ maxi - d also gives contribution to Q(scmax(M) - l) for l > d, we can save time by storing Qi(maxi - l) for l > d, in step d in a buffer and reusing the buffer in steps d + 1, d + 2,.... This allows for the computation of Qk(scmax(M) - d) only based on the buffer and scores M(i, a) = maxi - d while scores M(i, a) > maxi - d, i ∈ [0, m - 1], can be omitted. We therefore have developed an algorithm LazyDistrib employing lazy evaluation of the distribution. That is, given a threshold th, the algorithm only evaluates parts of the DP vectors necessary to determine Qk(th) and simultaneously saves sub-results concerned with score th in an additional buffer matrix Pbuf (instead of recomputing them later, see Figure 13 for an example). This is described by the following recurrence:

thumbnailFigure 13. Probability computation using lazy evaluation ofthe DP matrix. In this example we use the same PSSM M, character distribution, and p-value threshold π =

<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M30','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M30">View MathML</a>

as in Figure 11. However, in each row of the PSSM the scores are sorted in descending order, and the rows are sorted with the most discriminant row coming first (see coloured PSSMs for this relationship). Observe that the LazyDistrib algorithm evaluates the DP vectors non-recursively top-down. Cells computed in the actual step are marked red. In step d = 0 the algorithm computes Q2(11) by evaluating paths through the PSSM contributing to Q2(ll), which is in this example only the high scoring path GGA. Intermediate results of Q0(4), Q1(7), and Q2(11) are collected in buffers Pbuf0(4), Pbuf1(7), and Pbuf2(11) first, and finally copied to the correponding cells in Q. See (A) for the situation after step d = 0 has been completed. In step d = 1, see (B), the algorithm computes Q2(10), starting in row k = 1 with the determination of Pbuf1(6) and Q1(6). That is, Q1(6) = Pbuf1(6) = Q0(4)·f(A) + Q0(4)·f(C) + Q0(4)·f(T) =

<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M36','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M36">View MathML</a>

. Analogously Q2(10) and Pbuf2(10) are computed based on Q1(7) and Q1(6). Additionally Pbuf2(9) is filled for further reuse in subsequent steps d + 1, d + 2,.... We compute Pbuf2(9) = Q1(6)·f(C) =

<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M37','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M37">View MathML</a>

. The algorithm can directly start in row k = 1 with the computation of Q1(6) instead of Q0(3) since a score of 3 cannot be achieved by the first prefix PSSM M0. Only score 4 of M0 contributes to Q2(10), scores 2 and 1 do not. In step d = 2, see (C), the algorithm computes Q2(9), starting in row k = 0. Pbuf2(9) is computed reusing the partial sum calculated in previous steps, such that Pbuf2(9) =

<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M37','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M37">View MathML</a>

+ Q1(7)·f(T) + Pbuf1(5)·f(A) =

<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M34','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M34">View MathML</a>

, and then copied to Q2(9). Pbuf1(4), Pbuf2(8), and Pbuf2(7) are filled based on Pbuf0(2), Q1(6), Pbuf1(5), and Q1(5) for further reuse. After step d = 2 the rest of the computation can be skipped since the cumulated probability Q2(11) + Q2(10) + Q2(9) =

<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M35','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M35">View MathML</a>

exceeds the given p-value π =

<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M30','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M30">View MathML</a>

and we obtain a score threshold of th = 10 corresponding to π.

<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M38','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M38">View MathML</a>

In the present implementation, the algorithm assumes independently distributed symbols. The algorithm can be extended to an order d-Markov model (w.r.t. the background alphabet distribution). This increases the computation time by a factor of |<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M1','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M1">View MathML</a>|d.

Implementation and computational results

We implemented LAsearch, ESAsearch, both capable to handle reduced alphabets, and LazyDistrib in C. The program was compiled with the GNU C compiler (version 3.1, optimization option -03). All measurements were performed on a 8 CPU Sun UltraSparc III computer running at 900 MHz, with 64 GB main memory (using only one CPU and a small fraction of the memory). Enhanced suffix arrays were constructed with the program mkvtree, see [34].

We performed seven experiments comparing different programs for searching PSSMs. Table 1 gives more details on the experimental input for Experiments 1–6. Results are given in Table 2 (Exp. 1–5) and Figure 14 (Exp. 6). For Experiment 7, see Figures 15 and 16. In these experiments ESAsearch performed very well, especially on nucleotide PSSMs, see Experiments 2 and 4. It is faster than MatInspector by a factor between 63 and 1,037, depending on the stringency of the given thresholds. The commercial advancement of MatInspector, called MATCH, was not available for our comparisons, but based on [7] we presume a running time comparable to MatInspector. Compared to LAsearch, ESAsearch is faster by a factor between 17 (MSS = 0.80) and 196 (MSS = 0.95) (see Experiment 2). On larger nucleotide sequences (see Experiment 4) the speedup factors increase, ranging from 58 (MSS = 0.85) to 275 (MSS = 0.95). See Table 1 for the definition of MSS. In the experiments using protein PSSMs, ESAsearch is faster than the method of [13] by a factor between 1.5 and 1.8 (see Experiment 1). This is due to the better locality behavior of the enhanced suffix array compared to a suffix tree. For larger p-values LAsearch performs slightly better than ESAsearch. Increasing the stringency, the performance of ESAsearch increases, resulting in a speedup of factor 1.5 for a p-value of 10-40. We explain this behavior by the larger alphabet size, resulting in shorter common prefixes and therefore smaller skipped areas of the enhanced suffix array. With increasing stringency of the threshold, the expected reading depth decreases, resulting in larger skipped areas of the enhanced suffix array. Compared to the FingerPrintScan program, ESAsearch achieves a speedup factor between 3.8 and 470, see Experiment 3. In comparison to Blimps, the PSSM-searching program of the BLOCKS database, ESAsearch is faster by a factor of 23 (see Experiment 5) for the chosen threshold. In Experiment 6 (see Figure 14), we measured the influence of alphabet reductions on the running time of ESAsearch when using protein PSSMs. Compared to the performance of ESAsearch operating on the normal 20 letter amino acid alphabet a speedup up to factor 2 can be achieved when using a 4 letter alphabet and a p-value cutoff of 10-20. Experiment 7 (see Figures 15 and 16) shows that the expected running time of ESAsearch is sublinear, whereas LAsearch runs in linear time. In a final experiment, we compared algorithm LazyDistrib with the DP-algorithm computing the complete distribution. LazyDistrib shows a speedup factor between 3 and 330 on our test set, depending on the stringency of the threshold (see Table 3).

Table 1. Performed experiments and experimental input.

Table 2. Results of Experiments 1–5.

Table 3. Running times of the LazyDistrib algorithm.

thumbnailFigure 14. Effect of alphabet reduction on the running time of ESAsearch. Experiment 6: Relative deviations of running time of ESAsearch when using reduced alphabets at different levels of stringency. We measured the relative percentage deviation with respect to the running time when using the standard 20 letter amino acid alphabet (= 0%). We searched with 11,411 PSSMs from the PRINTS database (Rel. 38) in the RCSB Protein Data Bank (PDB) with a total sequence length of 4.3 MB. In this example, the maximum performance improvement is achieved for an alphabet of size 4 and a p-value cutoff of π = 10-20.

thumbnailFigure 15. Scaling behaviour of ESAsearch. Experiment 7: Scaling behavior of ESAsearch when searching with 576 TRANSFAC PSSMs on subsets of human chromosome 6 of different sizes and with different matrix similarity cutoff values (MSS). The subsets are prefixes of human chromosome 6 of length 2k for k = 0, 1, 2,..., 7.

thumbnailFigure 16. Scaling behaviour of LAsearch. Experiment 7: Scaling behavior of LAsearch when searching with 576 TRANSFAC PSSMs on subsets of human chromosome 6 of different sizes and with different matrix similarity cutoff values (MSS). The subsets are prefixes of human chromosome 6 of length 2k for k = 0, 1, 2,..., 7.

PoSSuM software distribution

Our software tool PoSSuMsearch implements all algorithms and ideas presented in this work, namely Simplesearch, LAsearch, ESAsearch and LazyDistrib. A user can search for PSSMs in enhanced suffix arrays built by mkvtree from the Vmatch package, as well as on plain sequence data in FASTA, GENBANK, EMBL, or SWISSPROT format. The search algorithm can be chosen from the command line.

PSSMs are specified in a simple plain text format, where one file may contain multiple PSSMs. The alphabet a PSSM refers to, and alphabet character to PSSM column assignments can be specified on a per-PSSM basis for most flexible alphabet support. All implemented algorithms support alphabet transformations. PSSMs can contain integer as well as floating point scores. To prevent rounding errors for integer based PSSMs, PoSSuMsearch uses integer arithmetics for these, resulting in an additional speedup on most CPU architectures. Searching on the reverse strand of nucleotide sequences is implemented by PSSM transformation according to Watson-Crick base pairing. Hence it is sufficient to build the enhanced suffix array for one strand only. This can then be used to search both strands.

The cutoff can be specified as p-value, E-value, MSS (matrix similarity score), or raw score threshold. If only the best matches with the highest scores need to be known, then PoSSuMsearch can be asked to report only the k highest scoring matches without even specifying an explicit cutoff. To do so, the search algorithms dynamically adapt the threshold during the search. When using p- or E-values, the score threshold is determined by either the lazy dynamic programming algorithm introduced in this contribution, or read from file that stores the complete precalculated probability distribution. Background distributions can be specified arbitrarily by the user, or determined from a given sequence database. We provide a tool, PoSSuMdist, to generate a compressed file containing the complete precalculated probability distribution for a set of PSSMs.

PSSM matches can be sorted by specifying a list of sort keys, like p-value, match score, sequence number, and so on. The output formats of PoSSuMsearch print out all available information about a match, either in a human readable format, tab delimited, or in machine readable, XML-based CisML [35]. PoSSuMsearch as well as PoSSuMdist support multi-threading for a further reduction of running time on multi CPU machines.

The PoSSuM software distribution includes the searching tool PoSSuMsearch itself, and additional tools to determine character frequencies from sequence data, for probability distribution calculation, and PSSM format converters for TRANSFAC, BLOCKS, PRINTS, and EMATRIX style PSSMs.

Discussion and conclusion

We have presented a new non-heuristic algorithm for searching with PSSMs, achieving expected sublinear running time. Our analysis of ESAsearch shows that for sequences not shorter than |<a onClick="popup('http://www.biomedcentral.com/1471-2105/7/389/mathml/M1','MathML',630,470);return false;" target="_blank" href="http://www.biomedcentral.com/1471-2105/7/389/mathml/M1">View MathML</a>|m + m - 1 a linear runtime in the worst case is achieved. It shows superior performance over the most widely used programs, especially for DNA sequences. The enhanced suffix array, on which the method is based, requires only 9n bytes. This is a space reduction of more than 45 percent compared to the 17n bytes implementation of [13]. Further on, we developed a systematic concept for alphabet reduction, especially useful on amino acid sequences and PSSMs for gaining additional speedup. Our third main contribution is a new algorithm for the efficient calculation of score thresholds from user defined E-values and p-values. The algorithm allows for accurate on-the-fly calculations of thresholds, and has the potential to replace formerly used approximation approaches. Beyond the algorithmic contributions, we provide a robust, well documented, and easy to use software package, implementing the ideas and algorithms presented in this manuscript.

Availability

The PoSSuM software distribution and its documentation is available precompiled for different operating systems and architectures on [24]. A version of mkvtree is included. A web based version of PoSSuMsearch is available under the same URL.

Authors' contributions

M.B. developed the algorithms presented in this manuscript, and wrote significant parts of the manuscript. R.H. implemented the algorithms, created the software distribution, and contributed to the manuscript. M.B. and R.H. wrote the documentation for the software package. R.G. provided supervision and guidance on the project and provided essential infrastructure. S.K. provided supervision, and contributed to the manuscript. All authors read and approved the final manuscript.

Acknowledgements

The authors thank Sven Rahmann and three anonymous reviewers for comments on the manuscript, Alexander Kel from Biobase GmbH Germany for providing the TRANSFAC PSSMs used in the benchmark experiments, and Jan Krüger for setting up the web interface and integrating PoSSuMsearch in our local web-service environment. M.B. and R.H. were supported by the International NRW Graduate School in Bioinformatics and Genome Research.

References

  1. Gribskov M, McLachlan M, Eisenberg D: Profile Analysis: Detection of Distantly Related Proteins.

    Proc Nat Acad Sci USA 1987, 84:4355-4358. PubMed Abstract | Publisher Full Text | PubMed Central Full Text OpenURL

  2. Hulo N, Sigrist C, Le Saux V, Langendijk-Genevaux PS, Bordoli L, Gattiker A, De Castro E, Bucher P, Bairoch A: Recent improvements to the PROSITE database.

    Nud Acids Res 2004, 32:134-137. Publisher Full Text OpenURL

  3. Attwood TK, Bradley P, Flower DR, Gaulton A, Maudling N, Mitchell AL, Moulton G, Nordle A, Paine K, Taylor P, Uddin A, Zygouri C: PRINTS and its automatic supplement, prePRINTS.

    Nucl Acids Res 2003, 31:400-402. PubMed Abstract | Publisher Full Text | PubMed Central Full Text OpenURL

  4. Henikoff J, Greene E, Pietrokovski S, Henikoff S: Increased Coverage of Protein Families with the Blocks Database Servers.

    Nucl Acids Res 2000, 28:228-230. PubMed Abstract | Publisher Full Text | PubMed Central Full Text OpenURL

  5. Wu T, Nevill-Manning C, Brutlag D: Minimal-risk scoring matrices for sequence analysis.

    J Comp Biol 1999, 6(2):219-235. OpenURL

  6. Sandelin A, Alkema W, Engstrom P, Wasserman W, Lenhard B: JASPAR: an open-access database for eukaryotic transcription factor binding profiles.

    Nucl Acids Res 2004, 32:D91-D94. PubMed Abstract | Publisher Full Text | PubMed Central Full Text OpenURL

  7. Matys V, Fricke E, Geffers R, Gößiling E, Haubrock M, Hehl R, Hornischer K, Karas D, Kel AE, Kel-Margoulis OV, Kloos DU, Land S, Lewicki-Potapov B, Michael H, Munch R, Reuter I, Rotert S, Saxel H, Scheer M, Thiele S, Wingender E: TRANSFAC(R): transcriptional regulation, from patterns to profiles.

    Nucl Acids Res 2003, 31:374-378. PubMed Abstract | Publisher Full Text | PubMed Central Full Text OpenURL

  8. Scordis P, Flower D, Attwood T: FingerPRINTScan: intelligent searching of the PRINTS motif database.

    Bioinformatics 1999, 15(10):799-806. PubMed Abstract | Publisher Full Text OpenURL

  9. Quandt K, Frech K, Wingender E, Werner T: MatInd and MatInspector: new fast and versatile tools for detection of consensus matches in nucleotide data.

    Nucl Acids Res 1995, 23:4878-4884. PubMed Abstract | PubMed Central Full Text OpenURL

  10. Rajasekaran S, Jin X, Spouge J: The Efficient computation of Position Specific Match Scores with the Fast Fourier Transformation.

    J Comp Biol 2002, 9:23-33. Publisher Full Text OpenURL

  11. Freschi V, Bogliolo A: Using sequence compression to speedup probabilistic profile matching.

    Bioinformatics 2005, 21(10):2225-2229. PubMed Abstract | Publisher Full Text OpenURL

  12. Wu T, Nevill-Manning C, Brutlag D: Fast Probabilistic Analysis of Sequence Function using Scoring Matrices.

    Bioinformatics 2000, 16(3):233-244. PubMed Abstract | Publisher Full Text OpenURL

  13. Dorohonceanu B, Nevill-Manning C: Accelerating Protein Classification Using Suffix Trees. In Proc. of the International Conference on Intelligent Systems for Molecular Biology. Menlo Park, CA: AAAI Press; 2000:128-133. OpenURL

  14. Gonnet H: Some string matching problems from Bioinformatics which still need better solutions.

    Journal of Discrete Algorithms 2004, 2(1):3-15. Publisher Full Text OpenURL

  15. Tatusov R, Altschul S, Koonin E: Detection of conserved segments in proteins: Iterative scanning of sequence databases with alignment blocks.

    Proc Nat Acad Sci USA 1994, 91(25):12091-12095. PubMed Abstract | Publisher Full Text | PubMed Central Full Text OpenURL

  16. Henikoff J, Henikoff S: Using substitution probabilities to improve position-specific scoring matrices.

    Bioinformatics 1996, 12(2):135-143. OpenURL

  17. Kel A, Gößling E, Reuter I, Cheremushkin E, Kel-Margoulis O, Wingender E: MATCH: a tool for searching transcription factor binding sites in DNA sequences.

    Nucl Acids Res 2003, 31(13):3576-3579. PubMed Abstract | Publisher Full Text | PubMed Central Full Text OpenURL

  18. Abouelhoda M, Kurtz S, Ohlebusch E: Replacing Suffix Trees with Enhanced Suffix Arrays.

    Journal of Discrete Algorithms 2004, 2:53-86. Publisher Full Text OpenURL

  19. Kurtz S: Reducing the Space Requirement of Suffix Trees.

    Software – Practice and Experience 1999, 29(13):1149-1171. Publisher Full Text OpenURL

  20. Giegerich R, Kurtz S: A Comparison of Imperative and Purely Functional Suffix Tree Constructions.

    Science of Computer Programming 1995, 25(2–3):187-218. Publisher Full Text OpenURL

  21. Staden R: Methods for calculating the probabilities for finding patterns in sequences.

    Comp Appl Biosci 1989, 5:89-96. PubMed Abstract OpenURL

  22. Rahmann S: Dynamic programming algorithms for two statistical problems in computational biology. In Proc. of the 3rd Workshop of Algorithms in Bioinformatics (WABI). LNCS 2812, Springer Verlag; 2003:151-164. OpenURL

  23. Rahmann S, Müller T, Vingron M: On the Power of Profiles for Transcription Factor Binding Site Detection.

    Statistical Applications in Genetics and Molecular Biology 2003., 2(1) OpenURL

  24. Beckstette M, Homann R, Giegerich R, Kurtz S: PoSSuM software distribution. [http://bibiserv.techfak.uni-bielefeld.de/possumsearch/] webcite

    2006. PubMed Abstract | Publisher Full Text OpenURL

  25. Beckstette M, Strothmann D, Homann R, Giegerich R, Kurtz S: PoSSuMsearch: Fast and Sensitive Matching of Position Specific Scoring Matrices using Enhanced Suffix Arrays. In Proc. of the German Conference on Bioinformatics. Volume P-53. GI Lecture Notes in Informatics; 2004::53-64. OpenURL

  26. Kärkkäinen J, Sanders P: Simple Linear Work Suffix Array Construction. In Proceedings of the 13th International Conference on Automata, Languages and Programming. Springer; 2003. OpenURL

  27. Kasai T, Lee G, Arimura H, Arikawa S, Park K: Linear-time Longest-Common-Prefix Computation in Suffix Arrays and its Applications. In 12th Annual Symposium on Combinatorial Pattern Matching (CPM2001). Volume 2089. Springer-Verlag, New York: Lecture Notes in Computer Science; 2001::181-192. OpenURL

  28. de Bruijn N: A Combinatorial Problem.

    Koninklijke Nederlands Akademie van Wetenschappen Proceedings 1946, 49:758-764. OpenURL

  29. Li T, Fan K, Wang J, Wang W: Reduction of protein sequence complexity by residue grouping.

    Protein Engineering 2003, 16(5):323-330. PubMed Abstract | Publisher Full Text OpenURL

  30. Murphy LR, Wallqvist A, Levy R: Simplified amino acid alphabets for protein fold recognition and implications for folding.

    Protein Engineering 2000, 13(3):149-152. PubMed Abstract | Publisher Full Text OpenURL

  31. Castillo G: Extreme Value Theory in Engineering. Academic Press; 1988. OpenURL

  32. Embrechts P, Klüppelberg C, Mikosch T: Modelling Extremal Events. Springer; 1997. OpenURL

  33. Goldstein L, Waterman M: Approximations to profile score distributions.

    J Comp Biol 1994, 1:93-104. OpenURL

  34. Kurtz S: The Vmatch large scale sequence analysis software. [http://www.vmatch.de/] webcite

    2005.

  35. Haverty P, Weng Z: CisML: an XML-based format for sequence motif detection software.

    Bioinformatics 2004, 20(11):1815-1817. PubMed Abstract | Publisher Full Text OpenURL

  36. Weeks D, Eskandari S, Scott D, Sachs G: A H+-gated urea channel: the link between Helicobacter pylori urease and gastric colonization.

    Science 2000, 287:482-485. PubMed Abstract | Publisher Full Text OpenURL