Abstract:
This invention relates to the quality scores of bases produced from high throughput genomic sequencing, in particular to transforming the quality scores for improved compressibility. A method for transforming these quality scores is described whereby a quality score is modified by utilising a Bayesian model based on Coding Theory combined with search results from a genomic corpus. A related method is described for efficient searching for a Read in a genomic corpus so as to find all matching symbols up to a given Hamming-distance or Edit-distance.

Description:
TECHNICAL FIELD 
       [0001]    The present disclosure relates to methods of transforming and compressing genomics data, in particular to quality score values of sequencing data. More specifically, the present disclosure concerns a method of using Bayesian probability and Coding theory to boost high throughput sequencing quality score information. The present disclosure concerns the use of this method in compressing information that contains or is related to gene sequences. Furthermore, the present disclosure relates to software products recorded on machine readable data storage media, wherein the software products are executable on computing hardware for implementing aforesaid methods. 
       BACKGROUND 
       [0002]    An approach incorporating insights from Coding Theory is used to boost the signal of bases in High Throughput Sequencing (HTS) outputs according to a conservative prior and Bayesian model. The resultant boosted quality scores are a more accurate representation of the confidence of base calls in each Read, and can be better compressed. Unlike lossy compression schemes that approximate or throw out quality score information, the quality scores from this approach are boosted according to a robust and conservative Coding Theory model. The side-effect is that most quality scores are pushed beyond the saturation point of the Phred scheme resulting in high compression ratios. Importantly, this Bayesian approach does not modify the quality scores of bases unless there is a robust statistical basis for doing so. Instead it improves the underlying quality score of the HTS data under a conservative prior, with improved compression as a side-effect. 
         [0003]    In the ordinary case, Coding Theory describes how one can communicate symbols over a noisy communication channel to recover the original symbol. Applying Coding Theory allows one to practically separate out signal from noise utilising a Bayesian approach. The Hamming Distance is used to determine the likelihood that the signal received on the other end corresponds to one symbol versus another. The larger the Hamming Distance between all other symbols, the more likely it is that a symbol can be recovered on the other end and separated from noise. Indeed, the ability of a symbol to tolerate and separate noise grows exponentially with its Hamming Distance to other symbols. 
         [0004]    Therefore, there exists a need for an improved method for transforming quality scores of bases in genomic sequences, in order to improve the quality and compressibility of data. 
       SUMMARY 
       [0005]    According to a first aspect of the invention there is provided a method of transforming quality scores of bases in a Read of sequence data so as to improve compressibility of quality score data. The method comprises determining a distance to search in a genomic corpus; performing a search using the Read on the given corpus with the given distance; performing calculations based on search results to adjust the quality scores of bases in the Read. Optionally, a fixed value of the search distance can be pre-selected and used instead of determining a distance to search. 
         [0006]    In preferred embodiments of this method, the search is based on a Hamming-distance or edit-distance search. 
         [0007]    In preferred embodiments of this method, quality scores are adjusted using a calculation that utilises a Bayesian estimation of the likelihood that a base in the read has a sequencing error. 
         [0008]    Optionally, the calculation in the method utilises the existing quality score of the genomic sequence base that is specified in the genomic sequence read. 
         [0009]    Optionally, the calculation in the method utilises estimations of the probability of mutation between the corpus and the sample underlying the genomic sequence read. 
         [0010]    In preferred embodiments of this method, the corpus includes a reference genome for the genomic sequence read. 
         [0011]    According to a second aspect of the invention, there is provided a method for partitioning a sequence read into a multiplicity of slots, the number of slots being determined based on the search distance, and performing a lookup operation on each said slot into a corpus. The candidate results from each said slot are finally combined together. 
         [0012]    In preferred embodiments of this method, the determination of the number of slots utilises the Pigeonhole Principle. 
         [0013]    In preferred embodiments of this method, the combined results are filtered so as to exclude those not within the determined search distance. 
         [0014]    In preferred embodiments of this method, the lookup operation is performed according to an index for candidates within the corpus. 
         [0015]    In other embodiments of this method, the slots are not required to have a fixed width. 
         [0016]    In other embodiments of this method, the index contains a primary index, and where the lookup operation involves partitioning the slot into a fixed-width primary search key and non-fixed width secondary search key; utilising the primary index and primary key for the primary search, the result of which is then utilised for the secondary search using the secondary search key. The secondary search can optionally utilise a binary traversal of sorted values to find matching candidates. 
     
    
     
       DESCRIPTION OF THE DIAGRAMS 
         [0017]    Embodiments of the present disclosure will now be described, by way of example only, with reference to the following diagrams wherein: 
           [0018]      FIG. 1  is a schematic illustration of dividing a symbol search into multiple slot lookup searches 
           [0019]      FIG. 2  is a schematic illustration of an individual slot lookup search 
       
    
    
     DETAILED DESCRIPTION OF EMBODIMENTS 
       [0020]    In an embodiment, HTS can be recast and modelled utilising Coding Theory. The transmission model can be based on symbols originating (transmitted) from a corpus (for humans, the corpus may simply be the human reference genome but can be any other representative human genome corpora) that undergoes noise in the form of mutations to form the sample genome, which then undergoes sequencing that introduces further noise in the form of Read errors the result of which is the raw sequencing data (received symbols). In this case the noisy medium has two parts—mutation and sequencing. In the first instance, this approach can ignore indels (insertions and/or deletions—as mutations or as a source of Read errors). For the human genome, the dominant source of variation is due to base changes rather than indels, and the dominant error in Illumina sequencing machines is due to misread bases rather than indels. Thus the type of noise can be considered to primarily be due to base changes, however indels can also be handled in the extended instance. 
         [0021]    A Reference Genome (or corpus in general) is considered, which due to mutation with probability m forms a Sample Genome (this could be the genome of a particular individual that is sequenced). From this Sample Genome multiple n-mers are randomly constructed which are then sequenced with error probability ε to form a Read. Each of these n-mers can be cast back to an equivalent n-mer on the Reference Genome. Reference Genome n-mers can represent our collection of symbols, and the noisy medium encapsulates the errors introduced at all the stages up to producing the Read. Conservative values are used for each of these stages. The medium has a combined noise probability of μ≡m+ε− 4/3mε. To a first order this is merely the sum of the individual error processes (m+ε), but to a second order it can also take into account mutations that have been incorrectly sequenced as the original unmutated version. 
         [0022]    One can construct ˜3.2 billion symbols of n-mers from the ˜3.2 billion bases in the human genome. If these bases were truly random, the average Hamming symbol distance would be expected to be ¾n for any n-mer. However, the human genome is most certainly not random. To overcome this, the treatment of nearby symbols is separated from more distant background symbols. Upon transmitting a symbol, the probability that it would arrive as a particular symbol with Hamming Distance B is: 
         [0000]      μ B (1−μ) n . . . B  
 
         [0023]    Naming Convention: 
         [0024]    n—number of bases in a Read (may vary from Read to Read) 
         [0025]    S—an n-mer Read symbol 
         [0026]    R k —reference n-mer symbol k 
         [0027]    G k —true Sample Genome n-mer symbol k 
         [0028]    S j —base j of n-mer Read 
         [0029]    ε j —Read error for base j of n-mer Read 
         [0030]    R kj —base j of reference symbol k 
         [0031]    G kj —base j of true Sample Genome symbol k 
         [0032]    Z j —base j of true Sample Genome source symbol corresponding to the Read 
         [0033]    The symbol S corresponds to an n-mer Read. R k  is generated from a reference genome by enumerating all possible n-mers from this reference. It is assumed that there is a true Sample Genome that is derived from the reference genome according to a mutation process with per-base probability of mutation m. Let G k  be the matching enumeration of all possible n-mers from this Sample Genome. 
         [0034]    Based on a Markovian mutation process M (with probability m) and Read error process E (with probability ε): 
         [0000]    
       
         
           
             
               Pr 
                
               
                 ( 
                 
                   
                     S 
                     j 
                   
                   | 
                   
                     R 
                     kj 
                   
                 
                 ) 
               
             
             = 
             
               { 
               
                 
                   
                     
                       
                         
                           
                             
                               ( 
                               
                                 1 
                                 - 
                                 m 
                               
                               ) 
                             
                              
                             
                               ( 
                               
                                 1 
                                 - 
                                 
                                   ε 
                                   j 
                                 
                               
                               ) 
                             
                           
                           + 
                           
                             
                               1 
                               3 
                             
                              
                             m 
                              
                             
                                 
                             
                              
                             
                               ε 
                               j 
                             
                           
                         
                       
                       
                         
                           
                             if 
                              
                             
                                 
                             
                              
                             
                               S 
                               j 
                             
                           
                           = 
                           
                             R 
                             kj 
                           
                         
                       
                     
                     
                       
                         
                           
                             
                               ( 
                               
                                 1 
                                 - 
                                 m 
                               
                               ) 
                             
                              
                             
                               ε 
                               j 
                             
                           
                           + 
                           
                             m 
                              
                             
                               ( 
                               
                                 1 
                                 - 
                                 
                                   ε 
                                   j 
                                 
                               
                               ) 
                             
                           
                           + 
                           
                             
                               2 
                               3 
                             
                              
                             m 
                              
                             
                                 
                             
                              
                             
                               ε 
                               j 
                             
                           
                         
                       
                       
                         
                           
                             if 
                              
                             
                                 
                             
                              
                             
                               S 
                               j 
                             
                           
                           ≠ 
                           
                             R 
                             kj 
                           
                         
                       
                     
                   
                    
                   
                     
 
                   
                    
                   
                     Pr 
                      
                     
                       ( 
                       
                         S 
                         | 
                         
                           R 
                           k 
                         
                       
                       ) 
                     
                   
                 
                 = 
                 
                   
                     ∏ 
                     j 
                   
                    
                   
                       
                   
                    
                   
                     Pr 
                      
                     
                       ( 
                       
                         
                           S 
                           j 
                         
                         | 
                         
                           R 
                           kj 
                         
                       
                       ) 
                     
                   
                 
               
             
           
         
       
     
         [0035]    The Bayes&#39; theorem gives: 
         [0000]    
       
         
           
             
               
                 
                   
                     Pr 
                      
                     
                       ( 
                       
                         
                           R 
                           k 
                         
                         | 
                         S 
                       
                       ) 
                     
                   
                   = 
                     
                    
                   
                     
                       
                         Pr 
                          
                         
                           ( 
                           
                             S 
                             | 
                             
                               R 
                               k 
                             
                           
                           ) 
                         
                       
                        
                       
                         Pr 
                          
                         
                           ( 
                           
                             R 
                             k 
                           
                           ) 
                         
                       
                     
                     
                       
                         ∑ 
                         i 
                       
                        
                       
                         
                           Pr 
                            
                           
                             ( 
                             
                               S 
                               | 
                               
                                 R 
                                 i 
                               
                             
                             ) 
                           
                         
                          
                         
                           Pr 
                            
                           
                             ( 
                             
                               R 
                               i 
                             
                             ) 
                           
                         
                       
                     
                   
                 
               
             
             
               
                 
                   = 
                     
                    
                   
                     
                       Pr 
                        
                       
                         ( 
                         
                           S 
                           | 
                           
                             R 
                             k 
                           
                         
                         ) 
                       
                     
                     
                       
                         ∑ 
                         i 
                       
                        
                       
                         Pr 
                          
                         
                           ( 
                           
                             S 
                             | 
                             
                               R 
                               i 
                             
                           
                           ) 
                         
                       
                     
                   
                 
               
             
           
         
       
       
         
           
             
               With 
                
               
                 : 
               
                
               
                   
               
                
               
                 Pr 
                  
                 
                   ( 
                   
                     R 
                     k 
                   
                   ) 
                 
               
             
             = 
             
               1 
               N 
             
           
         
       
     
         [0000]    for N possible n-mers, corresponding to uniform sequencing of a genome. 
         [0036]    Moreover given a particular R k  and S, the probability that a base S j  mismatches the source symbol from the Sample Genome corresponding to the Read Z j  (i.e. is a Read error) can be determined according to: 
         [0000]    
       
         
           
             
               Pr 
                
               
                 ( 
                 
                   
                     
                       
                         S 
                         j 
                       
                       ≠ 
                       
                         Z 
                         j 
                       
                     
                     | 
                     S 
                   
                   , 
                   
                     R 
                     k 
                   
                 
                 ) 
               
             
             = 
             
               { 
               
                 
                   
                     
                       
                         
                           
                             m 
                              
                             
                                 
                             
                              
                             
                               ε 
                               j 
                             
                           
                         
                       
                       
                         
                           
                             3 
                             - 
                             
                               3 
                                
                               
                                   
                               
                                
                               m 
                             
                             - 
                             
                               3 
                                
                               
                                 ε 
                                 j 
                               
                             
                             + 
                             
                               4 
                                
                               
                                   
                               
                                
                               m 
                                
                               
                                   
                               
                                
                               
                                 ε 
                                 j 
                               
                             
                           
                         
                       
                     
                   
                   
                     
                       
                         if 
                          
                         
                             
                         
                          
                         
                           S 
                           j 
                         
                       
                       = 
                       
                         R 
                         kj 
                       
                     
                   
                 
                 
                   
                     
                       
                         
                           ε 
                           j 
                         
                          
                         
                           ( 
                           
                             3 
                             - 
                             m 
                           
                           ) 
                         
                       
                       
                         
                           3 
                            
                           
                             ε 
                             j 
                           
                         
                         + 
                         
                           3 
                            
                           
                               
                           
                            
                           m 
                         
                         - 
                         
                           4 
                            
                           
                               
                           
                            
                           m 
                            
                           
                               
                           
                            
                           
                             ε 
                             j 
                           
                         
                       
                     
                   
                   
                     
                       
                         if 
                          
                         
                             
                         
                          
                         
                           S 
                           j 
                         
                       
                       ≠ 
                       
                         R 
                         kj 
                       
                     
                   
                 
               
             
           
         
       
     
         [0037]    Then, removing the dependence on R k , we can determine the Read error per base as: 
         [0000]    
       
         
           
             
               
                 
                   
                     Pr 
                      
                     
                       ( 
                       
                         
                           
                             S 
                             j 
                           
                           ≠ 
                           
                             Z 
                             j 
                           
                         
                         | 
                         S 
                       
                       ) 
                     
                   
                   = 
                     
                    
                   
                     
                       ∑ 
                       k 
                     
                      
                     
                         
                     
                      
                     
                       
                         Pr 
                          
                         
                           ( 
                           
                             
                               
                                 
                                   S 
                                   j 
                                 
                                 ≠ 
                                 
                                   Z 
                                   j 
                                 
                               
                               | 
                               S 
                             
                             , 
                             
                               R 
                               k 
                             
                           
                           ) 
                         
                       
                        
                       
                         Pr 
                          
                         
                           ( 
                           
                             
                               R 
                               k 
                             
                             | 
                             S 
                           
                           ) 
                         
                       
                     
                   
                 
               
             
             
               
                 
                   = 
                     
                    
                   
                     
                       
                         Σ 
                         k 
                       
                        
                       
                         Pr 
                          
                         
                           ( 
                           
                             
                               
                                 
                                   S 
                                   j 
                                 
                                 ≠ 
                                 
                                   Z 
                                   j 
                                 
                               
                               | 
                               S 
                             
                             , 
                             
                               R 
                               k 
                             
                           
                           ) 
                         
                       
                        
                       
                         Pr 
                          
                         
                           ( 
                           
                             S 
                             | 
                             
                               R 
                               k 
                             
                           
                           ) 
                         
                       
                     
                     
                       
                         Σ 
                         i 
                       
                        
                       
                         Pr 
                          
                         
                           ( 
                           
                             S 
                             ≠ 
                             
                               R 
                               i 
                             
                           
                           ) 
                         
                       
                     
                   
                 
               
             
           
         
       
     
         [0038]    With ˜3.2 billion symbols, this calculation is resource intensive if completed by brute force. By recognising that the contribution of reference symbols decreases exponentially according to their Hamming distance from the Read symbol, this operation can be sped up with negligible error. Let L denote the set of local indices s.t. 
         [0000]      ∀ k∈L, |R   k   −S|&lt;B  
 
         [0000]      ∀ k∉L, |R   k   −S|≧B  
 
         [0000]    for some Hamming Distance B. The choice of B is ideally such that: 
         [0000]    
       
         
           
             
               
                 ∑ 
                 
                   i 
                   ∉ 
                   L 
                 
               
                
               
                   
               
                
               
                 Pr 
                  
                 
                   ( 
                   
                     S 
                     | 
                     
                       R 
                       i 
                     
                   
                   ) 
                 
               
             
              
             
               m 
                
               
                   
               
                
               ε 
                
               
                 
                   ∑ 
                   
                     i 
                     ∈ 
                     L 
                   
                 
                  
                 
                     
                 
                  
                 
                   Pr 
                    
                   
                     ( 
                     
                       S 
                       | 
                       
                         R 
                         i 
                       
                     
                     ) 
                   
                 
               
             
           
         
       
       
         
           
             Then 
              
             
               : 
             
           
         
       
       
         
           
             
               Pr 
                
               
                 ( 
                 
                   
                     
                       S 
                       j 
                     
                     ≠ 
                     
                       Z 
                       j 
                     
                   
                   | 
                   S 
                 
                 ) 
               
             
             ≈ 
             
               
                 
                   Σ 
                   
                     k 
                     ∈ 
                     L 
                   
                 
                  
                 
                   Pr 
                    
                   
                     ( 
                     
                       
                         
                           
                             S 
                             j 
                           
                           ≠ 
                           
                             Z 
                             j 
                           
                         
                         | 
                         S 
                       
                       , 
                       
                         R 
                         k 
                       
                     
                     ) 
                   
                 
                  
                 
                   Pr 
                    
                   
                     ( 
                     
                       S 
                       | 
                       
                         R 
                         k 
                       
                     
                     ) 
                   
                 
               
               
                 
                   Σ 
                   
                     i 
                     ∈ 
                     L 
                   
                 
                  
                 
                   Pr 
                    
                   
                     ( 
                     
                       S 
                       | 
                       
                         R 
                         i 
                       
                     
                     ) 
                   
                 
               
             
           
         
       
     
         [0039]    There are 
         [0000]    
       
         
           
             
               3 
               B 
             
              
             
               ( 
               
                 
                   
                     n 
                   
                 
                 
                   
                     B 
                   
                 
               
               ) 
             
           
         
       
     
         [0000]    possible symbols X k  at distance B. To obtain an estimate β for the background contribution, the average probability of these symbols Pr(S|X k ) is normalised to N symbols, leading to a value that is typically a very large overestimate and thus conservative in practice: 
         [0000]      β= Nμ   B (1−μ) n-B  
 
         [0040]    Therefore, a conservative overestimate of each base&#39;s Read error can be represented with: 
         [0000]    
       
         
           
             
               Pr 
                
               
                 ( 
                 
                   
                     
                       S 
                       j 
                     
                     ≠ 
                     
                       Z 
                       j 
                     
                   
                   | 
                   S 
                 
                 ) 
               
             
             ≈ 
             
               
                 
                   
                     Σ 
                     
                       k 
                       ∈ 
                       L 
                     
                   
                    
                   
                     Pr 
                      
                     
                       ( 
                       
                         
                           
                             
                               S 
                               j 
                             
                             ≠ 
                             
                               Z 
                               j 
                             
                           
                           | 
                           S 
                         
                         , 
                         
                           R 
                           k 
                         
                       
                       ) 
                     
                   
                    
                   
                     Pr 
                      
                     
                       ( 
                       
                         S 
                         | 
                         
                           R 
                           k 
                         
                       
                       ) 
                     
                   
                 
                 + 
                 
                   
                     
                       
                         ε 
                         j 
                       
                        
                       
                         ( 
                         
                           3 
                           - 
                           m 
                         
                         ) 
                       
                     
                     
                       
                         3 
                          
                         
                           ε 
                           j 
                         
                       
                       + 
                       
                         3 
                          
                         
                             
                         
                          
                         m 
                       
                       - 
                       
                         4 
                          
                         
                             
                         
                          
                         m 
                          
                         
                             
                         
                          
                         
                           ε 
                           j 
                         
                       
                     
                   
                    
                   β 
                 
               
               
                 
                   Σ 
                   
                     i 
                     ∈ 
                     L 
                   
                 
                  
                 
                   Pr 
                    
                   
                     ( 
                     
                       S 
                       | 
                       
                         R 
                         i 
                       
                     
                     ) 
                   
                 
               
             
           
         
       
     
         [0041]    This estimate of a base&#39;s Read error represents the new, boosted quality score for the base upon conversion using the Phred scheme: 
         [0000]      Q=10log 10 P 
         [0042]    Where Q is the Phred quality score for an error probability of P. 
         [0043]    For each Read, the initial distance to search is dependent on the expected error rate and the length of the Read so that longer reads may need larger search distances. For example one may use a search distance based on the worst case Read error ε plus some margin multipler (e.g. 2n(ε+m)). Since the maximum width of a slot may be constrained (say to 32 bases), this may also place a constraint on the minimum distance that can be searched (to in this case ┌n/32┐−1). Likewise the background error may be excessive if the search distance is too low, so a minimum distance (e.g. of 5) may also be applied. 
         [0044]    Further, the present disclosure is associated with following exemplary methods: 
       A) Symbol Search 
       [0045]    To find all symbols with up to M mismatches from the read, the read is divided into M+1 slots. Based on the Pigeonhole principle, for any symbol up to Hamming distance M away, there must be one slot that does not contain a mismatch (i.e. is an exact match). All slots are searched for all matching symbols. If a particular slot, for example, is a k-mer, a search is made to find all symbols that contain that particular k-mer. The union of searches across the slots is then guaranteed to contain at least all those symbols within the desired Hamming distance M, however it can also contain candidate symbols that are greater than this distance. Filtering is used to discard symbols that are greater than distance M. The per-slot search (Slot LU in  FIG. 1 ) can be achieved by first indexing the reference sequence/corpus according to overlapping k-mers as a pre-processing step (e.g. if the corpus contains ACGGCTAC at some position 1004 then a 6-mer index for that would contain position 1004 at index ACGGCT and position 1005 at index CGGCTA and position 1006 at index GGCTAC). For each slot, the set of possible matching symbols is then easily determined by looking up the index for match positions in the corpus. It can be noted that the larger the slot width, the more specific the slot search, and the fewer the possible candidate symbols that need to be examined. 
         [0046]    For performance reasons, therefore, it is desirable to have wide slots for searching. However, sometimes more narrow slots are desired (e.g. if searching smaller reads or larger Hamming distances). The following flexible indexing mechanism allows this freedom. For each overlapping k&gt;12 bases, a 24-bit (2-bits per base) primary index is generated from the first 12 bases. For each primary index, the starting position is stored in the reference genome/corpus to the index along with a secondary index of the remaining (k−12) bases. For example, a secondary index of 8 bits enables 4 additional bases to be stored, resulting in a combined 16 base index, so that a string CTATCGGCTCACTGGA would have a primary index of CTATCGGCTCAC and a secondary index of TGGA. Similarly, a secondary index of 32 bits enables a 28 base index (12 primary+16 secondary). Within each primary index, the entries are sorted according to the secondary index. When searching a slot width of size 12 then, only the primary index is used, and all offsets are retrieved within that index. However when searching a slot width of say size 15, the secondary index is also used to, via binary traversal, retrieve only those offsets that match the additional 3 bases. When searching a slot width that is greater than both the full index size, say of 30 bases when only a 16 base full index is available, then this is achieved by determining the intersection of overlapping 16-base index searches (e.g. a search of CTATCGGCTCACTGGAGCTAACCGATCGAT would consist of a search of CTATCGGCTCACTGGA and GAGCTAACCGATCGAT each represented by slot lookup search, followed by an intersection operation on the results). This methodology allows for rapid and flexible searching of reads within a desired Hamming distance across the reference corpus. 
         [0047]    A further speedup can be achieved by making use of the secondary index even when the slot search width is narrow. This is done by directly determining the Hamming distance from the difference between the secondary index and the corresponding section of the Read. If the Hamming distance exceeds the search distance, then we know that this candidate symbol does not meet the search criteria and can be discarded early (rather than at the filtering stage). This saves on random accesses to the reference genome/corpus, resulting in fewer expensive cache misses. In this case, extra bases beyond the slot are also passed to the Slot LU operation (up to a combined size of the full index) to leverage this early filtering operation. For example, a 12-mer slot search of CTATCGGCTCAC where the full index is 20 bases and the Hamming search distance is 3, the slot search operation can be provided the extra 8 bases TGGAGCTA that immediately follow the slot search bases. When determining the list of candidates, instead of adding all items that match the 12-mer search, the secondary index of a candidate can be compared against the extra provided bases to see if it has a Hamming distance of 4 or more, and to thus conditionally exclude candidates. 
       B) Read Processing 
       [0048]    Because a Read may have poor quality scores (high errors) at the head and tail of the Read, a simple preprocessing step involves truncating the Read on either side according to a maximum tolerable quality score (e.g. a probability of Read error of 10% or higher). This truncated result is only used for feeding into the analysis pipeline, and the original Read is not itself truncated. 
       C) Quality Score Quantisation 
       [0049]    Boosted quality scores may be improved to such an extent that they represent negligible error. Such quality scores can be constrained to a maximum saturation value S (e.g. 40) beyond which they cannot be further boosted. Those quality scores that are boosted from a value x to a non-saturation value y&lt;S may instead of recording the value y, use a quantised value y′=f(y) (e.g. based on the Illumina 8-bin quantisation values) provided y′&gt;x. This means that the resultant quality scores are conservatively quantised with the boosting, leading to higher compression ratios. 
       D) Edit-Distance Searches 
       [0050]    Reads with indel (base insertion or deletion) variants that are not present in the corpus are likely to result in large Hamming distances to the corpus. This means that it is highly unlikely for such reads to be successfully boosted this way, thus preserving their original quality scores. It is possible to replace Hamming distance searches of a corpus with edit-distance searches instead. An edit-distance search can incorporate a model of both in-place mutations/Read-errors as well as indels. In this case the Markov model from R k  to G k , could incorporate the in-place mutation rate m B  as well as an insertion rate m I  and deletion rate m D  as processes. The sequencing Read error would still be based on the values from the actual Read, however additional estimations of the sequencer insertion error rate ε I  and deletion rate ε D  could be incorporated as well. Edit-distances searches can be done by again utilising the Pigeonhole principle, but this time accounting for indels as well. 
         [0051]    Systematic sequencer indels affecting a whole flow-cycle of base reads (such as for Pacific Bioscience sequencers) could also be modelled with a Bayesian approach across affected reads, or by directly incorporating flow-cycle error information into the estimated indel error rates that vary per base across the read. 
       E) Long Reads 
       [0052]    For long reads (such as those that are thousands of bases long), it may be impractical to process the entire Read at once, so the Read itself could be split into smaller (fixed or variable width) subreads that themselves may benefit from the boosting process. The long Read may then be assembled from the boosted result of these subreads. In some conditions, this can lead to faster and better results than directly applying boosting on the long Read itself. The average amount that quality scores are boosted grows according to the length of the Read being boosted, however this also increases the probability of an indel being encountered and for Hamming-based searches can thus result in little or no boosting. Moreover, there is no point boosting quality scores beyond the saturation threshold. Thus a criteria for determining the split length can be according to both keeping the likelihood of encountering an indel low (&lt;1%) for each subread, as well maintaining a length that ensures most quality scores in the subread are boosted to the saturation threshold. For searches based on edit-distance, the likelihood for encountering indels can be higher and thus longer subreads may still be appropriate, however the likelihood of encountering larger indel regions or of structural variation may still need to be kept low. 
         [0053]    Each of the methods A, B, C, D, E and F can be used separately or in combination with each other. 
       Analysis Pipeline 
       [0054]    Steps:
       1. A pre-processing step of taking a reference genome or other corpus to generate a (dynamic) index   2. For each Read   2.1. determine a suitable Hamming distance for the search   2.2. finding all symbols in the corpus within that search distance as candidate source symbols   2.3. using Bayes for determining the likelihood of candidate source symbols   2.4. estimating the contribution of all other background source symbols (including assuming zero contribution)   2.5. using these estimations to calculate a new quality score per base, optionally quantizing based on say worst-case Illumina 8-bin quantisation levels   2.6. adjusting quality scores based on new calculated quality scores—for example only if a new quality score is better than as old quality score should one replace the quality score with the new quality score   3. Optionally, to be even more conservative and minimise any possible bias:   3.1. process all reads against symbol set to find all positions where there are mismatches. Mark these mismatches in the symbol set (e.g. for a reference genome corpus, mark positions in the reference genome that correspond to mismatches)   3.2. then for each Read, ensure quality scores are preserved at these mismatch positions       
 
       DETAILED DESCRIPTION OF FIGURES 
       [0066]    Referring now to  FIG. 1 , shown is a schematic illustration of the steps in a search operation of distance up to M. Here an n-mer read is partitioned into M+1 slots, each slot is looked up with a Slot LU operation, the results from which are merged together to form a list of candidate symbols. This is then filtered to include only candidate symbols that are of distance greater than M, which then forms the list of results. 
         [0067]    Referring now to  FIG. 2 , shown is a schematic illustration of the Slot LU operation from  FIG. 1 . Here the input slot bases are partitioned into an input primary index and an input secondary index. The input primary index is used to lookup the primary index table to obtain a list of candidates (each element in the list consists of (i) an offset in the corpus corresponding to candidate symbols, and (ii) secondary index information). The input secondary index is then used to do binary traversal of this list according to its secondary index information, so as to retrieve a subset of the list of candidates that match at least a portion of the input secondary index.