Flexible seed extension for hash table genome mapping
Patent Information
- Application Number
- JP2020572747
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2019-05-24
- Filing Date
- 2020-05-22
- Publication Date
- 2025-03-05
- Estimated Expiration
- 2040-05-22
Smart Images

Figure 0007640267000002 
Figure 0007640267000003 
Figure 0007640267000004
Abstract
Description
[Technical field]
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS This application claims the benefit of U.S. Provisional Patent Application No. 62 / 852,965, filed May 24, 2019, which is incorporated herein by reference in its entirety. [Background technology]
[0002] A nucleic acid sequencer is an instrument configured to automate the process of nucleic acid sequencing. Nucleic acid sequencing is the process of determining the order of nucleotides in a nucleic acid sequence. Nucleic acids can include deoxyribonucleic acid (DNA) or ribonucleic acid (RNA).
[0003] A nucleic acid sequencer is configured to receive a nucleic acid sample and generate one or more output data, called "reads," that represent the order of nucleotides in the nucleic acid sample. Nucleotides in a DNA sample can include one or more nucleotide bases, including guanine (G), cytosine (C), adenine (A), and thymine (T), in any combination. Nucleotides in an RNA sample can include one or more bases, including G, C, A, and uracil (U), in any combination.
[0004] The reads generated by the DNA sequencer can be mapped to a known sequence of nucleotides in a reference genome using a mapping and aligning engine. The mapping of the reads to the sequence of nucleotides in the reference genome can be achieved by the mapping and aligning engine using a hash table index. Summary of the Invention
[0005] The present disclosure describes the construction and use of hash table indexes that facilitate flexible seed extension to improve the performance of genome mapping and alignment systems. In particular, the present disclosure can be used to perform flexible seed extension in a manner that (i) reduces the consumption of computational resources and power, and (ii) overcomes problems associated with conventional seed extension methods described herein. To achieve these advantages, the present disclosure provides, among other things, "interval records" that can be stored in hash table locations.
[0006] Aspects of the present disclosure allow the mapping and aligning unit to use interval records alone or in conjunction with one or more extension records to reduce the number of matching positions processed by the mapping and aligning unit through seed extension, while at the same time providing the mapping and aligning unit with the flexibility to determine whether a matching reference position identified using dynamic seed extension is accurate, or in some cases, whether seed extension using one or more extension records should be performed at all. This results in a mapping and aligning unit that uses less power and fewer computational resources, while also being more accurate than other mapping and aligning units that utilize conventional seed extension techniques themselves.
[0007] In one aspect, the present disclosure provides a method for generating a hash table for mapping sample reads to a reference. In one aspect, the method includes: obtaining, by a computer system, a first seed of nucleotides from a reference sequence, the first seed having a length of K nucleotides; determining, by the computer system, that the first seed matches more than a predetermined number of reference sequence positions; and generating, by the computer system, a seed extension tree having a plurality of nodes based on determining that the first seed matches more than a predetermined number of reference sequence positions, each node of the plurality of nodes being (i) an extension of the first seed and having a length of K nucleotides.* an extended seed having a nucleotide length of K * and (ii) one or more locations in a seed extension table that contain data describing reference sequence positions that match the extended seed; and for each node of the plurality of nodes, storing, by the computer system, spacing information at a location in the hash table that corresponds to an index key of the extended seed, wherein the spacing information references one or more locations in the seed extension table that contain data describing reference sequence positions that match the extended seed associated with the node.
[0008] Other aspects include corresponding systems, apparatus, and computer programs for performing actions of the methods as disclosed herein as defined by instructions encoded on a computer-readable storage device.
[0009] These and other aspects may optionally include one or more of the following features: For example, in some implementations, each of the matching reference sequence positions includes K nucleotides of the first seed.
[0010] In some implementations, the method may further include obtaining, by the computer system, a second seed of nucleotides from the reference sequence different from the first seed; determining, by the computer system, that the second seed does not match more than a predetermined number of reference sequence positions; and based on the computer system determining that the second seed does not match more than the predetermined number of reference sequence positions, obtaining, by the computer system, data describing each of the reference sequence positions that match the second seed; and storing, by the computer system, the data describing the reference sequence positions that match the second seed in a second location of the hash table corresponding to an index key of the second seed.
[0011] In some implementations, one or more locations in the seed extension table that contain data describing reference sequence positions that match the extended seed may include a contiguous interval of locations in the seed extension table that contain data describing reference sequence positions that match the extended seed.
[0012] In some implementations, one or more locations in the seed extension table that contain data describing reference sequence locations that match the extended seed associated with the node may include a contiguous interval within the extension table of reference sequence locations that match the extended seed associated with the node.
[0013] In some implementations, obtaining, by a computer system, a first seed of nucleotides from a reference sequence, where the first seed represents a sequence of nucleotides having a nucleotide length of K nucleotides, can include determining, by the computer system, a position of a seed access window within the reference sequence; and obtaining, by the computer system, a subset of the reference sequence identified by the seed access window.
[0014] In some implementations, the method includes: adjusting, by the computer system, a seed extension window in a forward direction along the reference sequence by K nucleotides to identify a second seed of nucleotides from the reference sequence having a nucleotide length of K nucleotides; obtaining, by the computer system, the second seed from the reference sequence; determining that the second seed matches more than a predetermined number of reference sequence positions; and based on determining that the second seed matches more than a predetermined number of reference sequence positions, generating, by the computer system, a second seed extension tree having a plurality of second nodes, wherein each second node of the plurality of second nodes (i) is an extension of the second seed and has a nucleotide length of K nucleotides. * a second extended seed having a nucleotide length of K *is one or more nucleotides greater than K; and (ii) one or more second locations in a second seed extension table that contain data describing reference sequence locations that match the second extended seed; and for each second node of the plurality of second nodes, storing, by the computer system, second spacing information at a location in the hash table that corresponds to an index key of the second extended seed, wherein the second spacing information references one or more locations in the second seed extension table that contain data describing reference sequence locations that match the second extended seed associated with the second node.
[0015] In some implementations, the method may further include, for each node of the plurality of nodes, determining, by the computer system, whether the node of the seed extension tree is a leaf node, and based on determining, by the computer system, that the node of the extension tree is not a leaf node, storing, by the computer system, an extension record at a location in the hash table that corresponds to the index key of the extended seed.
[0016] In some implementations, the extension record includes one or more instructions that, when executed by a computer system, cause the computer system to add one or more additional nucleotides to a seed associated with the extension record.
[0017] In some implementations, the method may further include not storing, by the computer system, the decompressed record at a location in the hash table that corresponds to the index key of the decompressed seed based on the computer system determining that the node decompressed tree is a leaf node.
[0018] In some implementations, the method can further include generating, by the computer system, a seed extension table. In such implementations, generating the seed extension table can include identifying, by the computer system, each seed of the reference sequence that matches the first seed, and storing, by the computer system, data identifying the identified seeds in the seed extension table.
[0019] In some implementations, the method can further include sorting, by the computer system, the identified seeds in the seed extension table.
[0020] In some implementations, the method may further include generating, by the computer system, a hash table installation package that includes instructions that, when processed by the one or more computers that receive the hash table installation package, cause the one or more computers to install the hash table in memory accessible by the programmable logic circuitry.
[0021] In some implementations, a hash table installation package can include a seed extension table, and the hash table installation package can include instructions that instruct (i) a programmable logic circuit or (ii) another computer to store the seed extension table in a memory device accessible to the programmable logic circuit.
[0022] In some implementations, a computer system provides a hash table installation package to another computer.
[0023] In some implementations, the other computer may include (i) a computer configured to communicate with the programmable logic circuit, or (ii) the programmable logic circuit itself.
[0024] In some implementations, a computer system can include multiple computers.
[0025] In another aspect, the present disclosure provides a method for improving mapping of sample reads to reference sequences using a hash table. In one aspect, the method includes: executing, by a mapping and aligning unit, a query of the hash table, the query including a first seed, the first seed including a subset of nucleotides obtained from a particular read of the sample read; obtaining, by the mapping and aligning unit, a response to the executed query including information stored by a position in the hash table determined to be responsive to the query; determining, by the mapping and aligning unit, whether the response to the executed query includes (i) an extension record, (ii) an interval record, or (iii) one or more matching reference sequence positions; and determining, by the mapping and aligning unit, whether the response to the query executed by the mapping and aligning unit includes (i) an extension record and (ii) an interval record. determining, based on determining that the interval record includes a first extended seed, whether the extension table is accessed to obtain one or more matching reference sequence locations in the extension table referenced by the interval record; determining, based on determining that the extension table is not accessed, whether to store, by the mapping and aligning unit, the first information describing the interval record in the memory device as information describing the best interval candidate; generating, by the mapping and aligning unit, a first extended seed that is an extension of the first seed using the extension record; generating, by the mapping and aligning unit, a subsequent hash query including the first extended seed; and performing, by the mapping and aligning unit, a subsequent hash query of the hash table.
[0026] Other versions include corresponding systems, apparatus, and computer programs for performing the actions of the methods defined by instructions encoded on a computer-readable storage device.
[0027] These and other aspects of the disclosure may optionally include one or more of the following features. For example, in some implementations, the method may further include, based on determining that the extension table is accessed, accessing, by the mapping and aligning unit, the extension table to obtain one or more matching reference sequence positions in the extension table referenced by the interval record, and adding, by the mapping and aligning unit, the one or more matching reference sequence positions to a seed match set.
[0028] In some implementations, the method may further include determining, by the mapping and aligning unit, that a response to the performed query includes one or more matching reference sequence positions, and adding, by mapping and aligning, the one or more matching reference sequence positions to the seed match set based on determining, by mapping and aligning, that the response to the performed query includes one or more matching reference sequence positions.
[0029] In some implementations, determining by the mapping and aligning unit whether to store the first information describing the interval record in the memory device as information describing the best interval candidate may include determining by the mapping and aligning unit that no previous information exists describing the interval record as the best interval candidate for a particular read, and storing by the mapping and aligning unit the first information describing the interval record in the memory device as information describing the best interval candidate.
[0030] In some implementations, the method includes obtaining a response to a subsequent executed query that includes information stored by the hash table location determined by the mapping and aligning unit to be responsive to the query; determining by the mapping and aligning unit that the response to the subsequent executed query includes (i) the second extension record, (ii) the second interval record, or (iii) one or more matching reference sequence locations; and based on determining by the mapping and aligning unit that the response to the subsequent executed query includes (i) the second extension record or (ii) the second interval record, searching by the mapping and aligning unit for the extension table to obtain one or more matching reference sequence locations in the extension table referenced by the second interval record. The method may further include determining, by the mapping and aligning unit and using one or more heuristic rules, whether the second information describing the second interval record or the first information describing the best interval candidate is used as the best interval candidate based on determining that the extension table is not accessed, generating, by the mapping and aligning unit, a second extended seed that is an extension of the first extended seed using the second extended record, generating, by the mapping and aligning unit, a third hash query including the second extended seed, and performing, by the mapping and aligning unit, a third query of the hash table including the second extended seed.
[0031] In some implementations, determining by the mapping and aligning unit and using one or more heuristic rules whether the second information describing the second interval record or the first information describing the best interval candidate is to be used as the best interval may include selecting either the second information describing the second interval record or the first information describing the best interval candidate record based on a number of factors including: (i) the number of matching reference sequence positions returned by each of the interval record and the second interval record, (ii) a predetermined threshold level of reference sequence positions, or (iii) respective seed lengths of the respective seeds that reach the hash positions storing the interval record and the second interval record.
[0032] In some implementations, an interval record references multiple locations in the seed extension table that contain data describing reference sequence locations that match the first seed of a query.
[0033] In some implementations, the multiple locations in the seed extension table containing data describing reference sequence positions that match the first seed of the query may include a contiguous interval of reference sequence positions in the extension table that match the first seed of the query.
[0034] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this invention belongs. Although methods and materials similar or equivalent to those described herein can be used to practice or test the present invention, suitable methods and materials are described below. All publications, patent applications, patents, and other references mentioned herein are incorporated herein by reference in their entirety. In case of conflict, the present specification, including definitions, will control. In addition, the materials, methods, and examples are merely illustrative and are not intended to be limiting.
[0035] These and other aspects of the present disclosure are discussed in more detail in the following detailed description, with reference to the accompanying drawings and claims. [Brief description of the drawings]
[0036] [Figure 1] FIG. 1 is a context diagram of a system for generating a hash table index that facilitates flexible seed extension for hash table genome mapping. [Diagram 2] 1 is a flowchart of a process for generating a hash table index that facilitates flexible seed extension for hash table genome mapping. [Diagram 3] FIG. 1 is a context diagram of a runtime system for performing runtime flexible seed extension for hash table genome mapping. [Figure 4] 1 is a flowchart of a process for performing run-time flexible seed extension for hash table genome mapping. [Diagram 5] 13 is a flowchart of a process for performing iterative run-time flexible seed extension for hash table genome mapping for each seed of a read. [Figure 6] FIG. 1 is a diagram of system components that can be used to implement the systems described herein relating to flexible seed extension for hash table genome mapping. [Figure 7] FIG. 1 is an illustration of a bar graph displaying data representing test results in the form of percentage of unmapped reads in a system using the flexible seed extension method as described herein compared to a system not using the flexible seed extension method. [Figure 8] FIG. 1 is an illustration of a line graph displaying data representing test results in the form of read mapping accuracy in a system using a flexible seed extension method as disclosed herein compared to a system not using a flexible seed extension method. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0037] The present disclosure describes the construction and use of hash table indexes that facilitate flexible seed extension to improve the performance of genome mapping and alignment systems. As used herein, the term "seed" refers to a subset of consecutive nucleotides present in a nucleic acid read ("read") or a nucleic acid reference sequence ("reference sequence"). As an example, a short seed for a read can have 21 bases or nucleotides extracted from a 150 base or nucleotide read generated, for example, by a nucleic acid sequencer ("sequencer") based on a biological sample input to the sequencer. Such short seeds can match hundreds, thousands, hundreds of thousands, or even more reference sequence positions. A reference sequence seed can include a subset of consecutive nucleotides from a reference sequence that represent a reference sequence position. Identification of such a large number of reference sequence positions that match a particular short seed of a read can occur for multiple reasons, including the occurrence of repetitive sequences such as "...ATATAT...", which can occur at many positions in a reference sequence. Alternatively, or in addition, such a large number of matching reference sequence positions can arise because many nearby copies of a genomic sequence can appear within the reference sequence.
[0038] These large numbers of reference sequence locations that match a particular short seed can strain a conventional mapping and aligning unit using a conventional hash table index, as the mapping and aligning engine can be forced to process a large number of matches. Such excessive processing of a large number of reference sequence locations that match a particular short seed can result in unnecessary consumption of computational resources, including overuse of processing resources, memory resources, and waste of power used to power the processing resources, memory devices, and cooling units used to cool the processing and memory resources, or any combination thereof.
[0039] Conventional methods have been utilized to address problems that may arise from identifying and processing a large number of reference sequence positions that match a short seed. For example, conventional methods have been utilized to iteratively extend a short seed using an extension record stored at a hash table position. Such methods include, for example, those described in U.S. Pat. No. 10,083,276, incorporated herein by reference, which may return an "extension record" stored at a hash table position that corresponds to the seed of the hash query. The extension record may be used to create an extended seed by symmetrically increasing the length of the seed in the received hash query by adding one or more bases or nucleotides to each end of the seed. Conventional systems may then re-query the hash table using another hash query that includes the extended seed. This other hash query with the extended seed is likely to correspond to a hash position that identifies fewer reference positions that match the extended seed because the extended seed is longer. This iterative process can continue until (i) the resulting match set shrinks sufficiently to contain less than a threshold number of reference sequence positions that match the extended seed, (ii) the match set becomes empty, (iii) the maximum seed extension is reached, or (iv) the extension moves beyond the edge of the read on which the short seed is based such that no further extension is possible. Strictly speaking, in conventional systems, the mapping and aligning unit can obtain a non-empty set of matching reference positions only if the iterative process terminates in manner (i) above, and not in any of manners (ii), (iii), or (iv) above.
[0040] These conventional methods can be useful for reducing the amount of reference sequence positions that match short seeds. However, these conventional methods suffer from three distinct problems.
[0041] First, traditional methods can be prone to the "unmapped read problem." The unmapped read problem occurs when traditional seed extension methods return zero matches for an extended seed. Such a zero match result set can occur when an extended seed incorporates a variant such as a SNP, or when an extended seed overruns an edge of a corresponding read. If such a scenario occurs for every seed location of a read using traditional methods, the read may not be mapped.
[0042] Second, traditional methods may be prone to the "high-confidence mismapping problem." Such high-confidence mismapping problems arise when an extended seed contains a variant, such as a SNP, but still matches one or more reference positions. Such mappings can be characterized by a high-confidence score, such as a high MAPQ score, even though the extended seed is improperly mapped. If this occurs for each seed location of a read using traditional methods, the read may potentially be mismapped with high confidence. Conversely, evidence may be lost due to such mappings. High-confidence mismappings may be more detrimental to overall mapper accuracy than low-confidence mismappings. The MAPQ score may include a quality score that quantifies the probability that a mapped read is misplaced.
[0043] Third, conventional methods may be prone to the "fixed maximum matching problem." Generally, hash tables constructed for seed extension use a maximum matching parameter M, such as M=16. This parameter ensures that the leaf nodes of the seed extension tree do not exceed the M parameter. However, some applications may use a different maximum matching parameter M, such as M=64. *Conventional seed extension methods continue to iteratively extend the seed until a leaf node is reached. Thus, an application using conventional methods would be unable to stop extending the seed when M=64 matching sets are achieved unless the hash table is restructured such that the maximum match parameter M is set to 64.
[0044] Using innovative aspects of the present disclosure, flexible seed extension can be performed in a manner that (i) reduces the consumption of computational resources and power as described herein, and (ii) resolves problems associated with conventional seed extension methods, such as those problems described above. To achieve these advantages, the present disclosure provides, among other things, "interval records" that can be stored in hash table locations. For a particular seed, the interval records identify a contiguous set of reference sequence positions that match the particular seed, stored in the seed extension table. Upon executing a hash query that identifies a particular seed, the mapping and aligning unit can determine, based on the contents of the hash location responsive to the query, whether to (i) extend the seed based on the seed extension record stored in the hash location, (ii) store an interval record in the seed extension table that identifies a reference position that matches the particular seed, or (iii) access a reference sequence position identified by an interval record stored in the seed extension table at the hash location. In some implementations, a combination of these operations can be performed, such as extending the seed and storing an interval.
[0045] Thus, the use of interval records in conjunction with one or more extension records allows the mapper and aligner to reduce the number of matching positions processed by the mapping and aligning unit through seed extension, while at the same time providing the mapping and aligning unit with the flexibility to determine whether the matching reference positions identified using dynamic seed extension are accurate, or in some cases, whether seed extension using one or more extension records should be performed at all. This results in a mapping and aligning unit that uses less power and fewer computational resources, while also being more accurate than other mapping and aligning units that utilize conventional seed extension techniques themselves. Generating hash table indexes for flexible sealed decompression.
[0046] FIG. 1 is a context diagram of a system 100 for generating a hash table index that facilitates flexible seed extension for hash table genome mapping. The system 100 includes a computer 110, a memory 112, and a memory 130. Although FIG. 1 depicts the memories 112 and 130 as separate memory devices, the present disclosure need not be so limited. Instead, in some implementations, the memory 112 and the memory 130 can be the same memory device. For example, the memory 112 and the memory 130 simply refer to two separate storage locations on a single memory device. Alternatively, the memory 112 and the memory 130 can each be stored in a separate memory device, such as a separate hard disk accessible by the computer 110. As another example, the memory 112 can be a memory device of a cloud-based server that stores a library of reference genomes, and the memory 130 can be a local memory of the computer 110. Thus, the depiction of memory 112 and memory 130 as separate memories in FIG. 1 is not intended to limit the memories 112, 130 themselves or the contents of those memories, and does not require that these memories be organized or stored in any particular implementation of the present disclosure.
[0047] The computer 110 may include a computer or multiple computers, each including one or more processing units configured to perform operations by executing one or more software instructions. The one or more processing units may include one or more central processing units (CPUs), one or more graphical processing units (GPUs), or any combination thereof. The computer 110 may be configured to directly interact with the memory 112, the memory 130, or the programmable circuitry 162 via a direct connection, such as one or more buses, one or more USB cables, one or more USB-C cables, or the like, or any combination thereof. Alternatively or in addition, the computer 110 may be configured to interact with the memory 112, the memory 130, or the programmable circuitry 162 via one or more networks. The one or more networks may include a wired Ethernet network, a wireless network, an optical network, a LAN, a WAN, a cellular network, the Internet, or any combination thereof.
[0048] As an example, one implementation may include a computer 110 configured to (i) interact with memory 112 and memory 130 stored in one or more local memory devices accessible to the computer 110 to generate a seed extension table 132 and a hash table 140, and (ii) communicate the generated seed extension table 132 and hash table 140 to a programmable circuit 162 integrated with another device 160 using one or more networks. The other device 160 may include a nucleic acid sequencer, a cloud-based server(s), or any other computer. In some implementations, the programmable circuit 162 may be integrated with the other device using an expansion card such as a PCI card. In such implementations, the programmable circuit 162 may be housed on the logic board of a PCI card inserted into the motherboard of the sequencer, cloud-based server, or other computer using a PCI port on the motherboard.
[0049] The programmable circuit 162 may include one or more programmable integrated circuits, such as one or more Field Programmable Gate Arrays (FPGAs). A Field Programmable Gate Array is an integrated circuit including a plurality of hardware digital logic gates, hardware digital logic circuits, etc., that is dynamically configurable to implement one or more processing modules, such as a genomic analysis module of a genomic analysis pipeline, such as the mapping and aligning unit 170, or a portion of a processing module, such as the hash table 140. An FPGA may be programmed using a hardware description language (HDL), such as Very High Speed Integrated Circuit Hardware Description Language (VHDL), Verilog, etc. An FPGA is flexible in that an FPGA preprogrammed to include one or more genomic analysis modules of a genomic analysis pipeline, or a portion of a genomic analysis module, may be dynamically reconfigured to include updates to one or more genomic analysis modules, other different genomic analysis modules, etc.
[0050] Other types of integrated circuits can be used instead of or in addition to the programmable circuit 162 to implement the functionality of the programmable circuit 162 described herein. For example, one or more Application Specific Integrated Circuits (ASICs) can be used to implement the functionality, or a portion of the functionality, of the programmable circuit 162. An ASIC is a custom integrated circuit that includes hardware digital logic gates, digital logic circuits, etc., configured at the time of manufacture. An ASIC is similar to an FPGA described herein in that the hardware digital logic gates, or digital logic circuits of the ASIC can be described or designed using a hardware description language, such as VHDL, Verilog, etc. The ASIC can then be manufactured or printed to include the digital logic circuits or digital circuits described by the HDL. However, once manufactured or printed, an ASIC cannot be dynamically reconfigured like an FPGA. Although the examples described herein describe programmable or custom circuits, the disclosure need not be so limited. In some implementations, for example, other types of integrated circuits can be used to implement the functionality described as being performed by the programmable circuit 162.
[0051] The memory 112 can store one or more reference sequences 114. A reference sequence can include (i) an entire reference genome representative of a species, (ii) a portion of a reference genome representative of a species, or (iii) a complete and / or partial reference genome representative of multiple species. A reference sequence includes a contiguous list of bases or nucleotides. The contiguous list of bases or nucleotides that make up a reference sequence can be organized in the memory 112 as a digital nucleic acid sequence database. As representative of a species, a particular reference sequence can be assembled by a human, a computer, or both from multiple different donors of a particular species.
[0052] In some implementations, a particular reference sequence can be assembled as representative of a particular population, where the particular population is a subset of a species that has a particular nucleic acid sequence that can uniquely distinguish the particular population from other populations within the species. Species can include any species, including humans, non-human mammals, reptiles, fish, insects, plants, bacteria, viruses, etc. Reference sequences can be generated from samples of non-extinct species, such as humans, or from now extinct species, such as dinosaur or mammoth populations. Reference sequences of extinct species, such as dinosaurs, can be assembled using samples obtained from biological material contained within fossilized, frozen, or otherwise preserved remains of the extinct species. Reference sequences of extinct species can be assembled from a combination of (i) sequencing biological remains obtained from fossilized remains of the extinct species and (ii) sequencing biological samples from the non-extinct species. An entire reference genome can include many consecutive bases or consecutive nucleotides. For example, the human reference genome can include as many as 300 million consecutive bases or consecutive nucleotides.
[0053] The computer 110 is configured to generate a hash table 140 that facilitates flexible seed extension. The computer 110 begins generating the hash table 140 by accessing the reference sequence 114 stored in the memory 112 and obtaining the seeds 114-1, 114-2, 114-3 to 114-n of the reference sequence, where n is any non-zero integer greater than 0. In some implementations, the computer 110 can use a seed access window to identify and obtain the seeds 114-1, 114-2, 114-3 to 114-n of the reference sequence 114. The computer 110 can initialize the seed access window to be a seed length K, where K is the number of bases or nucleotides included in each seed and K is any non-zero integer greater than zero. The computer 110 can position a seed access window of length K at the beginning of the reference sequence to begin accessing the seeds of the reference sequence 114 to encompass a first set of K nucleotides in the reference sequence, such as seed "GTTTA" 114-1. In this example, K is equal to 5, but K is not limited to such a nucleotide length. Instead, K can be equal to any non-zero integer greater than zero, and in some implementations may be equal to, for example, 7, 10, 12, 15, 18, 20, 21, 25, or more bases or nucleotides. Seeds 114-1, 114-2, and 114-3 through 114-n are merely examples of seeds of the reference sequence 114 and need not correspond to a set of four sequence seeds of the reference sequence 114 in this example.
[0054] To generate the hash table 140, the computer 110 is configured to access each seed 114-1, 114-2, and 114-3 through 114-n of the reference sequence 114 and perform a set of operations for each seed 114-1, 114-2, and 114-3 through 114-n. The set of operations is designed to generate information for storage in a hash location 144 of the hash table 140 that corresponds to an index key 142 of the hash table 140. Each index key 142 may correspond to a respective seed of the plurality of seeds 114-1, 114-2, and 114-3 through 114-n of the reference sequence 114, the reverse complement of each of the seeds 114-1, 114-2, and 114-3 through 114-n, one or more extended seeds of the plurality of seeds 114-1, 114-2, and 114-3 through 114-n, or the reverse complement of each of the extended seeds. Each of the index seeds 142 can be mapped to a hash location 144 using a hash function 143 .
[0055] The computer 110 can identify and access each of the multiple seeds 114-1, 114-2, and 114-3 through 114-n by advancing a seed access window K positions in the reference array 114 after each seed has been accessed and used to perform a set of operations. The set of operations performed on each seed 114-1, 114-2, and 114-3 through 114-n is described in more detail below. The set of operations can include population of the hash table 140 using the generated information. Alternatively, population of the hash table 140 can occur after the set of operations is completed for each seed.
[0056] The set of operations of computer 110 begins with computer 110 obtaining a seed identified by a seed access window on each seed 114-1, 114-2, and 114-3 through 114-n of reference sequence 114. In the example of Figure 1, the seed of reference sequence 114 identified by the seed access window is assumed to be "GTTTA" 114-1.
[0057] The computer 110 can determine whether the obtained seed "GTTTA" 114-1 matches more than a predetermined number of positions of the reference sequence 114. The matching reference sequence positions can include a subset of the reference sequence 114 including the seed 114-1. The subset of the reference sequence 114 can include a set of consecutively ordered nucleotides that are K or more nucleotides in the obtained seed. In some implementations, the predetermined number of matching reference sequence positions can include one matching reference sequence position. However, in other implementations, the predetermined number can be set to two or more matching reference sequence positions.
[0058] If the computer 110 determines that the seed 114-1 matches or matches less than or equal to the predetermined number of reference sequence positions, the computer may fill the hash position 144 reached by the seed "GTTTA" 114-1 with the reference position(s) that match the seed 114-1. A hash position 144 may be "reached" by a seed, such as the seed 114-1, if the seed 114-1 matches a hash key 142 that the hash function 143 maps to the hash position. Alternatively, if the computer 110 determines that the predetermined number of matching reference sequence positions is greater than the predetermined number of reference sequence positions, the computer 110 may generate a seed extension tree for the seed 114-1. In the embodiment of FIG. 1, the computer 110 determines that the seed "GTTTA" 114-1 matches more than the predetermined number of reference sequence positions. Thus, the computer 110 generates a seed extension tree 120 for the seed 114-1.
[0059] The computer 110 can generate a seed extension tree 120 for the seed 114-1 node by node starting from the root node 120. The seed extension tree 120 can be generated such that the set of matching reference locations identified by the leaf nodes does not exceed a predetermined match limit if further seed extension is not possible. Each node of the seed extension tree 120 can include a seed and interval of consecutive addresses in a seed extension table 132. In some implementations, the seed extension table 132 includes a centrally lexicographically sorted list of reference sequence locations 131-1 through 131-6 that match a seed, such as the seed 114-1, obtained by the computer 110 using the seed access window. The centrally lexicographical sort can include, for example, establishing a priority of symbol locations and then alternating left and right outward from the central symbol. Alternatively, the centrally lexicographical sort can include, for example, establishing a priority of symbol locations and then alternating right and left outward from the central symbol. Additionally, other variations can be used.
[0060] In the example of FIG. 1, the seed extension table 132 is sorted lexicographically at 133 based on the seed 114-1 of "GTTTA". This example assumes a normal alphabetical nucleotide order (i.e., A, C, G, T) with the left first to achieve the central lexicographic sort order shown in FIG. 1. The computer 110 may generate a seed extension table, such as the seed extension table 132, for each seed 114-1, 114-2, 114-3, 114-n determined to have more than a predetermined threshold number of matching reference sequence positions. In some implementations, the seed extension table 132 for each qualified seed may be generated for a particular seed after the computer 110 has accessed the particular seed using a seed access window and before the seed extension tree 120 for the seed is generated.
[0061] The above description of the nodes of the seed extension tree 120 shows that the intervals of addresses of each node are contiguous. However, the present disclosure need not be so limited. Alternatively, the intervals of addresses of the nodes may not be contiguous. For example, a particular implementation may use the intervals to describe multiple different sets of one or more contiguous locations of a seed extension table or other data structure stored in one or more memory devices, where each consecutive set of one or more contiguous locations is non-contiguous with respect to each other. That is, there may be a break in contiguous between each respective set.
[0062] The seed extension table for each eligible seed can be stored in the memory 130. This can result in n seed extension tables, i.e., one for each of the n seeds of the reference sequence 114. Alternatively, the number of seed extension tables can be less than n, such as where seed extension tables are generated and stored only for seeds with more than a predetermined threshold number of matching reference sequence positions. After generation of each of the seed extension tables, each set 132A of seed extension tables can be provided to the device 160 containing the programmable circuit 162 and stored in a memory 180 accessible to the programmable circuit 162. The memory 180 can include DRAM memory, SRAM memory, NAND memory, etc. In some implementations, the set 132A of seed extension tables can be provided to the device 160 containing the programmable circuit 162 as individual seed extension tables. In other implementations, the set 132A of seed extension tables can be provided as a single master seed extension table consisting of a concatenation of each of the respective seed extension tables of each seed. The set of seed extension tables 132A can be provided in any number of formats. In some implementations, the set of seed extension tables 132A can be compressed by the computer 110 to reduce the size of the seed extension table files provided to the device 160 and then decompressed by the device 160, the programmable circuitry 162, etc. for storage in the memory 180.
[0063] The computer 110 can generate a root node 121 of a seed extension tree 120 to include a seed "GTTTA" 121a and an interval A 121b. Interval A 121b identifies a contiguous interval of positions in a seed extension table 132 that stores reference sequence positions that match the seed "GTTTA" 121a represented by the root node 121. In this example, interval A identifies positions in the seed extension table 132 that span 131-1 through 132-6 and include "TAGTTTACT", "TAGTTTATC", "GAGTTTATG", "ACGTTTAGT", "TCGTTTAGT", and "ACGTTTAGC". The computer 110 can determine the appropriate interval or intervals for a particular seed of a node, such as node 121, by accessing the seed extension table 132 to determine the positions in the seed extension table 132 that have reference sequence positions that match the seed of node 121.
[0064] In some implementations, an interval 121b for a particular seed of a node, such as node 121, can be described using the start address of the interval in the seed extension table 132 and the end address of the interval in the seed extension table 132. In other implementations, an interval 121b for a particular seed of a node, such as node 121, can be described using the start address of the interval in the seed extension table 132 and an offset from the start address. In such implementations, the interval can be calculated later using the start address and end address of the interval, or the start address and offset of the interval. However, the disclosure need not be so limited. Instead, it is understood that the interval record can be represented in the hash table location 144 using any form of information, structured or unstructured in any suitable manner. For example, in some implementations, the interval record can be implemented using one record of a fixed size and format. In other implementations, interval records may be implemented by selecting from among multiple formats of different sizes, including record counts, etc., to optimize the storage space consumed by hash table 140, enable compressibility of hash table 140, improve efficiency of hash queries over other interval record formats, etc.
[0065] The computer 110 may continue generating the seed extension tree 120 by extending the number of bases or nucleotides for the seed 121a identified at the root node. For example, the computer 110 may extend the seed length of the root node from 5 bases or nucleotides to 7 bases or nucleotides to identify the largest subset of reference sequence positions in the seed extension table that have 7 matching bases or nucleotides. In the example of FIG. 1, the computer 110 may determine that the largest subset of reference sequence positions that have 7 matching nucleotides is "CGTTTAG". Interval B identifies a contiguous interval of positions in the seed extension table 132 that store reference sequence positions that match the seed "CGTTTAG". In this example, interval B identifies positions in the seed extension table 132 that span 132-4 to 132-6 and include "ACGTTTAGT", "TCGTTTAGT", and "ACGTTTAGC". The computer 110 may generate the nodes 122 using the information determined using the seed extension table 132. For example, the computer 110 may generate a node 122 that includes a seed "CGTTTAG" 122a and an interval B 122b.
[0066] With reference to the example of FIG. 1, the computer 110 may continue generating the seed extension tree 120 by determining whether there are other reference sequence positions in the seed extension table that have seven matching bases or nucleotides. If there are other reference sequence positions in the seed extension table 132 that have seven matching bases or nucleotides, the computer 110 may generate the next node of the seed extension tree using the next largest set of reference sequence positions that have seven matching bases or nucleotides. In the example of FIG. 1, the computer 110 may determine that the next largest subset of reference sequence positions has seven matching nucleotides. The interval E identifies a contiguous interval of positions in the seed extension table 132 that store reference sequence positions that match the seed "AGTTTAT". In this example, the interval E identifies positions in the seed extension table 132 that span from 132-2 to 132-3 and include "TAGTTTATC" and "GAGTTTATG". The computer 110 may generate the node 123 using the information determined using the seed extension table 132. For example, the computer 110 may generate a node 123 that includes a seed "AGTTTAT" 123a and an interval E 123b.
[0067] With reference to the example of FIG. 1, the computer 110 can continue to generate the seed extension tree 120 by determining whether there are other reference sequence positions in the seed extension table that have seven matching bases or nucleotides. If other reference sequence positions in the seed extension table are identified as having seven matching bases or nucleotides, the computer 110 can generate a new node in the seed extension table 120 using the next largest set of reference sequence positions that have seven matching bases or nucleotides, as described above. However, in the example of FIG. 1, there are no other reference sequence positions in the seed extension table 132 that have seven matching bases or nucleotides. Thus, the computer 110 can determine to extend the number of nucleotide bases from seven to nine and continue to analyze the reference sequence positions in the seed extension table 132.
[0068] Referring to the example of FIG. 1, the computer 110 can identify a maximum subset of reference sequence positions that have nine matching nucleotides. In this example, there are multiple subsets of reference sequence positions that have nine matching nucleotides. In such an example, the computer 110 can determine to create a seed extension tree node for each set of reference sequence positions that have nine matching reference sequence nucleotides. In some implementations, the computer 110 can randomly determine the order of creating the seed extension tree nodes. In other implementations, the computer 110 can start generating subsequent extension tree nodes based on their central lexicographical order.
[0069] Regardless of the order of their creation, the computer 110 may continue by generating a node of the seed extension table for each subset of reference sequence positions having nine matching nucleotides. As an example, the computer 110 may generate node 124 of the seed extension tree 120 to include an extended short seed "TCGTTTAGT" 124a and interval C 124b. Interval C 124b identifies a contiguous interval of positions in the seed extension table 132 that store reference sequence positions that match the short seed "TCGTTTAGT" 124a. In this example, interval C identifies positions in the seed extension table 132 that span 132-5 and include "TCGTTTAGT". The computer 110 may determine an appropriate interval for a particular short seed of a node, such as node 124, by accessing the seed extension table 132 to determine the positions in the seed extension table 132 that have reference sequence positions that match the short seed of node 124.
[0070] 1, the computer 110 may continue by generating a node of the seed extension table for each subset of reference sequence positions having nine matching nucleotides. As an example, the computer 110 may generate node 125 of the seed extension tree 120 to include an extended short seed "ACGTTTAGC" 125a and interval D 125b. Interval D 125b identifies a contiguous interval of positions in the seed extension table 132 that store reference sequence positions that match the short seed "ACGTTTAGC" 125a. In this example, interval D identifies positions in the seed extension table 132 that span 132-6 and include "ACGTTTAGC". The computer 110 may determine an appropriate interval for a particular short seed of a node, such as node 125, by accessing the seed extension table 132 to determine positions in the seed extension table 132 that have reference sequence positions that match the short seed of node 125.
[0071] 1, the computer 110 may continue by generating a node of the seed extension table for each subset of reference sequence positions having nine matching nucleotides. As an example, the computer 110 may generate a node 126 of the seed extension tree 120 to include an extended short seed "TAGTTTATC" 126a and an interval F 126b. The interval F 126b identifies a contiguous interval of positions in the seed extension table 132 that stores reference sequence positions that match the short seed "TAGTTTATC" 126a. In this example, the interval F identifies positions in the seed extension table 132 that span 132-2 and include "TAGTTTATC". The computer 110 may determine an appropriate interval for a particular short seed of a node, such as node 126, by accessing the seed extension table 132 to determine the positions in the seed extension table 132 that have reference sequence positions that match the short seed of the node 126.
[0072] The present disclosure describes an example of constructing a seed extension table in a particular regular order that proceeds from a maximum set of matching bases to a minimum set of matching bases. However, the present disclosure need not be limited to the use of seed extension trees constructed in this manner. Instead, any process for constructing a seed extension table can be used, so long as the result of the seed extension table construction process produces a seed extension table. For example, a seed extension tree can be generated from a minimum set of matching bases to a maximum set of matching bases, or in no particular order at all. In some implementations, a previously generated seed extension table can be generated and used by the system 100, without the seed extension table having to be constructed by the system 100.
[0073] The computer 110 can use the generated seed extension tree 120 to fill the hash location 144 of the hash table 140 where a particular seed input corresponding to a particular hash index key 142 arrives. As an example, the computer 110 can determine whether the node 121 is a leaf node. Based on a determination that the node 121 is not a leaf node, the computer 110 can use the root node 121 to fill the hash location 144-y, where y is any non-zero integer. Filling the hash location 144-y with the root node 121 can include storing an interval record 153b at the hash table location 144-y where the seed 121a arrives. The interval record 153b identifies the interval 121b for the node 121. Hash table 140 may include a hash table index key 142 for each seed 114-1, 114-2, 114-3 through 114-n, the reverse complement of each seed 114-1, 114-2, 114-3 through 114-n, or a combination thereof. Each hash table index key 142 may be mapped to one or more hash locations 144 using a hash function 143. Each hash location 144 may be implemented using one or more storage buckets, where a storage bucket corresponds to a set of one or more storage locations of a memory device. Each of the one or more storage locations of the memory device may be contiguous or non-contiguous memory locations.
[0074] The example of FIG. 1 shows only a portion of hash table 140 with keys 142 corresponding to the forward seeds of seeds 121, 122, 123, and 125. However, the disclosure need not be so limited. For example, in some implementations, the seeds can be hashed using hash function 143 in such a way that the reverse complement nucleotide sequence of any seed results in the same hash as the original forward seed. The reverse complement of a nucleotide sequence can be determined by reversing the order of the original nucleotide sequence and swapping As with Ts, Ts with A, Cs with Gs, and Gs with Cs. As an example, hash key 142 for original forward seed GTTTA 121a can have the same hash as hash key 142 for the reverse complement of seed GTTTA, which is TAAAC. In such implementations, once the matching reference sequence positions are stored in hash positions 144 or as entries in seed extension table 132, their sequence orientations can be annotated, for example, using a reverse-complement (RC) flag. However, in other implementations, the reverse complement of the seed may result in a different hash, and orientation does not need to be annotated at the matching reference sequence position stored in hash table 140 or hash position 144 of seed extension table 132.
[0075] Filling the position 144 of the hash table 140 may also include determining whether a decompression record is to be filled into the hash position 144. Determining whether the hash position 144 should be filled with a decompression record may include determining whether a node of the seed decompression tree 120 being used to fill the hash position is a leaf node. If the node is determined to be a leaf node, the computer 110 may determine not to store a decompression record in a hash position reached by a seed associated with the node. Alternatively, if the node is determined to not be a leaf node, the computer 110 may generate a decompression record and store the generated decompression record in the hash table position 144. Referring to the embodiment of FIG. 1, the computer 110 may determine, or has previously determined, that the node 121 is not a leaf node. In such an example, the computer 110 may generate and store the decompression record 153a in the hash table position 144-y reached by the seed 121a. Thus, hash location 144-y may include extension record 153a and interval record 153b.
[0076] The extension record, when executed by a computer, such as a central processing unit (CPU) or a graphics processing unit (GPU) or a programmable circuit 162 executing software instructions, can cause the CPU, GPU, or programmable circuit 162 to extend a seed used in a hash query that has reached the hash location where the extension record is stored, by one or more nucleotides. In some implementations, the extension record can be generated such that the extension record instructs a computer to extend the seed symmetrically on each end of the seed. Thus, by way of example, the extension record can be generated to instruct a computer, such as a CPU, GPU, or programmable circuit 162, to extend the seed by two nucleotides, by four nucleotides, by six nucleotides, etc. In such implementations, symmetric extension of the seed can be achieved by extending the seed by one nucleotide on each end of the seed, by two nucleotides on each end of the seed, by three nucleotides on each end of the seed, etc. In the example of Figure 1, the extension record 153a is configured to symmetrically extend the initial seed 121a by two bases. The computer 110 can determine the extension length to include in the extension record based on a variety of factors, including (i) the number of reference sequence positions that match the seed, (ii) the number of run-time seed extension repeats desired, (iii) the number of matching reference sequence positions desired for each repeat, etc. Run-time flexible seed extension using a hash table 140 is described in more detail below in connection with Figure 3.
[0077] Nucleotide seeds have generally been described as consisting of a contiguous set of contiguous nucleotides. Similarly, extension records have been described as sequentially extending the contiguous set of contiguous nucleotides by one or more additional amounts of nucleotides in a manner that may be symmetric or asymmetric, but still contiguous. However, the present disclosure is not limited to the use of contiguous sets of contiguous nucleotides. Instead, the seeds of the read or reference sequence may be seed patterns that are non-contiguous from the read or reference sequence. Similarly, the extension record, when processed by the CPU, GPU, or programmable circuitry 162, may include instructions to the CPU, GPU, or programmable circuitry 162 to extend the initial seed to incorporate neighboring bases or nucleotides that are non-contiguous. In such implementations, the matching reference sequence positions for each root node seed may be lexicographically sorted in the seed extension table 132 in a manner consistent with the use of non-contiguous seeds.
[0078] The computer 110 may continue to fill information into the hash location 144 for each remaining node 122, 123, 124, 125, 126 of the seed extender tree 120. As an example, the computer 110 may determine whether the node 122 is a leaf node. Based on a determination that the node 122 is not a leaf node, the computer 110 may use the node 122 to fill the hash location 144-3. Filling the hash location 144-3 with the node 122 may include storing an interval record 152b in the hash table location 144-3 reached by the seed 122a. The interval record 152b identifies the interval 122b for the node 122. The computer 110 determines, or has previously determined, that the node 122 is not a leaf node and generates an extender record 152a for storing in the hash location 144-3. 1, the extension record 152a includes instructions to symmetrically extend the seed 122a by two bases or nucleotides. These instructions in the extension record 152a can be executed at run time, for example, if the interval B is not accessed in response to a query for the seed 122a.
[0079] However, the disclosure is not so limited and other extension record scans can be generated that instruct the CPU, GPU, or programmable circuitry 162 to extend the seed by different additional nucleotide lengths (e.g., 2, 4, 6, 8, etc.) or in different ways (e.g., asymmetrically using 1, 3, 5, etc. additional nucleotide lengths). Although the example of FIG. 1 shows a single extension record in hash location 144-3, the disclosure is not so limited. Instead, in some implementations, multiple extension records can be stored in a single hash location 144-3. For example, computer 110 can also store one or more additional extension records in hash location 144-3 that are configured to extend initial seed 122a by four bases. In such implementations, CPU, GPU, or programmable circuitry 162 can, at run-time, first attempt to extend initial seed 122a by four bases. If such a seed extension fails, a subsequent query of the hash table 140, when executed, will not produce a matching reference sequence position, so the CPU, GPU, or programmable circuitry can obtain another extension record 152a that includes instructions to extend the initial base by only two bases, which can increase the likelihood that a matching reference sequence position will be returned.
[0080] The computer 110 can continue to fill information into the hash location 144 for each node 123, 124, 125, 126 of the seed extension tree 120. As an example, the computer can determine whether the node 123 is a leaf node. Based on a determination that the node 123 is not a leaf node, the computer 110 can fill the hash location 144-1 with the node 123. Filling the hash location 144-1 can include storing an interval record 150b in the hash table location 144-1 where the seed 123a arrives. The interval record 150b identifies the interval 123b for the node 123. The computer 110 determines, or has previously determined, that the node 123 is not a leaf node and generates an extension record 150a for storing in the hash location 144-1. In this example, the extension record 150a includes instructions to symmetrically extend the seed 123a by two bases or nucleotides. These instructions of decompression record 150a may be executed at run time, for example, if interval E is not accessed in response to a query for seed 123a.
[0081] The computer 110 may continue to fill information into the hash location 144 for each node 124, 125, 126 of the seed extension tree 120. As an example, the computer 110 may determine whether the node 125 is a leaf node. Based on the determination that the node 125 is a leaf node, the computer 110 may determine to fill the hash table 140 by storing a matching reference sequence location 155 identified by the interval D 125b that matches the seed "ACGTTTAGC" in the hash location 144-2. Alternatively, in other implementations, the computer 110 may determine to store an interval record in the hash location 144-2 that identifies the interval D 125b. Such a determination may be made by the computer 110 in some implementations based on whether storing each of the matching reference sequence locations in the hash table location 144 for the leaf node is an optimal use of memory resources. Thus, if it is determined that storing the matching reference sequence location at hash table location 144 for the leaf node does not satisfy a predetermined threshold usage of memory resources, computer 110 may store the matching reference sequence location at a hash location reached by the seed of the leaf node of the seed extension tree. Otherwise, if this memory resource usage threshold is exceeded, computer 110 may store an interval record at hash location 144 reached by the seed of the leaf node of the seed extension tree. Computer 110 determines, or has previously determined, that node 125 is a leaf node and does not generate an extension record for storing at hash location 144-2. Thus, in this example, there is no further extension of the seed "ACGTTTAGC" as would occur at run time.
[0082] As described above, hash location 144-2 can store only matching reference sequence locations that match seed 125a and correspond to hash key 142-1. This is because, in this example, seed 125a is the seed of a leaf node 125 that cannot be extended. However, the population of reference sequence locations without extension records or interval records, or both, is not limited to hash locations 144 reached by the seed of the leaf node. Instead, computer 110 can determine to fill hash locations 144 in other instances that have matching reference sequence locations without extension records or interval records. For example, in some implementations, computer 110 can fill hash locations 144 reached by a particular seed that have matching reference sequence locations without extension records or interval records, if the seed extension table 132 for a particular seed identifies only intervals of matching reference sequence locations that are less than a threshold number of matching reference sequence locations.
[0083] Other types of information can be stored in hash locations 144 of hash table 140. For example, computer 110 can receive instructions to insert one or more "stop" records into hash locations 144 of hash table 140. Such "stop" hash records can cause a particular hash location 140 to store an interval record or a set of one or more matching reference locations to return either (i) an interval record or (ii) a set of one or more matching reference locations without further extension of the seed used to reach the hash location. In other implementations, computer 110 can receive instructions to insert a "stop" record into a hash location that already contains an extension record. In such implementations, when the CPU, GPU, or programmable circuitry 162 encounters a "stop" record, the CPU, GPU, or programmable circuitry 162 can conditionally determine whether to (i) discard the extension record and return (i) an interval record, or (ii) a set of one or more matching reference locations that match the seed used to arrive at the hash location with the "stop" record, or (ii) perform a seed extension described by the extension record. In some implementations, the conditional determination can be based on one or more factors, such as the number of matching reference sequences identified by (i) the interval record, or (ii) the set of one or more matching reference sequence locations. Thus, insertions that insert one or more "stop" records into specific hash locations in response to each input seed can be used as a design tool to avoid the fixed maximum false match problem without restructuring a hash table, such as hash table 140.
[0084] The computer 110 may continue to iteratively fill in the hash locations 144 for each remaining node of the seed grow tree 120, such as nodes 124 and 126. Because nodes 124 and 126 are leaf nodes, like node 125, the entries for each of these leaf nodes may be filled in the manner described above for node 125.
[0085] In addition, the computer 110 can continue to apply the process described above in the embodiment of FIG. 1 with reference to the seed "GTTTA" 114-1 to each seed of the reference sequence 114. For example, once the seed "GTTTA" 114-1 has been processed as described above, the computer 110 can advance the seed access window to the next subsequent seed in the reference sequence, access the seed, and then perform the process described above with reference to the seed "GTTTA" 114-1 iteratively for each of the n seeds of the reference sequence. These processes can include obtaining a seed identified by the seed access window, determining whether the seed has more than a predetermined number of matching reference sequence positions, generating a seed extension tree if there are more than a predetermined number of matching reference sequence positions, and then filling the hash table 144 with the seeds and intervals identified by the nodes of the seed extension tree. In some implementations, the computer 110 can also iteratively perform the same process described above with reference to the seed "GTTTA" 114-1 for the reverse complement for each of the n seeds of the reference sequence 114. Culture of these iterative processes for each reference seed and each reverse complement can result in a hash table 140 with x index entries and y hash positions, where x and y are each 100 million or even 1 billion for a particular reference sequence, such as the human genome.
[0086] In some implementations, the hash table 140 can be used by a computer, such as computer 110, in software to execute software instructions that, when executed, cause the one or more CPUs, GPUs, or combinations thereof to perform the processes described with respect to Figures 3 and 4 to perform run-time flexible seed decompression by performing hash queries on the hash table 140. In other implementations, computer 110 can generate a hash table installation package that includes software instructions for installing the hash table 140 and the set of seed decompression tables 132A on another computer. For example, the hash table installation package can include software instructions that, when executed, perform the operations described by process 200 of Figure 2. Computer 110 can provide the hash table installation package that includes the software instructions to the other computer. The other computer can receive the hash table installation package and install the hash table 140 and the set of seed decompression tables 132A. The other computer can then perform run-time flexible seed extension by performing a hash query against hash table 140 in software using one or more CPUs, GPUs, or combinations thereof to execute software instructions that, when executed, cause one or more CPUs, GPUs, or combinations thereof to perform the process described with respect to Figures 3 and 4.
[0087] However, in some implementations, the computer 110 can generate a hash table installation package 146 that includes hardware programming language instructions that can configure the programmable circuit 162 to implement the mapping and aligning unit 170 in hardware digital logic circuitry. The hardware programming language instructions can be in the form of a file, such as a binary bitstream file. The binary bitstream file can be generated prior to inclusion in the hash table installation package 146 by compiling hardware programming language code, such as VHDL, Verilog, etc., that describes the circuitry to be implemented by the programmable circuit 162. The hardware programming language instructions of the hash table installation package, when processed by the programmable circuit 162, can cause the programmable logic circuit to program the dynamically configurable logic of the programmable logic circuit to implement flexible seed decompression by performing hash queries on the hash table 140 in hardware using the process described with respect to Figures 3 and 4. The hash table installation package 146 can also include a set of seed decompression tables 132A and instructions for installing the set of seed decompression tables 132A in a memory 180 accessible to the programmable circuit 162. The hash table installation package 146 may also include the hash table 140 and instructions for installing the hash table 140 in a memory 180 accessible to the programmable circuitry 162. The programmable circuitry 160 may be programmed to use the hash table 140 as part of a mapping / aligning unit 170 to perform mapping of short seeds to reference sequences, as discussed in more detail herein with respect to FIG.Computer 110 can provide the hash table installation package to device 160, such as a desktop computer, laptop computer, tablet computer, smartphone, cloud-based server, sequencer, or other device that houses programmable circuit 160 using one or more networks, one or more buses, a direct connection such as a USB cable, a USB-C cable, or any combination thereof. Device 160 can receive the hash table installation package and program programmable circuit 162 to implement mapping and aligning unit 170 within hardware logic gates of programmable circuit 162 using the hardware programming language instructions of the hash table installation package.
[0088] Thus, the respective hash table installation packages 146 can be used to manage the installation, use, and even removal of the hash table 140 and the seed extension tables in a variety of different ways. For example, in some implementations, the hash table 140 and the set of seed extension tables 132A can each be stored as a file on a hard disk or other storage medium, and then each can be loaded prior to runtime access into a common memory, such as a DRAM, that includes one or more components or modules for implementing runtime-flexible seed extension as described with respect to the processes described herein with reference to Figures 3 and 4. However, in other implementations, the hash table 140 or the set of seed extension tables 132A can each be stored together or separately as one or more distinct contiguous portions of a memory device, or non-contiguous portions of a memory device. Similarly, the hash table 140 or the set of seed decompression tables 132A can be compressed or uncompressed, stored on a common or separate storage medium and / or memory, or cached or uncached, so long as there is some way and method for the runtime mapping and aligning unit 170 to access selected portions of both the hash table 140 and the set of seed decompression tables 132A during runtime mapping or otherwise. In yet another implementation, the hash table 140 can be fully implemented within the hardware logic of the programmable circuit 162, and the set of seed decompression tables 132A can be stored in a memory 180 accessible by the programmable logic circuit 162, such as a DRAM memory unit. In yet another implementation, the hash table 140 can be stored in a memory 180 accessible by the programmable logic circuit 162, such as a DRAM memory unit, and the set of seed decompression tables 132A can be fully implemented within the hardware logic of the programmable circuit 162.
[0089] In some implementations, the computer 110 can also generate an installation package that includes the hash table and seed extension builder as described herein. The computer 110 can provide the installation package to another computer over a network. The installation package can be used to install the hash table and seed extension builder on another or different computer, allowing the party that receives and installs the hash table and seed extension builder to build its own hash table and seed extension table from its own selected reference sequences, in its own selected settings. Thus, the recipient of the hash table and seed extension builder installation package can build its own hash table at any time from the recipient's selected references, store the hash table on disk, load the hash table into memory 180 accessible to the programmable circuitry 162, and use the programmable circuitry 162 to perform mapping and aligning.
[0090] 2 is a flow chart of a process 200 for generating a hash table index that facilitates flexible seed extensions for hash table genome mapping. In general, the process 200 includes obtaining, by a computer system, a particular seed of nucleotides from a reference sequence, the particular seed representing a sequence of nucleotides having a nucleotide length of K nucleotides (210); determining, by the computer system, that the particular seed matches more than a predetermined number of reference sequence positions (220); and, based on determining that the particular seed matches more than the predetermined number of reference sequence positions, generating, by the computer system, a seed extension tree having a plurality of nodes, each node of the plurality of nodes being (i) an extension of the particular seed and representing a sequence of nucleotides having a nucleotide length of K nucleotides (221); * an extended seed having a nucleotide length of K *The hash table can be generated by (230) generating, for each node of the plurality of nodes, spacing information at a location in the hash table that corresponds to an index key of the extended seed, where K is one or more nucleotides greater than K, and (ii) a plurality of locations in a seed extension table that contain data describing reference sequence locations that match the extended seed, and (iii) storing, by the computer system, for each node of the plurality of nodes, spacing information at a location in the hash table that corresponds to an index key of the extended seed, where the spacing information references a plurality of locations in the seed extension table that contain data describing reference sequence locations that match the extended seed associated with the node. Process 200 is described in more detail below as being performed by a computer system, such as computer 110.
[0091] More specifically, the computer system can begin execution of process 200 by obtaining, by the computer system, a particular seed of nucleotides from a reference sequence, the particular seed representing a sequence of nucleotides having a nucleotide length of K nucleotides (210). In some implementations, obtaining the particular seed can include determining, by the computer system, a position of a seed access window in the reference sequence. The computer system can then obtain a subset of the reference sequence identified by the seed access window. The computer system can include one or more computers.
[0092] The computer system may continue executing process 200 by determining whether the particular seed matches more than a predetermined number of reference sequence positions (220). If the computer system determines that the particular seed does not match more than a predetermined number of reference sequence positions, the computer system may determine not to generate a seed extension tree for the particular seed. Instead, the computer system may obtain data describing each of the reference sequence positions that match the second seed. The computer system may then store the data describing the reference sequence positions that match the particular seed in a second location of the hash table that corresponds to the index key of the particular seed.
[0093] Alternatively, if the computer system determines that a particular seed matches more than a predetermined number of reference sequence positions, the computer system can generate a seed extension tree having a plurality of nodes (230), each node of the plurality of nodes being (i) an extension of the particular seed and having K * an extended seed having a nucleotide length of K * is one or more nucleotides greater than K, and (ii) a plurality of locations in a seed extension table that contain data describing reference sequence positions that match the extended seed. In some implementations, the plurality of locations can include contiguous intervals in the extension table of reference sequence positions that match the extended seed associated with the node.
[0094] The computer system may continue execution of process 200 by storing interval information for each node of the seed extension tree in a hash location of the hash table. In some implementations, the computer system may generate the hash table (240) by storing interval information for each node of the seed extension tree in a hash location of the hash table that corresponds to the index key of the extended seed. The interval information may include references to a number of seed extension locations that contain data describing reference sequence locations that match the extended seed associated with the node. In some implementations, the number of seed extension table locations described by the interval information may include a contiguous interval of locations in the seed extension table that contain data describing reference sequence locations that match the extended seed. Run-time flexible seed extension using hash table genome mapping
[0095] 3 is a context diagram of a runtime system 300 for performing runtime flexible seed extension for hash table genome mapping. The runtime system 300 includes a programmable logic circuit 162, a mapping and aligning unit 170, a hash table 140, a memory 18, and a number of seed extension tables, such as a seed extension table 132 stored in the memory 180. Although the embodiment of FIG. 3 describes the mapping and aligning unit 170 and the hash table 140 implemented in hardware using the hardware logic of the programmable logic unit 162, the disclosure is not so limited. Alternatively, the mapping and aligning unit 170 may be a software application implemented using software instructions executed by one or more CPUs, GPUs, or combinations thereof that access the hash table 140 stored in the memory unit.
[0096] The execution of run-time flexible seed extension for hash table genome mapping by the system 300 can be initiated by the mapping and aligning unit 170 accessing a current read 305. The current read 305 can be generated by a nucleic acid sequencer that has performed a primary analysis of the biological sample. The primary analysis can include receiving a biological sample, such as a blood sample, a tissue sample, or a sputum, by the nucleic acid sequencer, and generating output data, such as one or more reads 305, representing an order of nucleotides in a nucleic acid sequence in the received biological sample. In some implementations, the biological sample can include a DNA sample, and the nucleic acid sequencer can include a DNA sequencer. In such implementations, the order of sequenced nucleotides in the read 305 generated by the nucleic acid sequencer can include one or more of guanine (G), cytosine (C), adenine (A), and thymine (T) in any combination. In other implementations, the nucleic acid sequencer can include an RNA sequencer, and the biological sample can include an RNA sample. In such implementations, the order of sequenced nucleotides in a read generated by a nucleic acid sequencer can include one or more of G, C, A, and uracil (U) in any combination. Thus, although the example of FIG. 3 describes processing of reads consisting of G, C, A, and T generated by a DNA sequencer based on a DNA sample, the disclosure is not so limited. Alternatively, other implementations can process reads consisting of C, G, A, and U generated by an RNA sequencer based on an RNA sample.
[0097] In general, the mapping and aligning unit 170 can be configured to be agnostic to the type of reads that the mapping and aligning unit 170 receives, maps, and aligns. For example, in some implementations, the same binary code can be used to represent "T" and "U". The reads received by the mapping and aligning unit 170 can include DNA, cDNA, and / or RNA, and the reference can be DNA, cDNA, and / or RNA. In such implementations, the read bases T and / or U can share a single binary code, such that the reads T and / or U match the references T and / or U.
[0098] In some implementations, the nucleic acid sequencer can include a next generation sequencer (NGS) configured to generate sequence reads, such as reads 305, for a given sample in a manner that achieves ultra-high throughput, scalability, and speed through the use of massively parallel sequencing technologies. NGS allows for rapid sequencing of entire genomes and the ability to zoom into deeply sequenced target regions or utilize RNA sequencing (RNA-Seq) to discover novel RNA variants and splice sites or quantify mRNA for gene expression analysis, analysis of epigenetic factors such as genome-wide DNA methylation and DNA-protein interactions, sequencing of cancer samples to study rare body variants and tumor subclones, and studies of microbial diversity in humans or the environment.
[0099] Sequence reads such as reads 305 generated by a nucleic acid sequencer can be accessed and processed by a secondary analysis unit such as mapping and aligning unit 170. In some implementations, a secondary analysis unit such as mapping and aligning unit 170 can be implemented in hardware, such as digital logic, using a programmable circuit 162, such as a Field Programmable Gate Array (FPGA) or an Application Specific Integrated Circuit (ASIC). In other implementations, a secondary analysis unit such as mapping and aligning unit 170 can be implemented using one or more CPUs, GPUs, or a combination of both to implement the functionality of mapping and aligning unit 170. Hash table 140 can be implemented in hardware logic of programmable circuit 162, such as where mapping and aligning unit 170 is implemented using programmable circuit 162, although the disclosure is not so limited. Alternatively, the hash table 140 can be stored in a memory device and accessed when needed by (i) a CPU, GPU, or a combination of both executing software instructions that implement the functionality of the mapping and aligning unit 170, or (ii) a mapping and aligning unit 170 implemented in hardware digital logic circuitry.
[0100] In some implementations, the programmable circuitry 162 can be integrated with the nucleic acid sequencer that generated the lead 305. In such implementations, for example, the programmable circuitry 162 can be housed in an extension card, such as a Peripheral Component Interconnect (PCI) extension card, and installed in the nucleic acid sequencer. In other implementations, for example, each of the programmable circuits 162 can be part of a separate computer that is distinct from the nucleic acid sequencer and directly connected to the nucleic acid sequencer using an Ethernet cable, a USB cable, a USB-C cable, or the like. In still other implementations, for example, the programmable circuitry 162 can be integrated with a cloud-based server that is remotely accessible by the nucleic acid sequencer that generated the lead 305 using one or more wired or wireless networks, such as a local area network (LAN), a wide area network (WAN), a cellular network, the Internet, or a combination thereof.
[0101] The mapping and aligning unit 170 may receive a first hash query 310 that includes an initial seed "GTTTA" 310a. In some implementations, the hash query may simply consist of a seed of a sample read, such as the current read 305, that is used as an input to the hash table 140. In other implementations, additional data, metadata, etc. may be added to the seed of the sample read to convert the sample into a format that can be used to look up the hash table 140.
[0102] In the example of FIG. 3, the initial seed “GTTTA” 310a included in the hash query 310 is the current lead identified using the seed access window 305a. [Table 1] 305. The mapping and aligning unit 170 may perform a hash query 310 using the hash table 140 to map the short initial seed 310a to a hash location 144 using the hash function 143. In the example of FIG. 3, performing the hash query 310 may determine that the seed "GTTTA" 310a matches the hash index key "GTTTA" 142-2, which is mapped by the hash function 143 to a hash location 144-y.
[0103] The mapping and aligning unit 170 can use the hash table 140 to generate a response 310b to the hash query 310. The response 310b can include the contents of the hash location 144-y reached by the seed 310a of the hash query 310. The mapping and aligning unit 170 evaluates the response 310b to the hash query 310 to determine whether the contents include a set of matching reference sequence locations, extension records, interval records, or a combination thereof. If the response 310b includes only a set of matching reference sequence locations without extension records or interval records, the mapping and aligning unit 170 can store the set of matching reference sequence locations in the seed match set 352 along with metadata that associates the matching reference locations with the seed of the received query. Alternatively, if the mapping and aligning unit 170 determines that the response includes an interval record, an extension record, or both, then the mapping and aligning unit 170 must determine at 320 whether to use a matching reference seed identified by the interval record or to proceed with the extension of the seed of the query.
[0104] In the example of Figure 3, evaluation of response 310b indicates that (i) the response does not include a set of matching reference sequence positions, and (ii) the response 310b includes extension record 153a and interval record 153b. Based on the response 310b, mapping and aligning unit 170 can determine at 320 whether the matching reference positions identified by interval record 153b are accessed. In some implementations, mapping and aligning unit 170 is adapted not to access matching reference sequence positions identified by interval records, such as interval record 153b, if a response, such as 310b, to hash query 310 includes extension record 153a.
[0105] However, in other implementations, the mapping and aligning unit 170 can be configured to evaluate the number of matching reference sequence positions identified by the interval record 153b before using the extension record 153b to extend the seed 310a. In such implementations, if the number of matching reference sequence positions is below a predetermined threshold, the mapping and aligning unit 170 can output the matching reference sequence positions of the interval A identified by the interval record at 310d. Outputting the matching reference sequence positions can include the mapping and aligning unit 170 accessing the matching reference sequence positions stored in the interval A of the seed extension table 132 in the memory 180 and storing the accessed matching reference sequence positions in the seed match set storage 352. Once the accessed matching reference sequence positions are stored in the seed match set 352, the process described by FIG. 3 can end without further extension of the seed 310a. The seed access window 305a can then be adjusted forward by one or more nucleotides along the current read 305. Once the seed access window 305a is adjusted, the process described in connection with Figure 3 begins again and can continue iteratively until the entire current read 305 has been queried. However, in this alternative implementation, if it is determined that the number of matching reference sequence positions is not below a predefined threshold, the seed 310a can be extended using the extension record 152a.
[0106] Returning to the example of Figure 3, the mapping and aligning unit 170 does not apply the aforementioned threshold to the match identified by the interval record 153b. Instead, the mapping and aligning unit 170 determines at 320 not to use the matching reference sequence position identified by the interval record 153b because the output 310b includes the extension record 153a. Thus, in this scenario, the mapping and aligning unit 170 determines to extend the seed 310a.
[0107] Before proceeding to execute a subsequent query based on the extended seed, the mapping and aligning unit may store information describing interval A 310c in a "best interval" storage 350. Interval A may be considered the "best interval" of the matching reference sequence location in the seed extension table 132 for the seed 310a, since no other intervals have been identified and evaluated at this point in the process. However, in subsequent iterations of the process described by FIG. 3, each subsequent interval identified may be heuristically evaluated to determine whether the interval is better than the existing interval stored in the best interval storage for the initial seed 310a or the extended seed of the initial seed 310a. By storing information describing interval A 310c in the best interval storage 340, the matching reference sequence location of interval A recurred in the event extension of the initial seed 310a may cause a mapping failure, such as an unread mapping problem or a high probability mapping problem. The information describing interval A 310c can include data describing the start and end positions of a contiguous list of reference sequence positions that match the initial seed. In some implementations, the information describing interval A 310c can also include data identifying the seeds to which the reference sequence positions identified by interval A match.
[0108] The flexible seed extension performed by the mapping and aligning unit 170 can continue with the mapping and aligning unit 170 using the extension record 153a to generate a first extended seed 312a, which is an extension of the initial seed 310a. In the example of FIG. 3, the extension record 153a can include one or more instructions instructing the mapping and aligning unit 170 to symmetrically extend the initial seed 310a by two bases or nucleotides. In the example of FIG. 3, the symmetric extension of the initial seed "GTTTA" 310a by two bases or nucleotides results in an extended seed "CGTTTAG" 312a of the read 305. In some implementations, the additional nucleotides "C" and "G" used to extend the initial seed 310a can be obtained from the next nucleotides of the read 305 on either side of the initial seed 310a identified by the seed access window 305a.
[0109] In other implementations, such as when the seed access window is at the beginning of the read 305, there are additional seeds on each side of the seed access window to facilitate this seed extension, but the extension may cause the initial seed to extend beyond the boundary 305 of the read. In such implementations, the seed extension may fail, and the process of mapping the initial seed to a matching reference sequence position using the hash table 140 may end without adding any matching reference sequence positions to the seed match set 352 for the query cycle started from the initial seed. However, in such implementations, the seed access window 305a may be adjusted by one or more nucleotides in the forward direction along the read 305, and the next seed of the read 305 identified by the adjusted seed access window may be obtained for use as an initial seed for a hash query for a new query cycle using the hash table 140. Execution of a new query cycle for the next seed, and each of the seeds thereafter until each of the seeds have been processed, can be used to update the best interval storage 350, or to store one or more sets of matching reference sequence positions in the seed match set storage 352, or both, which can be evaluated to identify the optimal set of matching reference sequence positions for the read 305 as described with reference to FIG. 5, despite the failed seed extensions, thus resolving the unmapped read problem that may exist with conventional methods.
[0110] Similar seed extension failures can occur for similar reasons as the seed access window 305a progresses towards both ends of the lead 305. The present disclosure similarly resolves these seed extension failures by evaluating the best interval storage 250, the seed match set 353, or both, from a previous iteration of the hash query for the lead, as described with reference to FIG.
[0111] Returning to the example of FIG. 3, the mapping and aligning unit 170 may generate a subsequent hash query 312 that includes the first decompressed seed 312a. The mapping and aligning unit 170 may obtain the first decompressed seed 312a from the hash query 312 and use a hash table to map the first decompressed short seed 312a to a hash location 144 using a hash function 143. In some implementations, generating the hash query 312 using the first decompressed seed 312a may include providing the first decompressed seed 312a to the mapping and aligning unit 170 as an input for seed mapping using the hash table 140 without generating a query. In the example of FIG. 3, execution of the hash query 312 determines that the seed "CGTTTAG" 312a matches the hash index key "CGTTTAG" 142-x that is mapped to the hash location 144-3 by the hash function 143.
[0112] The mapping and aligning unit 170 can generate a response 312b to the hash query 312 using the hash table 140. The response 312b can include the contents of the hash location 144-3 reached by the seed 312a of the hash query 312. The mapping and aligning unit 170 can evaluate the response 312b to the hash query 312 and determine that the response 312b (i) does not include a set of matching reference sequence locations, and (ii) includes an extension record 152a and an interval record 152b. Based on the response 312b, the mapping and aligning unit 170 can determine at 330 whether the matching reference locations identified by the interval records 152b are accessed. In some implementations, the mapping and aligning unit 170 is adapted not to access the matching reference sequence locations identified by the interval records, such as interval record 152b, if the response, such as 312b, to the hash query 312 includes the extension record 152a.
[0113] However, in other implementations, the mapping and aligning unit 170 can be configured to evaluate the number of matching reference sequence positions identified by the interval records 152b before using the extension records 152b to extend the seed 312a. In such implementations, if the number of matching reference sequence positions identified by the interval records 152b is below a predetermined threshold, the mapping and aligning unit 170 can output the matching reference sequence positions of the interval B identified by the interval records 152b at 312d. Outputting the matching reference sequence positions can include the mapping and aligning unit 170 accessing the matching reference sequence positions stored in the interval B of the seed extension table 132 in the memory 180 and storing the accessed matching reference sequence positions in the seed match set storage 352. Once the accessed matching reference sequence positions are stored in the seed match set storage 352, the process described by FIG. 3 can end without further extension of the seed 312a. The seed access window 305a may then be adjusted by one or more nucleotides along the current read 305. Once the seed access window 305a is adjusted, the process described in connection with Figure 3 begins again and may continue iteratively until the entire current read 305 has been queried. However, in this alternative implementation, if it is determined that the number of matching reference sequence positions is not below a predefined threshold, the seed 312a may be extended using the extension record 152a.
[0114] Returning to the embodiment of Figure 3, the mapping and aligning unit 170 does not apply the aforementioned threshold to the matches identified by the interval records 152b. Instead, the mapping and aligning unit 170 determines at 330 not to use the matching reference sequence positions identified by the interval records 152b because the output 312b includes the extension records 152a. Thus, the mapping and aligning unit 170 determines to extend the seeds 312a.
[0115] Before proceeding to execute a subsequent query based on the extended seed, the mapping and aligning unit can determine whether to store information describing interval B 312c in the best interval storage 350 as the "best interval". Determining whether to store information describing interval B 312c as the "best interval" includes heuristically determining whether interval B is a better interval than the interval currently stored in the best interval storage 352 for a previous iteration of the first extended seed, which is interval A in this example. In one implementation, the best interval from among a plurality of intervals can be determined by evaluating the number of target hits returned for each interval. In such an implementation, the "best" interval can be selected according to a multipart rule. As an example, the mapping and aligning unit 170 can assign a first priority to an interval that contains at least a predetermined number of matching reference sequence positions, which can be referred to as a threshold such as intvl-target-hits(32) matches. However, if each interval has fewer than intvl-target-hits(32) matches, the interval with the most matches is stored as the best interval. Furthermore, the mapping and aligning unit 170 may assign a second priority to the interval associated with the longer extended seed since such intervals are preferred. Also, if the mapping and aligning unit 170 determines that at least one interval has at least intvl-target-hits(32) matches, the best interval is selected based on the interval associated with the longest extended seed from among all intervals that meet at least intvl-target-hits(32) matches. Although the examples herein refer to a threshold intvl-target-hits(32) having 32 matches, the disclosure need not be so limited. Instead, the threshold intvl-target-hits() may be sent to any number of matching reference sequence positions to implement this multipart heuristic rule.
[0116] In the example of FIG. 3, interval A, previously stored as the best interval in best interval storage 350, identifies six matching reference sequence positions 132-1 through 132-6, and interval B identifies three matching reference sequence positions 132-4 through 132-6. Applying an exemplary intvl-target-hit(10) threshold of 10 matches, mapping and aligning unit 170 may apply a multipart heuristic rule and determine that the interval meets the intvl-target-hit(10) threshold. Thus, according to the multipart heuristic rule, mapping and aligning unit 170 may select interval A as the best interval because interval A has the most matches between interval A and interval B, i.e., six matches. Based on application of this exemplary multipart heuristic rule, information describing interval B 321c may be discarded, and interval A remains stored as the best interval. However, under other embodiments applying different heuristic rules, which need not be multi-part heuristic rules, interval B may be selected as the best interval and stored in best interval storage 350 to replace interval A. Such results may ultimately be left to specific design configurations, such as the setting of the intvl-target-hits() threshold, the design of one or more heuristic rules, etc.
[0117] In the example of FIG. 3, the above-mentioned heuristic rules are used to compare interval A previously stored in best interval storage 350 with interval B included in response 312b to query 312. However, the disclosure need not be so limited. For example, in some implementations, a response to a hash query may include multiple interval records that were stored at hash locations 144 where a particular seed of the hash query was reached. In such implementations, mapping and aligning unit 170 may apply the above-mentioned heuristic rules to determine which of the multiple interval records should be accessed. Similarly, mapping and aligning unit 170 may also use such heuristic rules to determine the best interval to store in best interval storage 450 from among each of the interval records returned in the query response. As another example, the mapping and aligning unit 170 may also use such heuristic rules to determine the best interval to store in the best interval storage 450 from among each interval record returned in the query response and another interval previously stored in the best interval storage 350 for a previous iteration of a seed used in a query that returns multiple intervals.
[0118] In some implementations, the system 300 can facilitate storage of more than one best interval in the best interval storage 350. For example, in some implementations, up to two best intervals may be tracked. In some implementations, up to N best intervals may be tracked. In such implementations, if N>1 best intervals are stored, the criteria for determining which intervals are retained may involve evaluation of relationships between or among the interval candidates, their associated elongated seeds, or both, such as requiring that the N best intervals be associated with elongated seeds that do not overlap one another within a lead.
[0119] The performance of the flexible seed extension by the mapping and aligning unit 170 can continue with the mapping and aligning unit 170 using the extension record 152a to generate a second extended seed 314a that is an extension of the first extended seed 312a. In the example of FIG. 3, the extension record 152a can include one or more instructions instructing the mapping and aligning unit 170 to symmetrically extend the first extended seed 312a by two bases or nucleotides. In the example of FIG. 3, the symmetric extension of the first extended seed "CGTTTAG" 312a by two bases or nucleotides results in a second extended seed "ACGTTTAGC" 314a of the read 305. In some implementations, the additional nucleotides "A" and "C" used to extend the first extended seed 312a can be taken from the next nucleotides of the read 305 on either side of the first extended seed "CGTTTAG" 312a.
[0120] Returning to the example of FIG. 3, the mapping and aligning unit 170 may generate a subsequent hash query 314 that includes the second extended seed 314a. The mapping and aligning unit 170 may obtain the second extended seed 314a from the hash query 314 and use a hash table to map the second extended short seed 314a to a hash location 144 using a hash function 143. In some implementations, generating the hash query 314 using the second extended seed 314a may include providing the second extended seed 314a to the mapping and aligning unit 170 as an input for seed mapping using the hash table 140 without generating a query. In the example of FIG. 3, execution of the hash query 314 determines that the seed "ACGTTTAGC" 314a matches the hash index key "ACGTTTAGC" 142-1, which is mapped to the hash location 144-2 by the hash function 143.
[0121] The mapping and aligning unit 170 can use the hash table 140 to generate a response 314b to the hash query 314. The response 314b can include the contents of the hash location 144-2 reached by the second extended seed 314a of the hash query 314. The mapping and aligning unit 170 evaluates the response 314b to the hash query 314 and determines that the response 314b (i) includes a set of matching reference sequence locations 155, (ii) does not include an extension record, and (iii) does not include an interval record. Based on the response 314b, the mapping and aligning unit 170 can determine that the matching reference sequence locations 155 should be stored in the seed match set storage 352.
[0122] Because the response 314b does not include an extension record, the runtime flexible seed extension process for the seed "GTTTA" 310a of the read 305 ends. The seed access window 305a can continue to advance by one or more nucleotides along the read 305 until each of the processes described with respect to FIG. 3 have been performed for each respective seed of the read 305. This process is also described with respect to the flowchart of FIG. 4. As described above, if the seed access window 305a extends toward the end of the read 305, attempts to extend the seed input to the mapping and aligning unit 170 may fail, resulting in potential unmapped read problems. However, the present disclosure can use one or more intervals stored in the best interval storage, one or more reads stored in the seed match set 352, or a combination of both, to identify a set of matching reference sequence positions for the read 305, at least as described with respect to FIG. 5.
[0123] 4 is a flow chart of a process 400 for performing run-time flexible seed extension for hash table genome mapping. The process 400 is described below as being performed by a computer system of one or more computers. The one or more computers may include, for example, a mapping and aligning unit 170. For purposes of this disclosure, the one or more computers may include a CPU or GPU configured to retrieve and execute software instructions to implement specific programmed functionality described by the software instructions. Alternatively or in addition, the one or more computers may include a programmable circuit configured such that the hardware digital logic of the programmable circuit is configured to implement the specific programmed functionality in hardware.
[0124] The computer system can begin execution of the process 400 by executing a query of the hash table 405. The query can include a seed of nucleotides. The seed of nucleotides can include a subset of nucleotides obtained from a read. The read can include a set of nucleotides generated by the nucleic acid sequencer based on a biological sample input to the nucleic acid sequencer. The biological sample can include, for example, a blood sample, a tissue sample, sputum, etc.
[0125] As an example, a read generated by a nucleic acid sequencer based on a biological sample can include a series of nucleotides such as "ACGTTTAGC". This example includes a read of 9 nucleotides. However, the use of a read of 9 nucleotides is used as an example only. Instead of being limited to 9 nucleotides, a read as described by the present disclosure can be of any nucleotide length including, but not limited to, 5 bases or nucleotides, 10 bases or nucleotides, 12 bases or nucleotides, 15 bases or nucleotides, 18 bases or nucleotides, 21 bases or nucleotides, 25 bases or nucleotides, 35 bases or nucleotides, 50 bases or nucleotides, 100 bases or nucleotides, 150 bases or nucleotides, 1,000 bases or nucleotides, a million bases or nucleotides, or even more bases or nucleotides. A seed for a query can include a portion of a read such as "GTTTA". The seed obtained from a read for use in a first hash query during a first iteration of process 400 can be of any length K, where K is less than the number of bases or nucleotides in the read. In some implementations, K can be substantially smaller than the read nucleotide length, such as 1 / 100 of the read length, 1 / 10 of the read length, 1 / 5 of the read length, etc.
[0126] The computer system can execute queries that include the seeds by obtaining the seeds and comparing the seeds to hash keys in a hash table. The hash keys can correspond to each reference sequence seed, the reverse complement of each reference sequence seed, each extended seed of the reference sequence, and the reverse complement of each extended seed of the reference sequence. The reference sequence can include, for example, a reference genome or a portion of a reference genome for a species, such as a human or other animal. Once a hash key that matches a query seed is identified by the computer system, the computer system can map the hash key to one or more hash locations using a hash function. In some aspects of the present disclosure, the one or more hash locations can store (i) an extension record, (ii) an interval record, or (iii) one or more reference sequence locations. The computer system can generate a response to the query that includes the contents of one or more hash locations at which the query seed was reached.
[0127] The computer system may continue execution of process 400 by obtaining 410 a response to the executed query, including information stored by one or more locations in the hash table at which the query is determined to be reached. The query is determined to be reached at one or more locations in the hash table if the seed of the query is determined to match a hash key that is mapped to one or more locations using a hash function.
[0128] The computer system may continue executing process 400 by determining 415 whether the response to the executed query includes (i) an extension record, (ii) an interval record, or (iii) one or more matching reference sequence positions. Determining 415 by the computer system whether the response to the executed query includes (i) an extension record, (ii) an interval record, or (iii) one or more matching reference sequence positions may include parsing the received response and analyzing the parsed response data. The computer system may determine, based on the parsed data, whether the parsed data represents (i) an extension record, (ii) an interval record, or (iii) one or more matching reference sequence positions. In other implementations, the computer system may include one or more data flags indicating whether the response to the executed query includes (i) an extension record, (ii) an interval record, or (iii) one or more matching reference sequence positions.
[0129] In some examples, the computer system may continue execution of process 400 by determining at step 415 that the response does not include an extension record, an interval record, or one or more matching reference sequence positions. If the computer system determines that the response does not include (i) an extension record, (ii) an interval record, or (iii) one or more matching reference sequence positions, the process ends at step 420 without adding any matching reference sequence positions to the seed match set for the seed of the query. As an example, if the seed is an extended seed and there was a seed extension error, the obtained response to a query containing the seed may not include one or more matching reference sequence positions of (i) an extension record, (ii) an interval record, or (iii). Such a seed extension error may be present, for example, when the computer system attempts to extend the seed beyond the end of the read from which the seed was obtained.
[0130] Alternatively, in other examples, the computer system may continue execution of process 400 by determining that the response to the executed query includes (i) an extension record, (ii) an interval record, or (iii) both at step 415. In such examples, the computer system may continue execution of process 400 by determining (430) whether the extension table is accessed to obtain one or more matching reference sequence positions in the extension table referenced by the interval record.
[0131] In some examples, the computer system may continue execution of the process 400 by determining that the seed extension table is accessed to obtain one or more matching reference sequence positions in the extension table re-referenced by the interval record. For example, in some implementations, the computer system may be configured to access the seed extension table to obtain one or more matching reference sequence positions identified by the interval record if the number of matching reference sequence positions is below a predetermined threshold. Alternatively, or in addition, the computer system may be configured to access the seed extension table to obtain one or more matching reference sequence positions identified by the interval record if the response to the executed query also includes a "stop" record stored at the hash position reached by the seed of the hash query. The "stop" record may preferentially instruct the computer system not to perform further seed extension of the seed in the query and not to access one or more matching reference sequence positions identified by the interval record, such as when the number of matching reference sequence positions is below a predetermined threshold.
[0132] In such an example where it is determined in step 430 that the seed extension table is accessed, the computer system may continue executing process 400 by accessing the seed extension table to obtain one or more reference sequence locations in the seed extension table (450). The computer system may identify a particular set of one or more matching reference sequence locations to obtain from the seed extension table by using an interval record. The interval record may include information referencing multiple locations in the seed extension table that includes data describing the reference sequence locations that match the seed of the query. In some implementations, the information referencing multiple locations may include a contiguous interval of reference sequence locations in the extension table that match the extended seed of the query. Alternatively, in other implementations, the information referencing multiple locations may include one or more non-contiguous intervals of reference sequence locations in the extension table that match the seed of the query.
[0133] In such an example, the computer system may obtain one or more matching reference sequence locations from the seed extension table identified using the interval record. The obtained one or more reference sequence locations may be added to the seed match set (455). In some implementations, adding one or more matching reference sequence locations to the seed match set may include obtaining and storing data representing the one or more matching reference sequence locations in a location of a memory device allocated for seed match set storage. In other implementations, adding one or more matching reference sequence locations to the seed match set may include storing data, such as a pointer, that references an interval or intervals of the seed extension table that store the one or more reference sequence locations. Thus, the seed match set may be a storage location that stores the set of identified and obtained matching reference sequence locations. Alternatively, the seed match set may include one or more storage locations that store references to one or more matching reference sequence locations. Once the computer system has added one or more matching reference sequence locations identified by the interval record to the seed match, this example of process 400 may end at 460.
[0134] In another example, after the computer system determines (415) that the response includes at least (i) an extension record, (ii) an interval record, or (iii) or both, the computer system may determine (430) that the seed extension table will not be accessed to obtain one or more matching reference sequence positions. The computer system's determination that the seed extension table will not be accessed to obtain one or more matching reference sequence positions may be based on a variety of factors. As an example, in some implementations, the computer system may determine that if the response returns an extension record, then the seed extension table will not be accessed to obtain matching reference sequence positions identified by the interval record. Such a determination may be preferable because the extended seed is more likely to produce a set of matching reference sequence positions that is smaller than the set of matching reference sequence positions identified by the interval record.
[0135] As another example, in other implementations, the computer system may determine not to access the seed extension table to obtain matching reference sequence positions identified by the interval records when the computer system determines that the number of matching reference sequence positions exceeds a predetermined threshold number of matching reference sequence positions. Similarly, in such implementations, the computer system may determine not to access the seed extension table when the matching reference sequence positions identified by the interval exceed the match threshold.
[0136] If the computer system determines at 430 that the seed extension table is not accessed, the computer system may continue execution of the process 400 by determining at 465 whether the obtained response includes an interval record and an extension record. If the computer system determines at 465 that the obtained response includes an interval record and an extension record, the computer system may determine at 435 whether to store the interval record, or information describing the interval record included in the response to the executed query, as a best interval candidate. During the first iteration of the process 400 for a query having an initial seed that has not yet been extended, the computer system may determine to store the interval record, or information describing the interval record, in a best interval storage in the memory device as a best interval candidate. Such an interval record is encountered during the initial iteration of the process 400 for a query having an initial seed that has not yet been extended, and therefore there are no other interval records encountered in response to other queries for one or more subsequent extended seeds. Thus, the first interval returned in response to a query having an initial seed that has not yet been extended must be the "best interval" since there are no other intervals yet identified for comparison.
[0137] However, for subsequent interactions with process 400 after a response is received to the query with the extended seed, the computer system may obtain the second interval record from the response to the query with the extended seed. In such an example, the computer system may heuristically determine whether the second interval record should be used to replace a previously stored best interval candidate in the best interval storage. The determination as to whether to keep the previously stored best interval candidate or to replace the best interval candidate with the second interval or information describing the interval may be made by applying one or more heuristic rules, as described with reference to the example of FIG. 3. In some implementations, the heuristic rules may include one or more multi-part heuristic rules.
[0138] Some implementations of the present disclosure may aim to iteratively evaluate each subsequently returned interval record against previously stored best interval candidates to determine a single best interval to be stored for the current lead on which the seed of the query is based, but the disclosure need not be so limited. Instead, some implementations may save all intervals in an interval storage and later evaluate them for use in completing the seed match set.
[0139] The computer system may continue execution of the process 400 by generating (440) an extended seed. The extended seed may be generated based on instructions included in an extension record returned in response to the query. By way of example, the extension record, when executed by a computer, such as a central processing unit (CPU) or a graphics processing unit (GPU) or a programmable circuit 162 executing software instructions, may cause the CPU, GPU, or programmable circuit to extend a seed used in a hash query that has reached a hash location where the extension record is stored, by one or more nucleotides. In some implementations, the extended record may be generated such that the extension record instructs the computer to extend the seed symmetrically on each end of the seed. Thus, by way of example, the extension record may be generated to instruct a computer, such as a CPU, GPU, or a programmable circuit 162, to extend the seed by two nucleotides, by four nucleotides, by six nucleotides, etc. In such implementations, symmetric extension of the seeds can be achieved by extending the seeds by one nucleotide on each end of each of the seeds, by two nucleotides on each end of each of the seeds, by three nucleotides on each end of each of the seeds, etc. However, the present disclosure should not be limited to symmetric extension of the seeds. Instead, asymmetric extension of the seeds is also contemplated by the present disclosure.
[0140] The computer system may continue executing process 400 by generating a hash query including the extended seed at 445. The computer system then performs another iteration of process 400 by executing a query with the extended query at stage 405, and then continues executing process 400 until the process ends at 427 or 460 by (a) adding one or more matching reference sequence positions to the seed match set, the process ends at 475 after determining whether to store the interval record as a best interval candidate, or (c) the process ends at stage 420 as a result of one or more errors, such as a seed extension error, that results in the query not receiving a response to the executed query that includes (i) an extended record, (ii) an interval record, or (iii) one or more matching reference sequence positions.
[0141] Alternatively, if at step 465 the computer system determines that the obtained response does not include both an interval record and an extension record, the computer system may continue execution of process 400 by determining whether the obtained response includes an extension record.
[0142] If the computer system determines that the obtained response includes the decompressed record, the computer system may continue executing process 400 by generating an decompressed seed at step 440, generating a hash query 445 that includes the decompressed seed, and performing another iteration of process 400 by executing the query with the decompressed query at step 405. The computer system may then continue executing process 400 until (a) the process ends at 427, 420, 460, 475.
[0143] On the other hand, if the computer system determines that the obtained response does not include an extension record, the computer system may continue execution of process 400 by determining whether to store the interval record or information describing the interval record as a best interval candidate in step 470. The computer system may determine whether to store the interval record as a best interval candidate in step 470 using the same process described with respect to determining whether to store the interval record as a best interval candidate in step 435. Regardless of whether the computer system determines to store the interval record as a best interval candidate in step 470, process 400 ends in step 475.
[0144] At least one variation of process 400 may be implemented where the computer system instead determines whether the obtained response includes an interval record at step 470. In such an example, logically, if the computer system determines that the obtained response includes an interval record, the computer system may continue executing the process at step 470. Alternatively, if the computer system determines that the obtained response does not include an interval record, the process continues by generating an extended seed at step 440. Other variations of the process flow of process 400 may be similarly implemented and remain within the spirit and scope of the present disclosure.
[0145] 5 is a flow chart of a process 500 for performing iterative runtime flexible seed extension for hash table genome mapping for each seed of a read. In general, the process 500 can include obtaining a read generated by a nucleic acid sequencer (505), determining a position of a seed access window, where the seed access window identifies the seed of the read (510), generating a hash query including the seed identified by the seed access window (515), executing the generated hash query until the process 400 is terminated and continuing the iterative execution of the process 400 (520), and determining whether the read includes another seed (525), and if it is determined that the read includes another seed (525), adjusting the seed access window to identify another seed (530) and executing the step 515 to generate a hash query using the other seed (515).
[0146] Process 500 may continue to execute the processing loop of steps 515, 520, 525, and 530 until it is determined in step 525 that the read obtained in step 505 does not include another seed to be mapped and aligned using process 400. In such an example, it may be determined (535) whether to use the best interval to complement the current seed match set for the read. If it is determined in step 535 that the best interval is to be used to complement the current seed match, process 500 may continue (540) by processing the best interval in step 540, complementing (545) the current seed match set with one or more matching reference sequence positions obtained from the portion of the seed extension table identified using the best interval, and determining (550) whether there is another read ready for mapping and alignment using process 500. If there is not another read ready for mapping and alignment, process 500 ends in step 555. Alternatively, if there is another read that is ready for mapping and aligning using process 500, process 500 continues by obtaining another read that is ready for mapping and aligning in step 505. Process 500 can then continue to perform process 500 iteratively until it is determined in step 550 that there is no another read that is ready for mapping and aligning using process 500.
[0147] Process 500 is described in more detail below as being executed by a computer system of one or more computers. The one or more computers may include, for example, mapping and aligning unit 170. For purposes of this disclosure, the one or more computers may include a CPU or GPU configured to retrieve and execute software instructions to implement specific programmed functionality described by the software instructions. Alternatively, or in addition, the one or more computers may include a programmable circuit configured such that hardware digital logic of the programmable circuit is configured to implement specific programmed functionality in hardware.
[0148] The computer system can begin executing process 500 by acquiring (505) data representing nucleic acid reads (also referred to herein as "reads") generated by a nucleic acid sequencer. The reads can be received by the computer system from the nucleic acid sequencer as input after the reads are generated by the nucleic acid sequencer. Alternatively, or in addition, the reads generated by the nucleic acid sequencer may be stored in a memory device accessible to the computer system. The computer system 500 can then acquire the stored read(s) by accessing the memory to retrieve one or more reads from the memory device. As an example, a read can include a set of nucleotides such as "ACGTTTAGC". This example includes a nine-nucleotide read. However, the use of a nine-nucleotide read is used as an example only. Instead of being limited to 9 nucleotides, a read as described by this disclosure can be of any nucleotide length including, but not limited to, 5 bases or nucleotides, 10 bases or nucleotides, 12 bases or nucleotides, 15 bases or nucleotides, 18 bases or nucleotides, 21 bases or nucleotides, 25 bases or nucleotides, 35 bases or nucleotides, 50 bases or nucleotides, 100 bases or nucleotides, 150 bases or nucleotides, 1,000 bases or nucleotides, a million bases or nucleotides, or even more bases or nucleotides.
[0149] The computer system can continue executing the process 500 by determining (510) the location of a seed access window. The seed access window can be used to identify a nucleotide seed comprised of a subset of the nucleotides of the read. An example of a seed is the set of contiguous nucleotides "GTTTA" that is a seed for the read "ACGTTTAGC". Although the set of contiguous nucleotides "GTTTA" represents an example of a contiguous seed for the read "ACGTTTAGC", the disclosure need not be so limited. Instead, in some implementations, seeds that are non-contiguous can be obtained and analyzed using the systems and processes described by the present disclosure. For example, seeds that are non-contiguous, such as "G_T_A", can also be obtained from the read "ACGTTTAGC" and analyzed using the systems and methods described herein. In such implementations, the systems and methods of the present disclosure can treat skipped positions, represented by an underscore "_", as wildcards that can match any base or nucleotide.
[0150] The seed access window can be configured to be any base or nucleotide length less than the read length. The seed access window can be configured to move forward or backward along a continuous read to identify seeds of the read for processing. If non-contiguous seeds are utilized, the seed access window can be configured accordingly. As an example, the seed access window can be configured to identify non-contiguous seeds of 9 nucleotides with wildcards inserted at nucleotide position 6 and nucleotide position 8.
[0151] The computer system may continue execution of process 500 by generating (515) a hash query that includes the seed identified by the seed access window. In some implementations, the hash query may simply consist of the seed of the lead, "GTTTA," such as "ACGTTTAGC." In other implementations, additional data, metadata, etc., may be added to the sample seed to convert the seed into a format that can be used to search the hash table.
[0152] The computer system may continue executing process 500 (520) by performing process 400 described by Figure 4 to map and align the generated query seed to one or more reference sequence locations. The computer system begins executing process 400 at step 410 by executing the hash query generated at step 515. The computer system may then continue iteratively executing process 400, possibly adding matching reference sequence locations to the seed match set at steps 425 or 455, until process 400 terminates at steps 420, 427, 460, or 475.
[0153] After process 400 is completed, the computer system may determine (525) whether the lead obtained in step 505 includes another seed. In some implementations, determining whether the lead includes another seed includes considering all possible seed access window positions in the lead. Alternatively, determining whether the lead includes another seed may include considering only a predefined subset of all possible seed access window positions, such as only even seed access window positions or only odd seed access window positions. Thus, the present disclosure does not require that each seed of the lead be evaluated using process 500. Instead, in some implementations, the computer system may determine in step 505 whether there is another seed of a predefined subset of the seeds of the lead that are evaluated using process 500.
[0154] If the computer system determines in step 525 that the read includes another seed, the computer system may adjust the seed access window to identify (530) the other seed, and the computer system may execute step 515 to generate (515) a hash query using the other seed identified by the adjusted seed access window. Adjusting the seed access window may include, for example, moving the seed access window forward along the read obtained in step 505 by one or more base or nucleotide positions. The computer system may continue to execute the processing loop of steps 515, 520, 525, and 530 until the computer system determines in step 525 that the read obtained in step 505 does not include another seed that is mapped and aligned using process 400.
[0155] If the computer system determines that the read obtained in step 505 does not include another seed to be mapped and aligned, the computer system can determine (535) whether to use the best interval to complement the current seed matched set of reads. In some examples, if the computer system determines that the seed matched set should not be complemented, the computer system can determine (550) whether there is another read that is ready for mapping and aligning using process 500. In such examples, if the computing system determines that there is another read that is ready for mapping and aligning, the computer system can continue executing process 500 by acquiring another read that is ready for mapping and aligning in step 505. The computer system can then perform process 500 iteratively until it is determined in step 550 that there is no another read that is ready for mapping and aligning using process 500.
[0156] Alternatively, in another example, the computer system can determine that the current seed match set for the read should be complemented with one or more matching reference sequence positions identified by the best interval. The computer system can determine that the current seed match set should be complemented with one or more matching reference sequence positions identified by the best interval by applying one or more heuristic rules to (i) the seed length of the extended sequence from which the query produced the best interval, (ii) the seed length of the one or more matching reference sequence positions, (iii) the number of seed strands generated, or a combination thereof. In some implementations, the heuristic rules can specify one or more independent trigger conditions that, when triggered, cause the computer system to process the best interval.
[0157] As an example, a first independent trigger condition that can trigger processing by the computer system of the best interval is to determine whether the seed length of the extended seed that produced the best interval for which the query was made was greater than or equal to intvl-seed-length(60) bases or nucleotides. In this example, the threshold intvl-seed-length(60) is a predefined threshold that can be used by the computer system to evaluate the length of the extended seed that produced the best interval. In this example, the seed length of the extended seed that produced the best interval that the computer system checks is 60 nucleotides. However, the disclosure need not be so limited. Instead, the threshold intvl-seed-length() can be set to any nucleotide length. If the computer system determines that the intvl-seed-length() threshold has not been met, the computer system can evaluate other trigger conditions to determine whether the best interval is to be processed.
[0158] As another example, a second independent trigger condition that can trigger processing of the best interval by the computer system is determining whether the seed length of the extended seed from which the query produced the best interval was greater than the longest matching reference sequence position processed by at least intvl-seed-longer(8) bases or nucleotides. In this example, the threshold intvl-seed-longer(8) is a predefined threshold that can be used by the computer system to evaluate a comparison of (i) the seed length of the extended seed from which the query produced the best interval and (ii) the longest matching reference sequence position. In this example, processing of the best interval is triggered if the computer system determines that the seed length of the extended seed from which the query produced the best interval was greater than 8 bases or nucleotides greater than any of the matching seeds.
[0159] As another example, a third independent trigger condition that can trigger processing by the computer system of the best interval is determining whether the number of seed strands is less than intvl-min-chains(8). A seed strand can include a group of matches of similarly positioned reference sequence positions. In this example, the threshold intvl-min-chains(8) is a pre-defined threshold that can be used to evaluate the number of seed strands generated. In this example, if fewer than 8 seed strands are generated, processing of the best interval is triggered.
[0160] Although three example independent trigger conditions are described for triggering the processing of the best interval to complete the seed match set, the present disclosure need not be so limited. Instead, other trigger conditions can be constructed to trigger the processing of the best interval as a particular computer system may require. For example, if the computer system determines to complement the seed match in step 535 because one or more thresholds of the trigger condition for processing the best interval are met, the computer system may determine to use the best interval to complement the current seed match set in step 535. Complementing the current seed match set with the best interval may include the computer system processing (540) the best interval. Processing the best interval may include applying one or more heuristic rules to the best interval to identify one or more matching reference sequence positions identified by the best interval and stored in the seed extension table.
[0161] As an example, the computer system may determine to process all of the one or more reference sequence positions identified by the best interval if the number of reference sequence positions identified by the best interval is less than or equal to intvl-max-hits(64). In this embodiment, if the computer system determines that the best interval identifies 64 or fewer matching reference sequence positions, the computer system may retrieve all of the matching reference sequence positions identified by the best interval from the seed extension table using the best interval. Alternatively, if the computer system determines that the best interval identifies more than 64 matching reference sequence positions, the computer system may randomly retrieve intvl-sample-hits(32) matching reference sequences from the set of matching reference sequence positions identified by the best interval.
[0162] Randomly obtaining the threshold amount of 32 matching reference sequence positions can include obtaining the threshold amount of 32 matching reference sequence positions randomly or by deterministic pseudorandom selection from a seed extension table using a best interval. The best interval can include data identifying (i) one or more stop and start positions of the seed extension table, (ii) one or more start positions and one or more offsets, or a combination thereof. Although examples of thresholds such as 64 matching reference positions and 32 randomly sampled hits are described, the present disclosure need not be so limited. Instead, other thresholds having other numerical values can be used to achieve the benefits of the present disclosure.
[0163] The matching reference sequence positions obtained using the best interval can be used to complement the current seed match set 545. Such complementation of the seed match set with the best interval can solve problems such as unmapped read problems or high probability mismapping problems that may result in no matching reference sequence positions stored in the seed match set or may result in only a few matching reference sequence positions stored in the seed match set. The matching reference sequence positions may have been or can be obtained from a portion of the seed extension table identified by the best interval (540).
[0164] Once the seed match set is replenished, the computer system can determine whether there is another read ready for mapping and aligning using process 500. If there is another read ready for mapping and aligning, the computer system continues executing process 500 by acquiring another read. Alternatively, if there is not another read ready for mapping and aligning, process 500 can end at 555.
[0165] In the embodiment described with reference to process 500, the best interval is evaluated to determine whether the best interval or a portion of the best interval can be used to complement the seed match set. However, it is not necessary that only a single best interval is stored in the best interval storage. In some implementations, the computer system can facilitate storage of more than one best interval in the best interval storage. For example, in some implementations, up to two best intervals may be tracked. In some implementations, up to N best intervals may be tracked. In such implementations, if N>1 best intervals are stored, the criteria for determining which intervals are retained can involve evaluation of the relationship between or among the interval candidates, their associated extended seeds, or both, such as requiring that the N best intervals be associated with extended seeds that do not overlap each other in the read. In some implementations, the computer system can even select the matching reference sequence position from among multiple different best intervals. Such selection of matching reference sequence positions from among a number of different best intervals can be performed randomly, pseudo-randomly, or by applying one or more heuristics. System Components
[0166] FIG. 6 is a diagram of system components that can be used to implement the systems described herein relating to flexible seed extension for hash table genome mapping.
[0167] Computing device 600 is intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. Computing device 650 is intended to represent various forms of mobile devices, such as personal digital assistants, mobile phones, smartphones, and other similar computing devices. In addition, computing device 600 or 650 may include a Universal Serial Bus (USB) flash drive. A USB flash drive may store an operating system and other applications. A USB flash drive may include input / output components, such as a wireless transmitter or a USB connector that may be inserted into a USB port of another computing device. The components, connections and relationships of the components, and functions of the components illustrated herein are meant to be merely examples and are not meant to limit the implementation of the inventions described and / or claimed in this document.
[0168] Computing device 600 includes a processor 602, a memory 604, a storage device 608, a high-speed interface 608 connecting to memory 604 and a high-speed expansion port 610, and a low-speed interface 612 connecting to a low-speed bus 614 and storage device 608. Each of the components 602, 604, 608, 608, 610, and 612 are interconnected using various buses and may be implemented on a common motherboard or in other manners as appropriate. Processor 602 may process instructions for execution within computing device 600, including instructions stored in memory 604 or storage device 608, to display graphical information for a GUI on an external input / output device, such as a display 616 coupled to the high-speed interface 608. In other implementations, multiple processors and / or multiple buses may be used, along with multiple memories and types of memories, as appropriate. Multiple computing devices 600 may also be connected such that each device provides a portion of the required operations, for example, as a bank of servers, a group of blade servers, or a multiprocessor system.
[0169] The memory 604 stores information within the computing device 600. In one implementation, the memory 604 is a volatile memory unit or units. In another implementation, the memory 604 is a non-volatile memory unit or units. The memory 604 may also be another form of computer-readable medium, such as a magnetic disk or optical disk.
[0170] The storage device 608 can provide mass storage for the computing device 600. In one implementation, the storage device 608 can be or contain a computer-readable medium such as a floppy disk device, a hard disk device, an optical disk device, or a tape device, a flash memory or other similar solid-state memory device, or an array of devices including devices in a storage area network or other configuration. The computer program product can be tangibly embodied in an information carrier. The computer program product can also contain instructions that, when executed, perform one or more methods, such as those described above. The information carrier is a computer-readable or machine-readable medium, such as the memory 604, the storage device 608, or a memory on the processor 602.
[0171] The high-speed controller 608 manages the bandwidth-intensive operations of the computing device 600, while the low-speed controller 612 manages the low-bandwidth-intensive operations. Such an allocation of functions is only one example. In one implementation, the high-speed controller 608 is coupled to the memory 604, the display 616, for example, via a graphics processor or accelerator, and to a high-speed expansion port 610 that can accept various expansion cards (not shown). In this implementation, the low-speed controller 612 is coupled to the storage device 608 and the low-speed expansion port 614. The low-speed expansion port, which can include various communication ports, for example, USB, Bluetooth, Ethernet, wireless Ethernet, can be coupled to one or more input / output devices, such as a keyboard, a pointing device, a microphone / speaker pair, a scanner, or a networking device, such as a switch or router, for example, via a network adapter. The computing device 600 can be implemented in several different forms, as shown in the figure. For example, the computing device 600 can be implemented as a standard server 620, or multiple times within a group of such servers. Computing device 600 can also be implemented as part of a rack server system 624. In addition, computing device 600 can be implemented in a personal computer, such as a laptop computer 622. Alternatively, components from computing device 600 can be combined with other components in a mobile device (not shown), such as device 650. Each such device can contain one or more of computing devices 600, 650, and the entire system can be made up of multiple computing devices 600, 650 in communication with each other.
[0172] The computing device 600 can be implemented in a number of different forms, as shown in the figure. For example, the computing device 600 can be implemented as a standard server 620, or multiple times within a group of such servers. The computing device 600 can also be implemented as part of a rack server system 624. In addition, the computing device 600 can be implemented in a personal computer, such as a laptop computer 622. Alternatively, components from the computing device 600 can be combined with other components in a mobile device (not shown), such as device 650. Each such device can contain one or more of the computing devices 600, 650, and the entire system can be made up of multiple computing devices 600, 650 in communication with each other.
[0173] Computing device 650 includes, among other components, a processor 652, memory 664, and input / output devices such as a display 654, a communication interface 666, and a transceiver 668. Device 650 may also include a storage device, such as a microdrive or other device, to provide additional storage. Each of components 650, 652, 664, 654, 666, and 668 are interconnected using various buses, and some of the components may be implemented on a common motherboard or in other manners as appropriate.
[0174] The processor 652 can execute instructions in the computing device 650, including instructions stored in the memory 664. The processor can be implemented as a chipset of chips including separate and multiple analog and digital processors. In addition, the processor can be implemented using any of several architectures. For example, the processor 610 can be a CISC (Complex Instruction Set Computers) processor, a RISC (Reduced Instruction Set Computer) processor, or a MISC (Minimal Instruction Set Computer) processor. The processor can provide coordination of other components of the device 650, such as, for example, control of a user interface, applications executed by the device 650, and wireless communication by the device 650.
[0175] The processor 652 can communicate with a user via a control interface 658 and a display interface 656 coupled to a display 654. The display 654 can be, for example, a TFT (Thin-Film-Transistor Liquid Crystal Display) display, an OLED (Organic Light Emitting Diode) display, or other suitable display technology. The display interface 656 can include appropriate circuitry for driving the display 654 to present graphical and other information to a user. The control interface 658 can receive commands from a user and translate the commands for submission to the processor 652. Additionally, an external interface 662 can be provided in communication with the processor 652 to enable near-field communication between the device 650 and other devices. The external interface 662 can provide, for example, wired communication in some implementations or wireless communication in other implementations, and multiple interfaces can also be used.
[0176] The memory 664 stores information within the computing device 650. The memory 664 can be implemented as one or more of a computer readable medium or media, a volatile memory unit or unit, or a non-volatile memory unit or unit. Also, an expansion memory 674 can be provided and connected to the device 650 via an expansion interface 672, which can include, for example, a SIMM (Single In Line Memory Module) card interface. Such expansion memory 674 can provide additional storage space for the device 650 or can store applications or other information for the device 650. In particular, the expansion memory 674 can include instructions that perform or complement the processes described above and can also include secure information. Thus, for example, the expansion memory 674 can be provided as a security module for the device 650 and can be programmed with instructions that enable secure use of the device 650. Additionally, secure applications can be provided via a SIMM card along with additional information, such as placing identifying information on the SIMM card in an unhackable manner.
[0177] The memory may include, for example, flash memory and / or non-volatile random-access memory (NVRAM) memory, as described below. In one implementation, a computer program product is tangibly embodied in an information carrier. The computer program product contains instructions that, when executed, perform one or more methods, such as those described above. The information carrier is a computer-readable or machine-readable medium, such as memory 664, expansion memory 674, or memory on processor 652, which may be received via transceiver 668 or external interface 662.
[0178] The device 650 can communicate wirelessly via a communication interface 666, which can include digital signal processing circuitry as needed. The communication interface 666 can provide for communication under various modes or protocols, such as GSM voice calls, SMS, EMS, or MMS messaging, CDMA, TDMA, PDC, WCDMA, CDMA2000, or GPRS, among others. Such communication can occur, for example, via a radio frequency transceiver 668. In addition, short-range communication can occur, such as using Bluetooth, Wi-Fi, or other such transceivers (not shown). In addition, a Global Positioning System (GPS) receiver module 670 can provide additional navigation-related and location-related wireless data to the device 650, which can be used by applications running on the device 650 as appropriate.
[0179] Device 650 can also communicate audibly using audio codec 660, which can receive speech information from a user and convert the speech information into usable digital information. Audio codec 660 can also generate audible sounds for the user, such as through a speaker in a handset of device 650. Such sounds can include sounds from a voice telephone call, can include recorded sounds, such as voice messages, music files, and the like, and can also include sounds generated by applications running on device 650.
[0180] Computing device 650 can be implemented in a number of different forms, as shown in the figure. For example, computing device 650 can be implemented as a mobile phone 680. Computing device 650 can also be implemented as part of a smartphone 682, personal digital assistant, or other similar mobile device.
[0181] Various implementations of the systems and methods described herein can be realized in digital electronic circuitry, integrated circuits, specially designed ASICs (application specific integrated circuits), computer hardware, firmware, software, and / or combinations of such implementations. These various implementations can be special purpose or general purpose, and can include implementations in one or more computer programs executable and / or interpretable on a programmable system including at least one programmable processor coupled to receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0182] These computer programs (also known as programs, software, software applications, or code) contain machine instructions for a programmable processor and may be implemented in high-level procedural and / or object-oriented programming languages and / or assembly / machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and / or device, such as magnetic disks, optical disks, memories, Programmable Logic Devices (PLDs) used to provide machine instructions and / or data to a programmable processor, including machine-readable media that receive machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and / or data to a programmable processor.
[0183] To provide for interaction with a user, the systems and techniques described herein can be implemented on a computer having a display device, such as a CRT (cathode ray tube) or LCD (liquid crystal display) monitor, for displaying information to the user, and a pointing device, such as a mouse or trackball, by which the user can provide input to the computer. Other types of devices can also be used to provide interaction with a user, for example, feedback provided to the user can be any form of sensory feedback, for example, visual feedback, auditory feedback, or tactile feedback, and input from the user can be received in any form, including acoustic input, speech input, or tactile input.
[0184] The systems and techniques described herein can be implemented in a computing system that includes a back-end component, e.g., as a data server, or in a computing system that includes a middleware component, e.g., an application server, or in a computing system that includes a front-end component, e.g., a client computer having a graphical user interface or web browser through which a user can interact with an implementation of the systems and techniques described herein, or in any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication, e.g., a communications network. Examples of communications networks include a local area network ("LAN"), a wide area network ("WAN"), and the Internet.
[0185] A computing system may include clients and servers. Clients and servers are generally remote from each other and typically interact through a communication network. The relationship of clients and servers arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. Working Example
[0186] The present disclosure is further described in the following examples, which do not limit the scope of the claims. Example 1: Comparison of the percentage of unmapped reads between systems using flexible seed extension and systems without flexible seed extension
[0187] In this example, different nucleic acid sequencers were used to sequence a particular sample, including a HiSeq® 2500 sequencer, a HiSeq® X sequencer, and a NovaSeq® sequencer.The DRAGEN™ platform was then used to map the reads generated by each sequencer with and without flexible seed extension as described herein.Once mapped, the computer system determined the proportion of unmapped reads resulting from each mapping operation for each sequencer.
[0188] The DRAGEN™ platform is a mapping and aligning unit implemented in hardware circuitry on a field programmable gate array (FPGA). The DRAGEN™ v7 platform does not currently utilize flexible seed extension as described herein, whereas the DRAGEN™ v8 platform utilizes flexible seed extension. Although the DRAGEN™ platform used herein was implemented in an FPGA, in general, the DRAGEN™ platform can also be implemented in other integrated circuits, such as application specific integrated circuits (ASICs).
[0189] In particular, the "DNA_Nexus_hiseq2500" sample was sequenced using a HiSeq®2500 sequencer, the "DNA_Nexus_hiseqX" sample was sequenced using a HiSeq®X sequencer, and the "DNA_Nexus_NovaSeq" sample, the "NovaSeq_NA12878_rep1 sample", the "NovaSeq_TruSeq-nano-550 sample", and the "AWS_HG005_40x" sample were sequenced using a NovaSeq® sequencer. "AWS_HG005_40X" was from subject HG005. All of the other samples were from subject HG001.
[0190] 7 is an illustration of a bar graph 700 displaying data representing test results in the form of percentage of unmapped reads in a system using the flexible seed extension method as described herein compared to a system not using the flexible seed extension method. Bar graph 700 is a graphical representation of test results 710, 720, 730, 740, 750, and 760 comparing the results of mapping operations performed on genomic reads generated by different sequencing devices from Illumina, Inc.
[0191] In a first example, the test results 710 show that the percentage of unmapped reads occurring at 710b when a HiSeq® 2500 sequencer sequences a “DNA_Nexus_hiseq2500” sample and utilizes flexible seed extension as described in one or more implementations herein during mapping is significantly smaller than the percentage of unmapped reads occurring at 710a when a HiSeq® 2500 sequencer sequences a “DNA_Nexus_hiseq2500” sample without utilizing flexible seed extension as described in one or more implementations herein during mapping.
[0192] In a second example, the test results 720 show that the percentage of unmapped reads occurring in 720b when a NovaSeq (registered trademark) sequencer sequences a "DNA_Nexus_NovaSeq" sample and utilizes flexible seed extension as described in one or more implementations herein during mapping is significantly smaller than the percentage of unmapped reads occurring in 720a when a NovaSeq sequencer sequences a "DNA_Nexus_NovaSeq" sample without utilizing flexible seed extension as described in one or more implementations herein during mapping.
[0193] In a third example, test results 730 show that the percentage of unmapped reads occurring in 730b when a HiSeq®X sequencer sequences a “DNA_Nexus_hiseqX” sample and utilizes flexible seed extension as described in one or more implementations herein during mapping is significantly smaller than the percentage of unmapped reads occurring in 730a when a HiSeq®X sequencer sequences a “DNA_Nexus_hiseqX” sample without utilizing flexible seed extension as described in one or more implementations herein during mapping.
[0194] In a fourth example, the test results 740 show that the percentage of unmapped reads occurring in 740b when a NovaSeq® sequencer sequences the “NovaSeq_NA12878_rep1” sample and utilizes flexible seed extension as described in one or more implementations herein during mapping is significantly smaller than the percentage of unmapped reads occurring in 740a when a NovaSeq® sequencer sequences the “NovaSeq_NA12878_rep1” sample without utilizing flexible seed extension as described in one or more implementations herein during mapping.
[0195] In a fifth example, test results 750 show that the percentage of unmapped reads occurring in 750b when a NovaSeq® sequencer sequences a “NovaSeq_TruSeq-nano-550” sample and utilizes flexible seed extension as described in one or more implementations herein during mapping is significantly smaller than the percentage of unmapped reads occurring in 750a when a NovaSeq® sequencer sequences a “NovaSeq_TruSeq-nano-550” sample without utilizing flexible seed extension as described in one or more implementations herein during mapping.
[0196] In a sixth example, the test results 760 show that the percentage of unmapped reads occurring in 760b when a NovaSeq® sequencer sequences an "AWS_HG005_40X" sample and utilizes flexible seed extension as described in one or more implementations herein during mapping is significantly less than the percentage of unmapped reads occurring in 760a when a NovaSeq® sequencer sequences an "AWS_HG005_40X" sample without utilizing flexible seed extension as described in one or more implementations herein during mapping.
[0197] Thus, implementations of flexible seed extension using hash tables as described herein achieve significant performance improvements in reducing unmapped reads when compared to conventional methods that do not generate or use the hash tables as described herein. Example 2: Comparison of read mapping accuracy between systems with and without flexible seed extension
[0198] In this Example 2, the DRAGEN platform is used to map the reads generated by the nucleic acid sequencer to the reference sequence. Each DRAGEN platform maps the same set of reads to the same reference sequencer. Once mapping is complete, the computer system determines the read mapping accuracy of each mapping operation as a function of mapping error rate.
[0199] The DRAGEN™ platform is a mapping and aligning unit implemented with hardware circuitry in a field programmable gate array (FPGA). The DRAGEN™ v7 platform does not currently utilize flexible seed extension as described herein, whereas the DRAGEN™ v8 platform and the DRAGEN™ v8 hi-effort platform utilize flexible seed extension.
[0200] The DRAGEN™ Platform used herein has been implemented in an FPGA, however, in general, the DRAGEN™ Platform may be implemented in other integrated circuits, such as application specific integrated circuits (ASICs).
[0201] The difference between the DRAGEN™ v8 platform and the DRAGEN™ v8 hi-effort platform is the settings of heuristics and other parameters. The DRAGEN™ v8 platform uses the following heuristics: intvl-target-hits=32, intvl-max-hits=16, and intvl-sample-hits=16. Each of these heuristics is described herein. In addition, the DRAGEN™ v8 platform uses other parameters: max-hifreq-hits=16, rescue-hifreq=0, s and sw-extra-intvl=1. The max-hifreq-hits parameter indicates the maximum number of random sample matches taken from the match interval reached before a failed seed extension (e.g., one sample per failed extension until a limit is reached). The rescue-hifreq parameter determines whether an expensive rescue scan operation is utilized for matches found only by random samples from the match interval. Rescue scan is a method for searching for possible mating read alignments near a candidate read alignment. The sw-extra-intvl parameter determines the policy for utilizing expensive Smith-Waterman alignments for matches found by accessing the best ("extra") interval or by randomly sampling the match interval. Smith-Waterman is generally not used if the ungapped alignment is not clipped, but may be utilized if the gapless alignment is clipped, depending on the heuristics including this setting. A setting of "1" means that Smith-Waterman may be used for candidates from the extra / best match interval that are accessed in their entirety but not by random sampling. A setting of "2" means that Smith-Waterman may also be used for candidates from random sampling of the match interval.A setting of "0" means that Smith-Waterman is not applied for candidates from processing the extra / best intervals or from random sampling of match intervals.
[0202] On the other hand, the DRAGEN™ v8 hi-effort platform uses the following heuristics: intvl-target-hits=32, intvl-max-hits=64, and intvl-sample-hits=48. In addition, the DRAGEN™ v8 hi-effort platform uses other parameters: max-hifreq-hits=32, rescue-hifreq=0, and sw-extra-intvl=2. Thus, the DRAGEN™ v8 hi-effort platform has a richer set of heuristics than the DRAGEN™ v8 platform.
[0203] 8 is an illustration of a line graph 800 displaying data representing test results in the form of read mapping accuracy in a system using flexible seed extension as disclosed herein compared to a system not using flexible seed extension. In particular, graph 800 uses an accuracy curve in the form of a receiver operating characteristic ("ROC") curve (or line) to show the tradeoff between false positives and false negatives when stratifying the data using an accuracy metric. In the illustration of FIG. 8, curves (or lines) closer to the top and left walls of graph 800 signify better read mapping accuracy.
[0204] A curve 810 is depicted representing the read mapping accuracy of the DRAGEN™ v7 platform that does not use flexible seed extension as described in one or more implementations herein during mapping. A curve 820 is depicted representing the read mapping accuracy of the DRAGEN™ v8 platform that uses flexible seed extension as described in one or more implementations herein during mapping. By comparing curves 810 and 820, it is clear that curve 820 is closer to the top wall and left wall than curve 810. Thus, an improvement in read mapping accuracy has been achieved by simply implementing flexible seed extension as described in one or more implementations herein in some volumes.
[0205] FIG. 8 further depicts a curve 830 representing the "hi-effort" DRAGEN™ implementation v8. Like the DRAGEN™ v8 implementation, the DRAGEN™ v8 hi-effort implementation also utilizes a flexible seed extension method as described herein during mapping. However, as noted above, the heuristics utilized by the DRAGEN™ v8 "hi-effort" implementation are richer than those used to utilize the DRAGEN™ v8 implementation whose performance is represented by the 820 curve. The "hi-effort" v8 version of DRAGEN™ is assigned parameters (e.g., sw-extra-intvl=2) that increase the willingness to perform more Smith-Waterman alignment work downstream relative to the DRAGEN™ v8 implementation (e.g., sw-extra-intvl=1). As shown in FIG. 8, curve 830 is closer to the top and left walls than both curves 810 and 820, thereby exhibiting a significant performance gain in read mapping accuracy with the DRAGEN™ v8 h-effort implementation.
[0206] FIG. 8 also illustrates a curve 840 that represents the read mapping accuracy achieved by the BWA-MEM software mapping tool. The BWA-MEM software mapping tool uses the Burrows-Wheeler Transform (BWT) of the reference genome as an index for the BWA-MEM software mapping tool. This method of representing the reference genome can inherently provide benefits similar to those provided by flexible seed extension, such as the ability to retrieve a complete set of matches corresponding to any length match. As illustrated by curves 830 and 840, the DRAGEN™ v8 "hi-effort" implementation can achieve the same read mapping accuracy as the software-based BWA software mapping tool. Thus, it is important to note that the DRAGEN™ v8 "hi-effort" is able to achieve a read mapping accuracy level comparable to the software-based BWA mapping tool, since the DRAGEN™ v8 "hi-effort" also takes advantage of other benefits of the DRAGEN™ platform, including, for example, fewer memory accesses to map seeds. However, prior to the implementation of the hardware-based flexible seed extension described herein, the DRAGEN™ platform was able to achieve the same level of read mapping accuracy as that achieved by the BWA software mapping tool.
[0207] Thus, implementations of flexible seed extension using hash tables as described herein achieve significant performance improvements in terms of read mapping accuracy when compared to conventional methods that do not generate or use the hash tables as described herein. Other embodiments
[0208] Several embodiments have been described. Nevertheless, it will be understood that various modifications can be made without departing from the spirit and scope of the present invention. In addition, the logic flows depicted in the figures do not require the particular order shown, or sequential order, to achieve desired results. In addition, other steps can be provided or steps can be eliminated from the described flows, and other components can be added to or removed from the described systems. Accordingly, other embodiments are within the scope of the following claims. [Explanation of symbols]
[0209] 100 Systems 110 Computer 112 Memory 114 Reference Sequence 120 Seed Elongation Tree 121 nodes 122 nodes 123 nodes 124 nodes 125 nodes 126 nodes 130 Memory 132 SEED Extension Table 140 Hash Tables 142 Index Key 143 Hash Functions 144 hash positions 146 Hashtable installation package 150 Records 152 Records 153 Records 155 reference sequence positions 160 devices 162 circuits 170 Mapping and Aligning Unit 180 Memory 300 Runtime System 305 Leads 310 Hash Query 340 Best Interval Storage 350 Best Interval Storage 600 computing devices 602 Processor 604 Memory 610 High Speed Expansion Port 612 Low Speed Controller 614 Low Speed Expansion Port 616 Display 620 Standard Server 622 Laptop Computer 624 Rack Server System 650 devices 652 processor 654 Display 656 Display Interface 658 Control Interface 660 Audio Codec 662 External Interface 664 Memory 666 Communication Interface 668 Transmitter / Receiver 670 Receiver Module 672 Expansion Interface 674 Expandable Memory 680 Mobile Phones 682 Smartphones
Claims
1. 1. A method for using a hash table for mapping sample reads to a reference sequence, comprising: performing, by a mapping and aligning unit, a query of a hash table, the query including a first seed, the first seed including a subset of nucleotides obtained from a particular one of the sample reads; obtaining a response to the performed query including information stored by the location of the hash table determined by the mapping and aligning unit to be responsive to the query; determining, by the mapping and aligning unit, whether the response to the executed query comprises (i) an extension record, (ii) an interval record, or (iii) one or more matching reference sequence positions; based on determining, by the mapping and aligning unit, that the response to the executed query includes (i) an extension record and (ii) an interval record; determining, by said mapping and aligning unit, whether an extension table is accessed to obtain one or more matching reference sequence positions in said extension table referenced by said interval record; based on determining that the decompression table is not accessed, determining, by said mapping and aligning unit, whether to store first information describing said interval record in a memory device as information describing a best interval candidate; generating, by the mapping and aligning unit, a first extended seed using the extended record, the first extended seed being an extension of the first seed; generating, by the mapping and aligning unit, a subsequent hash query that includes the first extended seed; performing, by the mapping and aligning unit, the subsequent query of the hash table.
2. The method further comprising: based on determining that the decompression table is accessed, accessing, by said mapping and aligning unit, said extension table to obtain said one or more matching reference sequence positions in said extension table referenced by said interval records; The method of claim 1 , further comprising adding, by the mapping and aligning unit, the one or more matching reference sequence positions to a seed match set.
3. The method further comprising: determining, by the mapping and aligning unit, that the response to the executed query contains one or more matching reference sequence positions; based on determining, by the mapping and aligning unit, that the response to the executed query contains one or more matching reference sequence positions; The method of claim 1 or 2, further comprising adding, by the mapping and aligning unit, the one or more matching reference sequence positions to a seed match set.
4. determining, by the mapping and aligning unit, whether to store the first information describing the interval record in a memory device as information describing a best interval candidate; determining, by the mapping and aligning unit, that there is no prior information describing the interval record as the best interval candidate for the particular read; 4. A method according to claim 1, further comprising storing, by said mapping and aligning unit, said first information describing said interval record in said memory device as information describing a best interval candidate.
5. The method further comprising: obtaining a response to the subsequent executed query including information stored by the location of the hash table determined by the mapping and aligning unit to be responsive to the query; determining, by the mapping and aligning unit, whether the response to the subsequent executed query includes (i) a second extension record, (ii) a second interval record, or (iii) one or more matching reference sequence positions; based on determining, by the mapping and aligning unit, that the response to the subsequent executed query includes (i) the second extension record and (ii) the second interval record; determining whether an extension table is accessed by the mapping and aligning unit to obtain one or more matching reference sequence positions in the extension table referenced by the second interval record; based on determining that the decompression table is not accessed, determining, by the mapping and aligning unit and using one or more heuristic rules, whether second information describing the second interval record or the first information describing the best interval candidate is used as the best interval candidate; generating, by the mapping and aligning unit, a second extended seed that is an extension of the first extended seed using the second extended record; generating, by the mapping and aligning unit, a third hash query that includes the second extended seed; The method of any one of claims 1 to 4, further comprising: performing, by the mapping and aligning unit, the third hash query of the hash table including the second extended seed.
6. determining, by the mapping and aligning unit and using one or more heuristic rules, whether the second information describing the second interval record or the first information describing the best interval candidate is to be used as a best interval; 6. The method of claim 5, comprising selecting either the second information describing the second interval record or the first information describing a best interval candidate record based on a number of factors including: (i) a number of matching reference sequence positions returned by each of the interval record and the second interval record, (ii) a predetermined threshold level of reference sequence positions, or (iii) a respective seed length of the respective seeds that reach a hash position storing the interval record and the second interval record.
7. 7. A method according to any preceding claim, wherein the interval record references one or more positions in the seed extension table that contain data describing reference sequence positions that match the first seed of the query.
8. the one or more locations in the seed extension table that contain data describing reference sequence locations that match the first seed of the query; The method of claim 7 , further comprising: a contiguous interval of reference sequence positions in an extension table that match the first seed of the query.
9. 1. A system for improving mapping of sample reads to a reference sequence using a hash table, comprising: One or more computers and one or more storage devices storing instructions operable, when executed by the one or more computers, to cause the one or more computers to: performing, by a mapping and aligning unit, a query of a hash table, the query including a first seed, the first seed including a subset of nucleotides obtained from a particular one of the sample reads; obtaining a response to the performed query including information stored by the location of the hash table determined by the mapping and aligning unit to be responsive to the query; determining, by the mapping and aligning unit, whether the response to the executed query comprises (i) an extension record, (ii) an interval record, or (iii) one or more matching reference sequence positions; based on determining, by the mapping and aligning unit, that the response to the executed query includes (i) an extension record and (ii) an interval record; determining, by said mapping and aligning unit, whether an extension table is accessed to obtain one or more matching reference sequence positions in said extension table referenced by said interval record; based on determining that the decompression table is not accessed, determining, by said mapping and aligning unit, whether to store first information describing said interval record in a memory device as information describing a best interval candidate; generating, by the mapping and aligning unit, a first extended seed using the extended record, the first extended seed being an extension of the first seed; generating, by the mapping and aligning unit, a subsequent hash query that includes the first extended seed; performing, by the mapping and aligning unit, the subsequent hash query of the hash table.
10. The operation, based on determining that the decompression table is accessed, accessing, by said mapping and aligning unit, said extension table to obtain said one or more matching reference sequence positions in said extension table referenced by said interval records; The system of claim 9 , further comprising adding, by the mapping and aligning unit, the one or more matching reference sequence positions to a seed match set.
11. The operation, determining, by the mapping and aligning unit, that the response to the executed query contains one or more matching reference sequence positions; based on determining, by the mapping and aligning unit, that the response to the executed query contains one or more matching reference sequence positions; The system of claim 9 or 10, further comprising adding, by the mapping and aligning unit, the one or more matching reference sequence positions to a seed match set.
12. determining, by the mapping and aligning unit, whether to store the first information describing the interval record in a memory device as information describing a best interval candidate; determining, by the mapping and aligning unit, that there is no prior information describing the interval record as the best interval candidate for the particular read; Storing, by the mapping and aligning unit, the first information describing the interval record in the memory device as information describing a best interval candidate.
13. The operation, obtaining a response to the subsequent executed query including information stored by the location of the hash table determined by the mapping and aligning unit to be responsive to the query; determining, by the mapping and aligning unit, whether the response to the subsequent executed query includes (i) a second extension record, (ii) a second interval record, or (iii) one or more matching reference sequence positions; based on determining, by the mapping and aligning unit, that the response to the subsequent executed query includes (i) the second extension record and (ii) the second interval record; determining whether an extension table is accessed by the mapping and aligning unit to obtain one or more matching reference sequence positions in the extension table referenced by the second interval record; based on determining that the decompression table is not accessed, determining, by the mapping and aligning unit and using one or more heuristic rules, whether second information describing the second interval record or the first information describing the best interval candidate is used as the best interval candidate; generating, by the mapping and aligning unit, a second extended seed that is an extension of the first extended seed using the second extended record; generating, by the mapping and aligning unit, a third hash query that includes the second extended seed; 13. The system of claim 9, further comprising: performing, by the mapping and aligning unit, the third hash query of the hash table including the second extended seed.
14. determining, by the mapping and aligning unit and using one or more heuristic rules, whether the second information describing the second interval record or the first information describing the best interval candidate is to be used as a best interval; 14. The system of claim 13, further comprising selecting either the second information describing the second interval record or the first information describing a best interval candidate record based on a number of factors including: (i) a number of matching reference sequence positions returned by each of the interval record and the second interval record, (ii) a predetermined threshold level of reference sequence positions, or (iii) a respective seed length of the respective seeds that reach hash positions storing the interval record and the second interval record.
15. 15. The system of claim 9, wherein the interval record references one or more positions in the seed extension table that contain data describing reference sequence positions that match the first seed of the query.
16. the one or more locations in the seed extension table that contain data describing reference sequence locations that match the first seed of the query; The system of claim 15 , further comprising a contiguous interval of reference sequence positions in an extension table that match the first seed of the query.
17. A non-transitory computer-readable medium storing software including instructions executable by one or more computers, the instructions, when executed, causing the one or more computers to: performing, by a mapping and aligning unit, a query of the hash table, the query including a first seed, the first seed including a subset of nucleotides obtained from a particular read of the sample reads; obtaining a response to the performed query including information stored by the location of the hash table determined by the mapping and aligning unit to be responsive to the query; determining, by the mapping and aligning unit, whether the response to the executed query comprises (i) an extension record, (ii) an interval record, or (iii) one or more matching reference sequence positions; based on determining, by the mapping and aligning unit, that the response to the executed query includes (i) an extension record and (ii) an interval record; determining, by said mapping and aligning unit, whether an extension table is accessed to obtain one or more matching reference sequence positions in said extension table referenced by said interval record; based on determining that the decompression table is not accessed, determining, by said mapping and aligning unit, whether to store first information describing said interval record in a memory device as information describing a best interval candidate; generating, by the mapping and aligning unit, a first extended seed using the extended record, the first extended seed being an extension of the first seed; generating, by the mapping and aligning unit, a subsequent hash query that includes the first extended seed; performing, by the mapping and aligning unit, the subsequent query of the hash table.
18. The operation, based on determining that the decompression table is accessed, accessing, by said mapping and aligning unit, said extension table to obtain said one or more matching reference sequence positions in said extension table referenced by said interval records; 20. The computer readable medium of claim 17, further comprising adding, by the mapping and aligning unit, the one or more matching reference sequence positions to a seed match set.
19. The operation, determining, by the mapping and aligning unit, that the response to the executed query contains one or more matching reference sequence positions; based on determining, by the mapping and aligning unit, that the response to the executed query contains one or more matching reference sequence positions; 19. The computer readable medium of claim 17 or 18, further comprising adding, by the mapping and aligning unit, the one or more matching reference sequence positions to a seed match set.
20. determining, by the mapping and aligning unit, whether to store the first information describing the interval record in a memory device as information describing a best interval candidate; determining, by the mapping and aligning unit, that there is no prior information describing the interval record as the best interval candidate for the particular read; 20. The computer readable medium of claim 17, further comprising: storing, by the mapping and aligning unit, the first information describing the interval record in the memory device as information describing a best interval candidate.
21. The operation, obtaining a response to the subsequent executed query including information stored by the location of the hash table determined by the mapping and aligning unit to be responsive to the query; determining, by the mapping and aligning unit, whether the response to the subsequent executed query includes (i) a second extension record, (ii) a second interval record, or (iii) one or more matching reference sequence positions; based on determining, by the mapping and aligning unit, that the response to the subsequent executed query includes (i) the second extension record and (ii) the second interval record; determining whether an extension table is accessed by the mapping and aligning unit to obtain one or more matching reference sequence positions in the extension table referenced by the second interval record; based on determining that the decompression table is not accessed, determining, by the mapping and aligning unit and using one or more heuristic rules, whether second information describing the second interval record or the first information describing the best interval candidate is used as the best interval candidate; generating, by the mapping and aligning unit, a second extended seed that is an extension of the first extended seed using the second extended record; generating, by the mapping and aligning unit, a third hash query that includes the second extended seed; 21. The computer-readable medium of claim 17, further comprising: performing, by the mapping and aligning unit, the third hash query of the hash table including the second extended seed.
22. determining, by the mapping and aligning unit and using one or more heuristic rules, whether the second information describing the second interval record or the first information describing the best interval candidate is to be used as a best interval; 22. The computer-readable medium of claim 21, further comprising selecting either the second information describing the second interval record or the first information describing a best interval candidate record based on a number of factors including: (i) a number of matching reference sequence positions returned by each of the interval record and the second interval record, (ii) a predetermined threshold level of reference sequence positions, or (iii) a respective seed length of the respective seeds that reached a hash position storing the interval record and the second interval record.
23. 23. The computer readable medium of any one of claims 17 to 22, wherein the interval record references one or more locations in the seed extension table that contain data describing reference sequence positions that match the first seed of the query.
24. the one or more locations in the seed extension table that contain data describing reference sequence locations that match the first seed of the query; 24. The computer readable medium of claim 23, comprising a contiguous interval of reference sequence positions in an extension table that match the first seed of the query.
Citation Information
Patent Citations
Quick comparing and positioning method for gene sequence segments on reference genome
CN105243297A
Method and device for quick contrast and analysis of short sequence for second-generation sequencing
CN106295250A
Optimal alignment computation device and program
JP2012032975A
Assembling pre-treatment apparatus, program for assembling pre-treatment apparatus, and method for controlling computer cluster system
JP2013106567A
Genomics infrastructure for on-site or cloud-based DNA and RNA processing and analysis
JP2019510323A