NEXT GENERATION SEQUENCING SORTING IN TIME AND SPACE COMPLEXITY USING LOCATION INTEGERS

Information

  • Patent Application
  • 20190180001
  • Publication Number
    20190180001
  • Date Filed
    December 07, 2017
    7 years ago
  • Date Published
    June 13, 2019
    5 years ago
Abstract
A system and machine-implemented method for sorting Next-Generation Sequencing (NGS) reads in O(n) time and space complexity that makes use low sparsity and nearly uniform distribution of the input array. The genome position field in the input array is used to determine the target position of the output array. Duplicate target positions due to n-fold coverage are handled by assigning either overflow buckets to each position or anterior assigning multiple target slots in the output array for each genome position depending on the distribution of reads over the genome and the resulting probability of hitting an already occupied slot. Once every tuple in the input array has been written to the output array, the output array in read through ascending order and each tuple is appended to the end of a final result array.
Description
BACKGROUND

The present invention relates to next generation sequencing and, more specifically, to a next generation sequencing platform using a transition function based approach to improve throughput and speed.


Next-generation sequencing (NGS), also known as high-throughput sequencing, is a phrase used to describe a number of different modern sequencing technologies that allow for the sequencing of DNA or RNA. NGS platforms perform sequencing of millions of small fragments of DNA in parallel, thereby creating a massive pool of data. For example, the genome is fragmented into pieces of 50-500 base pairs length each and digitalized through the NGS sequencer, which can result in up to 100 giga base-pairs (Gb) of raw sequencer output. Bioinformatics analysis algorithms are then employed to re-sequence the data by aligning the sequenced fragments against a reference genome for further analysis, such as the identification of unexpected variations in genes.


In a conventional NGS process, the alignment of the sequencing data against the reference genome can be difficult due to the presence of both expected and unexpected mutations in the sequencing data. These variations can hinder the process of identifying the correct position of the sequences fragments with respect to the reference genome. While there are existing sorting algorithms that may used to help align the sequenced fragments, these approaches do not take into account the special characteristics of the sequence data or its distribution and are thus not as efficient as possible. Accordingly, there is a need in the art for an NGS platform that can more align sequences fragments to a reference genome more accurately and efficiently.


SUMMARY

According to an embodiment, improved alignment may be accomplished with a platform for performing next generation sequencing (NGS) that takes into account the non-sparsity and the known distribution of positions of the fragment data. An empty target array may be allocated either in main memory or on persistent storage and its estimated size can be derived from the input array. The input array may then be read through a transition function, as further described below, that determines the position in the output array that the tuple is written to. If a target slot is already taken, subsequent target slots for the same position will be used until all are depleted and then an overflow bucket is used. The number of necessary slots per genome position can be derived empirically from similar experiments. As a final step, the target array is read in ascending order and each tuple is appended to the final result array which has thus been sorted in O(n) time and space complexity.


In another embodiment, a system for aligning genomic sequence data to a reference may be used that has a processor programmed to receive an input array comprising a plurality of fragments and align the plurality of fragments against a reference using a location integer, wherein the processor is programmed to sort the plurality of fragments in time complexity and space complexity. The processor may be programmed to determine the number of duplicate positions before sorting the plurality of fragments. The processor may be programmed to define an output array having a size equal to the number of fragments to be sorted multiplied by the number of duplicate positions. The processor may be programmed to estimate the number of duplicate position if a statistical distribution of duplicate positions is not uniform.


In a further embodiment, a method of aligning genomic sequence data to a reference may use a processor to receive an input array comprising a plurality of fragments and aligns the plurality of fragments against a reference using a location integer by sorting the plurality of fragments in time complexity and space complexity. The method may include determining the number of duplicate positions before sorting the plurality of fragments. The method may also include defining an output array having a size equal to the number of fragments to be sorted multiplied by the number of duplicate positions. The method may further include estimating the number of duplicate position if a statistical distribution of duplicate positions is not uniform.


In yet another embodiment, a computer program product for aligning genomic sequence data to a reference may be used where the computer program product comprises a computer readable storage medium having program instructions embodied therewith, the program instructions executable by a computing device to cause the computing device to receive an input array comprising a plurality of fragments and align the plurality of fragments against a reference using a location integer by sorting the plurality of fragments in time complexity and space complexity. The computer program product may additionally include program instructions that further cause the computing device to determine the number of duplicate positions before sorting the plurality of fragments. The computer program product may additionally include program instructions that further cause the computing device to define an output array having a size equal to the number of fragments to be sorted multiplied by the number of duplicate positions. The computer program product may further include program instructions that further cause the computing device to estimate the number of duplicate position if a statistical distribution of duplicate positions is not uniform.





BRIEF DESCRIPTION OF THE DRAWINGS


FIG. 1 is schematic of a system for aligning next generation sequence data against a reference genome; and



FIG. 2 is a flowchart of a method of aligning next generation sequence data against a reference genome.





DETAILED DESCRIPTION

