Abstract:
Given an input sequence of data, a rigid pattern is a repeating sequence, possibly interspersed with don&#39;t-care characters. The data can be a sequence of characters or sets of characters or even real values. In practice, the patterns or motifs of interest are the ones that also allow a variable number of gaps (or don&#39;t-care characters): these are patterns with spacers termed extensible patterns. In a bioinformatics context, similar patterns have also been called flexible patterns or motifs. A system according to the invention discovers all the maximal extensible motifs in the input. The flexibility is succinctly defined by a single integer parameter D≧1 which is interpreted as the allowable space to be between 1 and D characters between two successive solid characters in a reported motif.

Description:
CROSS-REFERENCE TO RELATED APPLICATIONS  
       [0001]     Not Applicable.  
       STATEMENT REGARDING FEDERALLY SPONSORED-RESEARCH OR DEVELOPMENT  
       [0002]     Not Applicable.  
       INCORPORATION BY REFERENCE OF MATERIAL SUBMITTED ON A COMPACT DISC  
       [0003]     Not Applicable.  
       FIELD OF THE INVENTION  
       [0004]     The invention disclosed broadly relates to the field of information processing systems, and more particularly relates to the field of systems for detecting patterns in information strings.  
       BACKGROUND OF THE INVENTION  
       [0005]     A rigid motif is a repeating pattern in a string of data comprising a plurality of tokens such as alphabet characters, possibly interspersed with don&#39;t-care characters that has the same length in every occurrence in the input sequence. Pattern or motif discovery in data is widely used for understanding large volumes of data such as DNA or protein sequences.  
         [0006]     Allowing the motifs to have a variable number of gaps (or don&#39;t-care characters), called patterns with spacers or extensible motifs, further increases the expressibility of the motifs. For example, given a string s=abcdaXcdabbcd, m=a.cd is a rigid pattern that occurs twice in the data at positions  1  and  5  in s. In the above example, the extensible motif, where the number of don&#39;t-care characters between a and c of the pattern is one or two, would occur three times at positions  1 ,  5  and  9 . At position  9  the dot character represents two gaps instead of one.  
         [0007]     The task of discovering patterns must be clearly distinguished from that of matching a given pattern in a string of characters or database. In the latter situation, we know what we are looking for, while in the former we do not know what is being sought. Typically, the higher the self similarity (i.e., repeating patterns) in the sequence, the greater is the number of patterns or motifs in the data. Motif discovery on data such as repeating DNA or protein sequences is indeed a source of concern because these exhibit a very high degree of self similarity. The number of rigid maximal motifs could potentially be exponential in the size of the input sequence.  
         [0008]     The problem of a large number of motifs is usually tackled by pre-processing the input, using heuristics, to remove the repeating or self similar portions of the input or using a statistical significance measure. However, due to the absence of a good understanding of the domain, there is no consensus over the right model to use. Thus there is a trend towards model-less motif discovery in different fields. There has been empirical evidence showing that the run time is linear in the output size for the rigid motifs and experimental comparisons between available implementations.  
         [0009]     Consider an example of a rigid pattern (albeit with don&#39;t-care characters) discovery tool that is often inadequate in detecting biologically significant motifs. Fibronectin is a plasma protein that binds cell surfaces and various compounds including collagen, fibrin, heparin, DNA, and actin. The major part of the sequence of fibronectin consists of the repetition of three types of domains, which are called type I, II, and III. The type II domain is approximately forty residues long, contains four conserved cysteines involved in disulfide bonds and is part of the collagen binding region of fibronectin. In fibronectin the type II domain is duplicated. Type II domains have also been found in various other proteins. The fibronectin type II domain pattern has the following form: 
        C...PF.[FYWI].......C-(8,10)WC....[DNSR] [FYW]-(3,5)[FYW].[FYWI]C        
 
         [0011]     The extensible part of the pattern is shown as integer intervals. It is clear that a rigid pattern discovery tool will never capture this as a single domain. Therefore, there is need for a system and method of pattern discovery that overcomes the drawbacks in the prior art.  
       SUMMARY OF THE INVENTION  
       [0012]     Briefly, according to the invention an input string of tokens (e.g., characters) is analyzed for token patterns. A system embodying the invention is based on an inexact suffix tree construction which provides a framework for an output sensitive detection algorithm. 
     
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0013]      FIG. 1  shows an inexact suffix tree for a token string.  
         [0014]      FIGS. 2   a - e  are a flow chart illustrating a method according to the invention.  
         [0015]      FIGS. 3-14  illustrate construction of an inexact suffix tree for a string comprising the character sequence axcdabydaxy.  
         [0016]      FIGS. 15-16  are tables showing the results of using a method according to the invention on a collection of fibronectin sequences.  
         [0017]      FIG. 17  is a small sample output after using the method according to the invention on a collection of fibronectin sequences.  
         [0018]      FIG. 18  is a block diagram of an information processing system using the invention. 
     
    
     DETAILED DESCRIPTION  
       [0019]     To facilitate a clear understanding of the present invention, definitions of terms employed herein will now be given.  
         [0020]     Dot character: The ‘.’ is called a “don&#39;t-care” or a dot character and any other element is called solid. Also, σ will refer to a singleton character or a set of characters from Σ. Let s be a sequence of sets of characters from an alphabet Σ, ‘.’∉Σ. For brevity of notation, a singleton set is not enclosed in curly braces. For example, let Σ={A, C, G, T}, then s 1 =ACTGAT and s 2 ={A,T}CG{T, G} are two possible sequences. The j th  (1≦j≦|s|) element of the sequence is given by s[j]. For instance in the above example s 2 [1]={A,T}, s 2 [2]={C}, s 2 [3]={G} and s 2 (4)={T, G}. Also, if x is a sequence, then |x| denotes the length of the sequence and if x is a set of elements then |x| denotes the cardinality of the set. Hence |s 1 |=6, |s 2 |=4, |s 1 |[1]=1 and |s 2 |[4]= 2 .  
         [0021]     e l           e 2 : We say that e 1           e 2  if and only if el is a don&#39;t-care character or e 1  is a subset of e 2 . For example, if e 1 ={A, C}, e 2 ={A,C,G} and e 3 ={T} are three elements of some sequence, then e 1           e 2  and e 1 /         e 3 .  
         [0022]     Annotated Dot Character, . α : An annotated “.” character is written as . α  where α is a set of non-negative integers {α 1 , α 2 , . . . , α 3 } or an interval α=[α l , α u ], representing all integers between α l , and α u  including α l , and α u . To avoid clutter, the annotation superscript α will be an integer interval.  
         [0023]     Rigid, extensible string: Given a string m, if at least one dot element, is annotated, m is called a extensible string, otherwise m is called rigid.  
         [0024]     Realization: Let m be a extensible string. A rigid string m′ is a realization of m if each annotated dot element, . α  is replaced by l dot elements where l∈α. For example, if m=α.[ 2,4 ]b.[ 3,6 ]cde, then m′=a...b...cde is a realization of m and so is m″=a...b....cde.  
         [0025]     m occurs at l: A rigid string m occurs at position l on s if m[j]         s[l+j) holds for l≦j≦|m|. A extensible string m occurs at position l in s if there exists a realization m′ of m that occurs at 1. If m is extensible then m could possibly occur a multiple number of times at a location on a string s. For example, if s=axbcbc, then m=a.[ 1,3 ]b occurs twice at position  1  as axbcbc and axbcbc.  
         [0026]     Size of m, |m|: If m is rigid, size of m is the number of solid and dot characters in m and is denoted by |m|. If m is extensible and occurs at positions in L m , then |m|=max i  |m′ i | where m′ i  is a realization of m that occurs at i∈L m . Consider s=abcdabeed. Let m 1 =ab, m 2 =ab-d. Then |m 1 |=2 and |m 2 |=max{|ab.d|, |ab..d|}=5.  
         [0027]     k-motif m, location list L m : Given a string s on alphabet Σ and a positive integer k, k≦|s|, a string (extensible or rigid) m is a motif with location list L m =(l 1 ,l 2 , . . . , l p ), if m[l]≠‘.’, m[|m|]≠‘.’ and m occurs at each l∈L m  with p≧k. Also L m  is complete, i.e., if there exists j such that m occurs at j then j∈L m . To avoid clutter, in the rest of the discussion a k-motif will be referred to simply as a motif. The associated k should be clear from the context.  
         [0028]     Realization of a motif m of s: Given a motif m on an input string s with a location list L m , and m′ a realization of the string m, then m′ is a realization of the motif m if and only if there exists some i∈L m  such that m′ occurs at i in s.  
         [0029]     Notice that because of our notation of annotating a dot character with an integer interval (instead of a set of integers), not every realization of the extensible string occurs in the input string. For example for s=axbcbc, p=a .[1,3] b is a extensible motif on s. p′=a..b is a realization of the string p but not of the motif p since p′ does not occur in s. In the remaining discussion we will use this stricter definition of motif realization unless otherwise specified.  
         [0030]     m 1           m 2 : Given two motifs m 1  and m 2  on s m l           m 2  holds if at each occurrence i on s, the realization m′ 1  of motif m 1  at i there exists a realization m′ 2  of motif m 2  at i such that m′ 1  [j]         m 2  [j], 1≦j≦l where l=max |m′ 1 |, |m′ 2 |. For example, let m 1 =AB..E and m 2 =ABC.E.G occurring at position  1  of string s=ABCXEYGXXABYYEABCYEYG. Then m 1           m 2  at position  1 , and m 2           m 1  at position  1 .  
         [0031]     Sub-motifs of motif m: Given a motif m let m[j 1 ], m[j 2 ], . . . m[j l ] be the l solid elements in the motif m. Then the sub-motifs of m are given as follows: for every j i , j t , the sub-motif m[j i  . . . j t ] is obtained by dropping all the elements before (to the left of) j i  and all elements after (to the right of) j t  in m.  
         [0032]     Maximal Motif: Let m 1 , m 2 , . . . , m k  be the motifs in a string s. A motif m i  is maximal in composition if and only if there exists no m l , l≠i with L mi =L ml ., and m i           m l . A motif m i , maximal in composition, is also maximal in length if and only if there exists no motif m j , j≠i, such that m i  is a sub-motif of m j  and |L mi |=|L mj |. A maximal motif is maximal both in composition and in length.  
         [0033]     Cell: Given s, a cell is the smallest substring in any pattern on s, that has exactly two solid characters: one at the start and the other at the end position of this substring.  
         [0034]     m s   1           m s   2 : Given two cell m s   1  and m s   2 , m s   1            if one of the following holds: 
    1. m s   1  has only solid characters and m s   2  has at least one non-solid character     2. m s   2  has the “−” character and m s   1  does not     3. m s   1  and m s   2  have d 1 , d 2 &gt;0 dot characters respectively and d 1 &lt;d 2 .    
 
         [0038]     Clearly, the above defines a partial order on the cells. ⊙-compatible, m l  ⊙m 2 : m l  is ⊙-compatible with m 2  if the last solid character of m l  is the same as the first solid character of m 2 . Further if ml is ⊙-compatible with m 2 , then m=m 1 ⊙m 2  is the concatenation of m l  and m 2  with an overlap at the common end and start character and 
 
 L′   m ={(( x,y ), z )|(( x,l ), z )∈ L′   m1 ,(( l,y ), z )∈ L′   m2  
 
         [0039]     For example if m l =ab and m 2 =b.d then m 1  is ⊙-compatible with m 2  and m l  ⊙m 2 =ab.d. However, m 2  is not ⊙-compatible with m l .  
       Fixed vs. Variable Spacers  
       [0040]     We now discuss two different kinds of spacers, fixed and variable. Given a constant D, for rigid motifs it is to be interpreted that the motif can have fixed  1  or  2  or . . . or D dots between successive solid characters and for extensible motifs can have between 1 to D dot characters between successive solid characters. Also, let R be the set of all rigid maximal motifs and let E be the set of all extensible motifs. The following statement can be easily verified. Given a string s with parameters k and D, then if m r ∈R, then there must be m f ∈ε such that either m r =m f  or m r  is a substring of m r .  
         [0041]     Consider the following two examples. Example 1: If s=aycazxc with k=2, D=2, then ε={a-c} and R={ } with |ε|&gt;|R|. Example 2: Let s=abycpqdefabzcxdef with k=2, D=2. Then R={ab.c, de f} and ε={ab.c-def} with |R|&gt;|ε|. Thus, although in theory there is no relationship between |R| and &gt;|ε|, in practice |R|&lt;|ε|.  
       Inexact Suffix Tree  
       [0042]     We introduce a data structure representing a string, called an inexact suffix tree that efficiently stores all the suffixes of maximal patterns with wild cards (variable or don&#39;t-care tokens). The suffix is inexact in the sense that it contains wild cards.  
         [0043]     Referring to  FIG. 1 , there is shown an inexact suffix tree for a string s=axcdabydaxy and with D=2. A solid circle denotes a leaf node. The root node is labeled Z and the internal nodes are labeled A through I. The unique path from the root node (Z) to the leaf node labeled by integer i, represents a string p         s[i . . . n].  
         [0044]     The inexact suffix tree is built as follows: Given a string s of size n, let $∉Σ. We terminate s with $ as s$. Let D be the maximum number of don&#39;t care characters between any two consecutive solid characters and let k be the minimum number of times a extensible pattern must occur. Consider a rooted tree T with edges labeled by non empty strings with the following properties:  
         [0045]     Each leaf node is labeled by an integer 1≦l≦n. The edge label is a sequence on Σ+{‘.’,‘−’}. All the outgoing edges of the root node are labeled by strings that start with a solid character. No two edges out of a node can be labeled with strings that start at the same solid character. Each edge label can have at most D consecutive ‘.’ character and at most one consecutive ‘.’ character. Also, the last character must be solid. For an internal node i, let R(i) be the set of integer labels of the leaves reachable from i. 
    (a) |R(i)|&gt;1 for all i.     (b) For any two immediate successor internal nodes j 1  and j 2  of i, R(j 1 )≠R(j 2 ).     (c) Consider an internal node i and its immediate successor j and let p=x 1 x 2  . . . x j , where x i ∉Σ or x i  is the don&#39;t-care or ‘−’ character, be the label on edge from i to j. 
        i. R j ⊂R i .     ii. Consider all possible labels p 1 , p 2 , . . . p l  satisfying the constraint  2  above with each having J characters and the same R j , then p 1 , p 2 , . . . p l           p.     iii. There does not exist label p′ satisfying all the constraints above with p′ having less than J characters and a possible successor node j′ of i such that R j ⊂R j′ , and |R j |&gt;1.    
       
 
         [0052]     It is easy to now see that given D, the inexact suffix tree is well defined and is unique. When D=0, τ is also called a suffix tree of s. The tree described above is for k=2 for clarity of exposition. It can be trivially generalized to k&gt;2.  
         [0053]     The unique path from the root node to the leaf node labeled by integer i, represents s[i . . . n] that is obtained by traversing from the root node to the leaf node: concatenating the edge labels of this path gives p and p         s[i . . . n].  
         [0054]     The string associated with the internal node E is p=a..da.y obtained by concatenating the labels on the edges from the root node Z. Given strings p i , 1≦i≦l, their meet is p if and only if p         p i , and there exists no p′ such that p         p′         p i , for all i. We make the following observations about the inexact suffix tree described above. The string obtained by concatenating the edge labels on the unique path from the root to an internal node corresponds to a suffix of a maximal extensible pattern with parameter D and k=2.  
         [0055]     Equivalently, consider the internal node j and let p be the string obtained by concatenating the labels on the edges in the path from the root node to the node j. Then p is the meet of the suffixes s[i . . . n] where i∈R(j).  
         [0056]     The inexact-suffix tree not only suggests a way of detecting all the extensible patterns efficiently but also gives a data structure for storing the extensible patterns for efficient retrieval or matching.  
       Implementation  
       [0057]     An inexact suffix tree is constructed implicitly (in a different order) in an implementation that is discussed herein. Notice that the suffix tree, described above and illustrated in  FIG. 1 , produces all the suffixes of the maximal motifs. In the implementation, we detect the suffixes as early in the process as possible and discard them.  
         [0058]     Referring to  FIG. 2   a , in step  201  we receive an input of a string s of size n and two positive integers, k and D. We begin with a few definitions that will be used in this step. Notice that a cell is the smallest extensible component of a maximal pattern and the string can be viewed as a sequence of overlapping cells. If no don&#39;t care characters are allowed in the motifs then the cells are non-overlapping.  
         [0059]     The algorithm comprises the following steps:  
         [0060]     In step  203  of  FIG. 2   a , we begin by constructing patterns that have exactly two solid characters in them and separated by no more than D spaces or “.” characters. This can be done by scanning the string s from left to right. Further, for each location we store start and end positions of the pattern. In the following example a character could also be referred to as a cell, and a string of characters can also be referred to as cells.  
         [0061]     For example, if s=abzdabyxd and k=2, D=2, then all the patterns generated at this step are: ab, a.z, a..d, bz, b.d, b..a, zd, z.a, z..b, da, d.b, d..y, a.y, a..x, by, b.x, b..d, yx, y.d, xd, each with a list of where they occur. Further L ab ={(1, 2), (5, 6)}, L a.z ={(1, 3)} and so on.  
         [0062]     In the next step  205 , we construct the extensible cells by combining all the characters with at least one dot character and the same start and end solid characters. In step  207  we update the location list to reflect the start and end position of each occurrence. In the previous example, we generate b-d at this step with L b-d ={(2, 4), (6, 9)}.  
         [0063]     In decision  209 , we determine whether the number of times a pattern repeats is less than k. Next in step  211 , if |L m |&lt;k, then we discard all extensible strings m. Continuing the previous example, the only surviving cells are ab, b-d with the following equation: 
 
 L   ab ={(1,2),(5,6)} and L b-d ={(2,4),(6,9)}
 
         [0064]     This step is used only for quick comparison of location lists and is not vital for the working of the algorithm. Nevertheless, in practice it is a time saving step in detecting non maximal motifs (suffixes of maximal motifs).  
         [0065]     In step  213  the input sequence s is broken up into l≧1 subsequences, called zones, Z 1 =s[1, j 1 ], Z 2 =s[j 1 +1, j2] . . . , Z 1 =s[ j−1 +1, j1] Z l+1 =s[j 1 +1, |s|] such that each occurrence of each cell is fully contained in a subsequence. This works best when 1 is much smaller than n.  
         [0066]     We now continue the previous example, l=1 with z 1 =4. Thus Z 1 =abzd and Z 2 =abxyd. In step  215  we associate the zone number with every occurrence of the cell, and add each occurrence to a collection of cells B, this is continued as step  217  checks all the subsequences of the input sequence have been associated with zones. Thus the augmented location lists are 
 
L′ ab ={((1, 2),1),((5, 6),2)} and  L′   b-d ={((2,4),1),((6,9),2)}
 
         [0067]     We make the following statements about the zones that is straightforward to verify.  
         [0068]     Given s, if an occurrence of a cell m s   i  contained in a zone Z i  then the occurrence of a corresponding maximal extensible pattern m i  that contains this occurrence of m s   i  is also contained in Z i . Hence, the corresponding occurrence of every nonmaximal extensible pattern w.r.t m i  is also contained in Z i .  
         [0069]     Consider a maximal extensible motif m i  with |L mi |=K. Let the K-tuple of m i  of only the zone numbers be defined as Z mi =(z 1 , z 2 , . . . , z k ) Then for every nonmaximal motif m′ i  w.r.t. m i  the following holds: Z m′i =Z mi .  
       Iteration Phase  
       [0070]     We begin with a few definitions that will be used in these steps which are used in an iteration function described below. Let B be a collection of extensible strings. If m=Extract (B), then m∈B and there does not exist m′∈B such that m′         m holds.  
         [0071]     The iteration function will have an input of a collection of extensible strings B and an extensible string m′extracted from the collection of extensible strings B and an output of maximal extensible patterns. The output of maximal extensible patterns will be added to a collection of maximal extensible patterns called Result. The following definition is a reiteration of the order of the nodes described in constructing the inexact suffix tree, but stated in terms of cells for clarity of exposition.  
         [0072]     The procedure is best described by the following pseudocode.  
                                                     Result          { };   Iterate(m,B,Result)            B         {m s   1  | m s   1  is a cell};   {               G:1   m′         m;       For each m = Extract(B)   G:2   For each b = Extract(B) with       Iterate(m,B,Result);   G:3   ((b⊙-compatible m′) OR               ((b ⊙-compatible b))       Result           Result ∪ B   G:4    If (m′ ⊙-compatible b)           G:5     mt           m ′⊙ b;           G:6     If siblingInconsistent (m i ) exit;           G:7     If ( | L m′  | = | L b  | ) B         B − {b};           G:8     If ( | L m′  | ≧ k) m′           m t             G:9    If (b ⊙ compatible m′)           G:10     m t            b ⊙ m′           G:11     If SiblingInconsistent(m i ) exit;           G:12     If ( | L m′  | = | L b  | ) B         B − {b};           G:13      If ( | L m′  | ≧ k) m′           m t             G:14    Iterate (m′,B,Result)           G:15    For each r ∈ Result with Z r  = Z m′             G:16     If (m′ is not maximal w.r.t. r)                 return;           G:17     Result           Result ∪ {m′};           }                  
 
         [0073]     Steps G:15-16 detect the suffix motifs of already detected maximal motifs. Result is the collection of all the maximal extensible patterns.  
         [0074]     Referring to  FIG. 2   b , in step  219  we extract an extensible string m from a collection of extensible strings B.  
         [0075]     In the next step  221 , we create a rigid string m′ from the extracted extensible string m.  
         [0076]     In the next step  223 , we extract another extensible string b from the collection of extensible strings B.  
         [0077]     Next in step  225 , we determine whether the rigid string m′ is compatible with the extensible string b, or if the extensible string b is compatible with the rigid string m′. If it is determined that they are not compatible with each other, then we replace the extensible string b with another extensible string extracted from the collection of extensible strings B.  
         [0078]     In step  227 , if both the rigid string m′ and the extensible string b are compatible with each other, then they are concatenated to form a new extensible string m t .  
         [0079]     In step  229 , we then check if the concatenated extensible string m, is non-maximal with respect to its earlier siblings by checking the location lists. This routine corresponds to backtracking, which is always only when the sibling has don&#39;t care characters in it.  
         [0080]     In step  231 , if the concatenated string m, is non maximal, then the method exits to the next iteration (exits the loop).  
         [0081]     Referring to  FIG. 2   c  in step  233 , if the concatenated string extensible string m, is maximal with respect to its siblings, then we check if the number of times the rigid string m′ repeats is equal to the number of times the extracted string b repeats.  
         [0082]     In step  235  if the number of times the rigid string m′ repeats is equal to the number of times the extracted string b repeats is true, then we remove the extracted string b from the collection of extensible strings B.  
         [0083]     In step  237  if the number of times the rigid string m′ repeats is equal to the number of times the extracted string b repeats is false, or after we remove the extracted string b from the collection of extensible strings, we determine if the number of times the rigid string m′ repeats is greater than or equal to the parameter value k.  
         [0084]     If the number of times the rigid string m′ repeats is not greater than or equal to the parameter value k, the method returns to step  233  and repeats the iteration.  
         [0085]     In step  239  if the number of times the rigid string m′ repeats is greater than or equal to the parameter value k, then we convert the concatenated extensible string m t  to a rigid string and replace the rigid string m′ with the converted concatenated string m t . The iteration function in G:14 repeats recursively until collection of cells B is empty. Result is the collection of all the concatenated strings extracted. Result is updated whenever a non-maximal pattern is found.  
         [0086]     In step  241  we continue to function G: 15  when we cannot find any more strings b to concatenate with m.  
         [0087]     Referring to  FIG. 2   d  step  243 , determine if the concatenated rigid string m′ is not maximal with respect to the extracted pattern r.  
         [0088]     If the concatenated rigid string m′ is not maximal with respect to the extracted pattern r, then we return to G:15.  
         [0089]     In step  244  we determine if there are any remaining patterns r in the collection of results Results to extract.  
         [0090]     In step  245  if there are no remaining patterns r in the collection of results Results, then we add the concatenated rigid string m′ to the collection of results Results.  
         [0091]     If there are remaining patterns r in the collection of results Results, then continue to extract from the collection of results Results by returning to step  241 . Once the iteration function has completed, we continue by constructing an inexact tree from the collection of results Results.  
         [0092]     In step  247  we begin by extracting the first pattern from the collection of results.  
         [0093]     In step  249  we create a root node from the first character in the extracted pattern.  
         [0094]     Next, in step  251 , we then continue by ordering lower level nodes from left to right of the root node starting with the patterns with no dot characters on the left, to the patterns with up to the parameter D number of dot characters. This step generates a tree with a single lower level, as shown in  FIG. 3 .  
         [0095]     In step  253  of  FIG. 2   e , then perform a depth first traversal of each node starting with the left most node and continuing to the right. This step is illustrated in  FIG. 4  for the first node on the left and continues as shown in  FIG. 5  with the next node to the right.  
         [0096]     The tree construction involves some limited backtracking. In step  255 , the backtracking is always only one level deep and it occurs when the edge label has don&#39;t care characters in it. For example if the edge label is “.a”, then the other siblings of this node are examined to see if the don&#39;t-care character is required. This step is illustrated in  FIG. 6 .  
         [0097]     In step  257  we eliminate the identified node from the tree if the backtracking identifies an edge to the left which already contains the pattern. Otherwise we keep the node and perform a depth first traversal as in step  253  as shown in  FIG. 7  and  FIG. 8 .  FIG. 9  and  FIG. 10  also show a node that does not get eliminated because of sibling inconsistencies.  
         [0098]     Step  259  determines if there are any remaining nodes to be checked for inconsistencies. If so, then we continue to step  261 , which checks the next node to the right. If there are no further nodes that need to be checked we continue to step  263 , which removes all edges that lead to leaf nodes, which is shown in  FIG. 11 .  
         [0099]     Step  265  checks if there are nodes remaining that have more than one outgoing edge.  FIG. 13  shows the rightmost node has an outgoing edge.  
         [0100]     In step  267  if there are nodes with more than one outgoing edge then the outgoing edge is consolidated to a single outgoing edge, as shown in  FIG. 14 .  
         [0101]     Step  269  completes the construction of the inexact suffix tree.  FIG. 14  is a complete inexact suffix tree.  
         [0102]     Allowing motifs to have a variable number of gaps (or don&#39;t-care characters), i.e., patterns with spacers or extensible motifs, considerably increases the expressibility of the motifs. It is likely that some information missed by rigid motifs is captured by the extensible motifs. The invention is an implementation of an extensible motif discovery algorithm that guarantees the detection of every extensible pattern. One of the directions being currently investigated is to use the method according to the invention to detect extensible patterns in an unsupervised manner on protein sequence databases, and then use suitable pruning techniques to compare the detected patterns with known motifs.  
         [0103]     Referring to  FIG. 15 , there is shown a table showing the output of a small sample, wherein the input data is a collection of fibronectin sequences with D=7 and k=2. The first column gives the number of occurrences of the motif shown in the third column; the second column gives the number of distinct sequences in which the motif appears and the last column gives the occurrence in the format (s: i l  i 2 ), where s is the sequence number and the motif starts at i l  ending at i 2 .  
         [0104]     Referring to  FIG. 16 , there is shown a table wherein the input data is a collection of fibronectin sequences with D=7 and k=2. A small sample output is shown in the table. The first column gives the number of occurrences of the motif shown in the third column; the second column gives the number of distinct sequences in which the motif appears. This version uses homologous grouping of the amino acid bases shown in square brackets. The occurrence lists have been removed to avoid clutter.  
         [0105]     Referring to  FIG. 17 , there is shown a table wherein for a small sample output, the input data is a collection of fibronectin sequences with D=7 and k=2. Here the gaps are annotated: −(i 1 , i 2 ), which indicates that the number of gaps are between i 1  and i 2  in the occurrences in the input.  
         [0106]     The system of  FIG. 18  is useful on primarily biological data such as DNA and protein sequences. However the generality of the system makes it equally applicable in other data mining, clustering, and knowledge extraction applications. The system comprises an input/output device  1806 , a CD Drive  1808 , a central processing unit  1802 , and a memory unit  1804 . The memory unit  1804  further comprises an operating system  1812 , and an application  1814 . The input/output device further comprises a network interface  1807 .  
         [0107]     Therefore, while there has been described what is presently considered to be the preferred embodiment, it will be understood by those skilled in the art that other modifications can be made within the spirit of the invention.