Research Article

SimpLiFiCPM: A Simple and Lightweight Filter-Based Algorithm for Circular Pattern Matching

Algorithm 2

Reduction of search space in a text string using Procedure ECPS_FT.
() Procedure , 1 : 
()  CALL  ECPS_FT 1 : 
()  save the return value of Observations 16 for further use here
()  define an array of size 4 to keep fixed value of A, C, G, T
()  initialize fixed array to
()  
()  for to do
()   calculate different filtering values in via Observations 16 and make a running sum
()  end for
()    if 16 observations values of  :  vs 16 observations values of 1 :  have a match then
()                     Found a filtered match
()   Output to file
()   
()    end if
()    for to do
()   calculate different filtering values in 1 :  via Observations 16 by subtracting th value along with
     wrapped value and adding th value and new wrapped value to the running sum
()   if 16 filtering values of 1 :  vs 16 filtering values of have a match then
()                     Found a filtered match
()    if then
()     Output an end marker $ to file
()    end if
()    if then
()     if then
()      
()     else
()      
()     end if
()     Output to file  : 
()     lastIndex
()    end if
()  end if
()  end for
() end procedure