Referring to the figures, wherein like numerals refer to like parts throughout, there is seen in FIG. 1, a system 10 for sorting next generation sequencing (NGS) fragment data. Fragment data is generated by a parallel sequencer 12 that sequences the DNA or RNA in a genetic sample from a target subject, such as human tissue sample. Parallel sequencer 12 output as a raw sequence fragment data file that contains data representing a plurality of fragments of the DNA or RNA that have been sequenced (typically 50 to 500 base pairs in length each) but are not arranged in the appropriate order reflecting the actual genome of the subject under evaluation. A sequence fragment data aligner 14 uses a reference genome 16 to align the fragment data into the appropriate positions to form an aligned sequence 18 so that it can be further analyzed, such as by looking for mutations within aligned sequence 18 that correspond to known gene locations in the reference genome 16. The alignment process involves two steps. First, the location of each fragment in the reference genome must be identified. Next, the fragments must be reassembled according to the determined locations to recreate the genome (or target genome region) of subject under evaluation.


More specifically, sequence fragment data aligner 14 includes a computer or processor that is programmed to receive as an input array the results of the sequencing of the small DNA or RNA fragments such as the raw sequence data file. For example, input array may comprise data configured in the FASTQ format, which is recognized as a de facto standard and into which virtually any other format may be easily converted. Sequence fragment data aligner 14 compares the raw sequence data file in the input array against reference genome 16 to assigns a genome position to each fragment. The fragments must then be sorted into the appropriate order to reconstitute the genome of the target subject (or portion of the genome of the target subject being investigated).


Sequence fragment data aligner 14 accomplished sorting of the fragments in O(n) time and space complexity by making use of special properties of the input array, i.e., the data in the array in non-sparse and the genome positions are uniformly distributed (or the distribution can be approximately empirically). Given these properties, Sequence fragment data aligner 14 employs an approach that uses the genome position field in the input array to determine the target position of an output array representing the re-sequenced data. Duplicate target positions due to n-fold coverage (which can over 30 times or more in conventional sequencing platforms) are handled by assigning either overflow buckets to each position or anterior assigning of multiple target slots in the output array for each genome position depending on the distribution of reads over the genome and the resulting probability of hitting an already occupied slot. Once every tuple in the input array has been written to the output array (or to an overflow bucket), the output array is read through in ascending order and each tuple is appended to the end of a final result array (and if necessary collecting tuples from overflow buckets during this process). Due to the low sparsity and uniform distribution properties, system 10 runs in O(n) time and space complexity and will do so for every input array with these properties.


System 10 may implement a method 20 of sorting the sequence fragment data. Method 20 begins with the step of letting A be an array of tuples of length n to be sorted, where each tuple is comprised of an integer defining the target position in the sorted array 22 (the target position will be referred to as the position in the subsequent content). Next, d is chosen as an integer defining the number of estimated duplicate positions 24. This parameter can be determined empirically and inferred by the targeted n-fold coverage of the NGS experiment (coverage means to target the biological creation of multiple matching read fragments per read position for increased accuracy). M then is defined as a map with an integer key standing for position and a list of size d containing empty tuples of same type as in A 26. An empty array A′ of size A*d may then be allocated 28. An overflow map O of size 0 is then initialized 30 (meant to grow by appending) where key is position and value a list of tuples. Next, a loop over A is executed 32, starting from lowest index 1 to sizeof(A) as follows:


#determine target index


targetIndex=A[index].position


if (A′[targetIndex] list has empty slots)

    • Add tuple A[index] to list in A′[targetIndex]


else

    • add to O using A[index].position as key and A[index] as tuple


      An empty array A″ of sizeof(A) holding the final result is then created 34 to serve as the final output array. A loop over A′ starting from lowest index 1 to sizeof(A′) is then executed 36:


if (A′[index] ! empty):

    • copy all tuples in list of A′[index] to A″ by appending
    • if O contains entries at position A′[index].position:
      • copy all tuples in list of O[index] to A″ by appending


        After this run 1-6 A″ will be sorted time and space complexity is O(n).


In case the statistical distribution of positions is not uniform, d has to be replaced by an estimator function D:={position=>number of expected tuples} returning the estimated tuples at a certain position. This function can derived empirically. Time complexity of O(n) can always be guaranteed, space complexity of O(n) can only be guaranteed if the distribution of positions is not sparse which is the case for NGS re-sequencing data. Time complexity of O(n) and space complexity of O(n) provide tremendous cost savings on hardware and energy savings. As a result, the speed and efficiency of the computer processing of the sequence data is significant improved over conventional systems and the present system and method comprises an advancement in the computer processing of the sequence data itself.


The descriptions of the various embodiments of the present invention have been presented for the purposes of illustration, but are not intended to be exhaustive or limited to the embodiments disclosed. Many modification and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein was chosen to best explain the principles of the embodiments, the practical application or technical improvement over the technologies found in the market place, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.


The present invention may be a system, a method, and/or a computer program product. The computer program product may include a computer readable storage medium (or media) having computer readable program instructions thereon for causing a processor to carry out aspects of the present invention.


The computer readable storage medium can be a tangible device that can retain and store instructions for use by an instruction execution device. The computer readable storage medium may be, for example, but is not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. A non-exhaustive list of more specific examples of the computer readable storage medium includes the following: a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanically encoded device such as punch-cards or raised structures in a groove having instructions recorded thereon, and any suitable combination of the foregoing. A computer readable storage medium, as used herein, is not to be construed as being transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission media (e.g., light pulses passing through a fiber-optic cable), or electrical signals transmitted through a wire.


Computer readable program instructions described herein can be downloaded to respective computing/processing devices from a computer readable storage medium or to an external computer or external storage device via a network, for example, the Internet, a local area network, a wide area network and/or a wireless network. The network may comprise copper transmission cables, optical transmission fibers, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. A network adapter card or network interface in each computing/processing device receives computer readable program instructions from the network and forwards the computer readable program instructions for storage in a computer readable storage medium within the respective computing/processing device.


Computer readable program instructions for carrying out operations of the present invention may be assembler instructions, instruction-set-architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, firmware instructions, state-setting data, or either source code or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C++ or the like, and conventional procedural programming languages, such as the “C” programming language or similar programming languages. The computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet Service Provider). In some embodiments, electronic circuitry including, for example, programmable logic circuitry, field-programmable gate arrays (FPGA), or programmable logic arrays (PLA) may execute the computer readable program instructions by utilizing state information of the computer readable program instructions to personalize the electronic circuitry, in order to perform aspects of the present invention.


Aspects of the present invention are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer readable program instructions.


These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer readable program instructions may also be stored in a computer readable storage medium that can direct a computer, a programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer readable storage medium having instructions stored therein comprises an article of manufacture including instructions which implement aspects of the function/act specified in the flowchart and/or block diagram block or blocks.


The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other device to produce a computer implemented process, such that the instructions which execute on the computer, other programmable apparatus, or other device implement the functions/acts specified in the flowchart and/or block diagram block or blocks.


The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts or carry out combinations of special purpose hardware and computer instructions.

Claims
  • 1. A system for aligning genomic sequence data to a reference genome, comprising a processor programmed to receive an input array of tuples comprising a plurality of fragments that have been aligned against a reference genome to obtain a location integer, wherein the processor is programmed to sort the plurality of fragments in time complexity and space complexity using the location integer.
  • 2. The system of claim 1, wherein the processor is programmed to determine the number of duplicate positions before sorting the plurality of fragments.
  • 3. The system of claim 2, wherein the processor is programmed to define an output array having a size equal to the plurality of fragments multiplied by the number of any duplicate positions.
  • 4. The system of claim 3, wherein the processor is programmed to estimate the number of the duplicate positions if a statistical distribution of duplicate positions is not uniform.
  • 5. The system of claim 4, wherein the output array includes an overflow bucket associated with each position in the output array.
  • 6. The system of claim 5, wherein the processor is programmed to assign all of the plurality of fragments to an appropriate position in the output array or the overflow bucket associated with that position.
  • 7. The system of claim 6, wherein the processor is programmed to read through each position in the output array in ascending order and append each of the fragments assigned to those positions in the output array together in that order.
  • 8. A method of aligning genomic sequence data to a reference genome, comprising: using a processor to receive an input array of tuples comprising a plurality of fragments, each of which has a location integer; andaligning the plurality of fragments using the location integer by sorting the plurality of fragments in time complexity and space complexity.
  • 9. The method of claim 8, further comprising determining the number of duplicate positions before sorting the plurality of fragments.
  • 10. The method of claim 9, further comprising defining an output array having a size equal to the plurality of fragments to be sorted multiplied by the number of duplicate positions.
  • 11. The method of claim 10, further comprising estimating the number of duplicate position if a statistical distribution of duplicate positions is not uniform.
  • 12. The method of claim 11, wherein the output array includes an overflow bucket associated with each position in the output array.
  • 13. The method of claim 12, further comprising assigning all of the plurality of fragments to an appropriate position in the output array or an appropriate overflow bucket.
  • 14. The method of claim 13, further comprising reading through each position in the output array in ascending order and append each of the fragments assigned to those positions in the output array together in that order.
  • 15. A computer program product for aligning genomic sequence data to a reference genome, the computer program product comprising a computer readable storage medium having program instructions embodied therewith, the program instructions executable by a computing device to cause the computing device to: receive an input array of tuples comprising a plurality of fragments, each of which has a location integer; anduse the location integer to sort the plurality of fragments in time complexity and space complexity.
  • 16. The computer program product of claim 15, further comprising determining the number of duplicate positions before sorting the plurality of fragments.
  • 17. The computer program product of claim 16, further comprising defining an output array having a size equal to the plurality of fragments to be sorted multiplied by the number of any duplicate positions.
  • 18. The computer program product of claim 17, further comprising estimating the number of the duplicate positions if a statistical distribution of the duplicate positions is not uniform.
  • 19. The computer program product of claim 18, further comprising assigning all of the plurality of fragments to an appropriate position in the output array or an appropriate overflow bucket.
  • 20. The computer program product of claim 19, further comprising reading through each position in the output array in ascending order and append each of the plurality of fragments assigned to those positions in the output array together in that order.