Repeat sequence detection method, device, equipment and storage medium
By converting sequence fragments in paired-end sequencing data into integers and calculating localization feature values, the problem of inaccurate repetitive sequence detection in high-throughput sequencing is solved, and more accurate repetitive sequence detection is achieved.
Patent Information
- Application Number
- CN202211636858.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-15
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2042-12-15
AI Technical Summary
In high-throughput sequencing, existing technologies have insufficient accuracy in detecting repetitive sequences in sequencing data obtained from paired-end sequencing, leading to inaccurate detection results.
By converting sequence fragments in paired-end sequencing data into integers, calculating sequence location feature values, and detecting whether there are occupied values in the counting array, the sequence is determined to be a repetitive sequence if it exists, thus improving detection accuracy.
It enables accurate detection of repetitive sequences in paired-end sequencing data, avoids overestimation of repetitive sequences, and improves detection accuracy.
Smart Images

Figure CN116052775B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of bioinformatics, and in particular to a method, apparatus, device, and storage medium for detecting repetitive sequences. Background Technology
[0002] High-throughput sequencing involves preparing sequencing libraries by randomly fragmenting genomic sequences, performing PCR (Polymerase Chain Reaction) amplification, and adding adapters. The sequencing library contains tens of thousands of cloned sequence fragments, which are then extended to detect the signals corresponding to each fragment, ultimately yielding the genomic sequence information. However, during high-throughput sequencing, the PCR process amplifies the sequence sample, resulting in repetitive sequences in the sequencing data. These repetitive sequences can lead to inaccurate results from bioinformatics analysis of the sequencing data.
[0003] Currently, high-throughput sequencing data is typically quality controlled using FastQC (Sequencing Data Quality Control). FastQC removes a large number of repetitive sequences from the sequencing data and provides quality analysis for each base and each sequence. However, for sequencing data obtained from paired-end sequencing in high-throughput sequencing, FastQC analyzes the two sequences in each paired-end sequencing dataset separately. This leads to an overestimation of the number of repetitive sequences in the paired-end sequencing data, thus reducing the accuracy of repetitive sequence detection. Summary of the Invention
[0004] The main objective of this invention is to provide a method, apparatus, device, and computer-readable storage medium for detecting repetitive sequences, with the aim of improving the accuracy of detecting repetitive sequences.
[0005] To achieve the above objectives, the present invention provides a method for detecting repetitive sequences, the method comprising the following steps:
[0006] Read the current paired-end sequence from the sequencing data obtained from paired-end sequencing, and convert the first sequence fragment in the current paired-end sequence into a first integer type, and convert the second sequence fragment in the current paired-end sequence into a second integer type;
[0007] The double-ended sequence positioning feature value is calculated based on the first integer, and it is detected whether the value at the first position corresponding to the double-ended sequence positioning feature value in the preset counting array is an occupied value.
[0008] If the value at the first position is the occupied value, then check whether the second integer exists in the double-ended sequence array;
[0009] If the second integer exists in the double-ended sequence array, then the current double-ended sequence is determined to be a repeating sequence.
[0010] Optionally, after the step of detecting whether the value at the first position corresponding to the paired-end sequence positioning feature value in the preset counting array is an occupied value, the method further includes:
[0011] If the value at the first position is not the occupied value, then it is determined that the current sequence at both ends is not a repeating sequence;
[0012] The second integer is stored in the second position corresponding to the double-ended sequence location feature value in the double-ended sequence array, and the value at the first position is set as the occupied value.
[0013] Optionally, the step of detecting whether the second integer type exists in the paired-end sequence array includes:
[0014] Check whether the value at the second position in the double-ended sequence array is consistent with the second integer;
[0015] If the value at the second position is the same as the second integer, then it is determined that the second integer exists in the double-ended sequence array;
[0016] If the value at the second position is inconsistent with the second integer, then it is determined that the second integer does not exist in the double-ended sequence array.
[0017] Optionally, the step of converting the first sequence segment in the current double-ended sequence into a first integer includes:
[0018] Each base of the first sequence segment in the current double-ended sequence is converted into a numerical value to obtain a numerical string;
[0019] The numerical string is converted into an integer to obtain the first integer.
[0020] Optionally, the step of calculating the paired-end sequence localization feature value based on the first integer includes:
[0021] Convert the first integer into a binary hash code;
[0022] The feature value is calculated based on the binary hash code, and the value of the preset number of bits in the feature value is determined as the double-ended sequence positioning feature value.
[0023] Optionally, the repetitive sequence detection method further includes:
[0024] Read the current single-end sequence from the sequencing data obtained from single-end sequencing, and convert the current single-end sequence into a single-end sequence integer;
[0025] The single-ended sequence localization feature value is calculated based on the single-ended sequence integer, and the single-ended sequence localization position corresponding to the single-ended sequence localization feature value in the single-ended sequence array is checked to see if the single-ended sequence integer exists.
[0026] If the single-ended sequence is located at the single-ended sequence position, then the current single-ended sequence is determined to be the repeating sequence.
[0027] Optionally, after the step of detecting whether the single-ended sequence integer exists at the single-ended sequence location position corresponding to the single-ended sequence location feature value in the single-ended sequence array, the method further includes:
[0028] If the single-ended sequence integer does not exist at the single-ended sequence location, then the current single-ended sequence is determined to be a non-repeating sequence, and the single-ended sequence integer is stored at the single-ended sequence location.
[0029] Furthermore, to achieve the above objectives, the present invention also provides a repetitive sequence detection device, the repetitive sequence detection device comprising:
[0030] The conversion module is used to read the current paired-end sequence from the sequencing data obtained by paired-end sequencing, and convert the first sequence fragment in the current paired-end sequence into a first integer and the second sequence fragment in the current paired-end sequence into a second integer.
[0031] The detection module is used to calculate the double-ended sequence positioning feature value based on the first integer, and to detect whether the value at the first position corresponding to the double-ended sequence positioning feature value in the preset counting array is an occupied value.
[0032] The detection module is further configured to detect whether the second integer exists in the double-ended sequence array if the value at the first position is the occupied value;
[0033] The determining module is configured to determine that the current double-ended sequence is a repeating sequence if the second integer exists in the double-ended sequence array.
[0034] In addition, to achieve the above objectives, the present invention also provides a repeating sequence detection device, which includes a memory, a processor, and a repeating sequence detection program stored in the memory and executable on the processor. When the repeating sequence detection program is executed by the processor, it implements the steps of the repeating sequence detection method described above.
[0035] In addition, to achieve the above objectives, the present invention also provides a computer-readable storage medium storing a repeating sequence detection program, which, when executed by a processor, implements the steps of the repeating sequence detection method described above.
[0036] In this invention, the current paired-end sequence is read from the sequencing data obtained by paired-end sequencing, and the first sequence fragment in the current paired-end sequence is converted into a first integer, and the second sequence fragment in the current paired-end sequence is converted into a second integer. The paired-end sequence localization feature value is calculated based on the first integer, and it is detected whether the value at the first position corresponding to the paired-end sequence localization feature value in the preset counting array is an occupied value. If the value at the first position is an occupied value, it is detected whether there is a second integer in the paired-end sequence array. If there is a second integer in the paired-end sequence array, it is determined that the current paired-end sequence is a repeating sequence.
[0037] Compared to using FastQC tools to detect repetitive sequences in two sequence fragments of paired-end sequencing data separately, this invention can simultaneously perform repetitive sequence analysis based on the two sequence fragments corresponding to each sequence in the sequencing data. Furthermore, this invention determines the sequence repetition in the sequencing data when both sequence fragments are identified as repetitive, thereby avoiding overestimation of repetitive sequences in the sequencing data and improving the accuracy of repetitive sequence detection. Attached Figure Description
[0038] Figure 1 This is a schematic diagram of the structure of the repeat sequence detection device involved in the embodiment of the present invention;
[0039] Figure 2 This is a flowchart illustrating the first embodiment of the repetitive sequence detection method of the present invention;
[0040] Figure 3 This is a schematic flowchart illustrating an embodiment of the repetitive sequence detection method of the present invention;
[0041] Figure 4 This is a schematic diagram of the functional modules of the repeat sequence detection device involved in the embodiment of the present invention;
[0042] Figure 5 This is a schematic diagram of the structure of a computer-readable storage medium involved in an embodiment of the present invention.
[0043] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0044] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0045] like Figure 1 As shown, Figure 1 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiments of the present invention.
[0046] It should be noted that the embodiments of the present invention provide a repeat sequence detection device, which can be a smartphone, personal computer or other device, and no specific limitation is made here.
[0047] like Figure 1 As shown, the repeating sequence detection device may include: a processor 1001, such as a CPU; a network interface 1004; a user interface 1003; a memory 1005; and a communication bus 1002. The communication bus 1002 is used to establish communication between these components. The user interface 1003 may include a display screen or an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be high-speed RAM or non-volatile memory, such as a disk drive. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0048] Those skilled in the art will understand that Figure 1 The device structure shown does not constitute a limitation on the device for detecting repetitive sequences. It may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0049] like Figure 1 As shown, the memory 1005, as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a repeating sequence detection program. The operating system is a program that manages and controls the device's hardware and software resources, supporting the operation of the repeating sequence detection program and other software or programs. Figure 1 In the device shown, the user interface 1003 is mainly used for data communication with the client; the network interface 1004 is mainly used for establishing a communication connection with the server; and the processor 1001 can be used to call the repeating sequence detection program stored in the memory 1005 and perform the following operations:
[0050] Read the current paired-end sequence from the sequencing data obtained from paired-end sequencing, and convert the first sequence fragment in the current paired-end sequence into a first integer type, and convert the second sequence fragment in the current paired-end sequence into a second integer type;
[0051] The double-ended sequence positioning feature value is calculated based on the first integer, and it is detected whether the value at the first position corresponding to the double-ended sequence positioning feature value in the preset counting array is an occupied value.
[0052] If the value at the first position is the occupied value, then check whether the second integer exists in the double-ended sequence array;
[0053] If the second integer exists in the double-ended sequence array, then the current double-ended sequence is determined to be a repeating sequence.
[0054] Furthermore, after the operation of detecting whether the value at the first position corresponding to the paired-end sequence positioning feature value in the preset counting array is an occupied value, the processor 1001 can also call the repeating sequence detection program stored in the memory 1005 and perform the following operations:
[0055] If the value at the first position is not the occupied value, then it is determined that the current sequence at both ends is not a repeating sequence;
[0056] The second integer is stored in the second position corresponding to the double-ended sequence location feature value in the double-ended sequence array, and the value at the first position is set as the occupied value.
[0057] Furthermore, the operation of detecting whether the second integer type exists in the double-ended sequence array includes:
[0058] Check whether the value at the second position in the double-ended sequence array is consistent with the second integer;
[0059] If the value at the second position is the same as the second integer, then it is determined that the second integer exists in the double-ended sequence array;
[0060] If the value at the second position is inconsistent with the second integer, then it is determined that the second integer does not exist in the double-ended sequence array.
[0061] Further, the operation of converting the first sequence segment in the current double-ended sequence into a first integer includes:
[0062] Each base of the first sequence segment in the current double-ended sequence is converted into a numerical value to obtain a numerical string;
[0063] The numerical string is converted into an integer to obtain the first integer.
[0064] Further, the operation of calculating the paired-end sequence localization feature value based on the first integer includes:
[0065] Convert the first integer into a binary hash code;
[0066] The feature value is calculated based on the binary hash code, and the value of the preset number of bits in the feature value is determined as the double-ended sequence positioning feature value.
[0067] Furthermore, the processor 1001 can also be used to call the repeating sequence detection program stored in the memory 1005 and perform the following operations:
[0068] Read the current single-end sequence from the sequencing data obtained from single-end sequencing, and convert the current single-end sequence into a single-end sequence integer;
[0069] The single-ended sequence localization feature value is calculated based on the single-ended sequence integer, and the single-ended sequence localization position corresponding to the single-ended sequence localization feature value in the single-ended sequence array is checked to see if the single-ended sequence integer exists.
[0070] If the single-ended sequence is located at the single-ended sequence position, then the current single-ended sequence is determined to be the repeating sequence.
[0071] Furthermore, after the operation of detecting whether the single-ended sequence integer exists at the single-ended sequence location position corresponding to the single-ended sequence location feature value in the single-ended sequence array, the processor 1001 can also call the repeating sequence detection program stored in the memory 1005 and perform the following operations:
[0072] If the single-ended sequence integer does not exist at the single-ended sequence location, then the current single-ended sequence is determined to be a non-repeating sequence, and the single-ended sequence integer is stored at the single-ended sequence location.
[0073] Based on the above structure, various embodiments of the repetitive sequence detection method of the present invention are proposed.
[0074] This invention provides a method for detecting repetitive sequences, referring to... Figure 2 As shown, Figure 2 This is a flowchart illustrating the first embodiment of the repetitive sequence detection method of the present invention.
[0075] This invention provides an embodiment of a method for detecting duplicate sequences. It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order. In this embodiment, the executing entity of the duplicate sequence detection method can be a personal computer, smartphone, or server, etc. For ease of description, the execution entity is omitted from the following description of each embodiment. In this embodiment, the duplicate sequence detection method includes:
[0076] Step S10: Read the current paired-end sequence from the sequencing data obtained from paired-end sequencing, and convert the first sequence fragment in the current paired-end sequence into a first integer, and convert the second sequence fragment in the current paired-end sequence into a second integer;
[0077] In this embodiment, the sequence in the data obtained from paired-end sequencing that currently needs to be detected for repetitive sequences is called the paired-end current sequence, and the paired-end current sequence is read from the sequencing data obtained from paired-end sequencing.
[0078] Specifically, each sequencing data entry obtained from paired-end sequencing includes two sequences (hereinafter referred to as sequence fragments for distinction). In this embodiment, the two sequence fragments in the current paired-end sequence are referred to as the first sequence fragment and the second sequence fragment, respectively. After reading the current paired-end sequence from the sequencing data obtained from paired-end sequencing, the first sequence fragment is converted into an integer (hereinafter referred to as the first integer for distinction), and the second sequence fragment is converted into an integer (hereinafter referred to as the second integer for distinction). In a specific implementation, the first integer and the second integer can be 64-bit integers.
[0079] In a specific implementation, the process of converting the first sequence fragment into a first integer can be as follows: convert each base in the first sequence fragment into its corresponding preset value to obtain a value string, and then convert this value string into an integer to obtain the first integer. The specific settings can be configured according to actual needs and are not limited here. Specifically, since the number and arrangement order of bases differ in different sequence fragments, different sequence fragments will result in different integers. The process of converting the second sequence fragment into a second integer is similar and will not be elaborated here.
[0080] Step S20: Calculate the double-ended sequence positioning feature value based on the first integer, and detect whether the value at the first position corresponding to the double-ended sequence positioning feature value in the preset counting array is an occupied value;
[0081] In this embodiment, a counting array is set. The number of bits in the counting array is consistent with the number of fragments obtained by breaking the genome sequence during high-throughput sequencing. Before the detection of repetitive sequences begins, the value of each bit in the counting array is a value indicating that the position is not occupied. For example, in one embodiment, the value indicating that the position is not occupied can be 0. The specific value can be set according to actual needs and is not limited here.
[0082] Specifically, in this embodiment, after converting the first sequence fragment in the current paired-end sequence into a first integer, a value representing the position of the first sequence fragment aligned to the genome sequence for high-throughput sequencing is calculated based on the first integer (hereinafter referred to as the paired-end sequence localization feature value for distinction).
[0083] The system detects whether the value at the position corresponding to the localization feature value of the double-ended sequence in the detection count array (hereinafter referred to as the first position for distinction) is a value indicating that the position has been occupied (hereinafter referred to as the occupied value for distinction). Further, in a specific implementation, the occupied value can be represented by 1.
[0084] Step S30: If the value at the first position is the occupied value, then check whether the second integer exists in the double-ended sequence array;
[0085] In this embodiment, if the value at the first position is an occupied value, it is determined that there is a sequence in the sequence before the current paired-end sequence that has the same position as the first sequence fragment aligned to the genome sequence, that is, the first sequence fragment has already appeared in the sequence before the current paired-end sequence.
[0086] In this embodiment, an array is set up to store the first occurrence of non-repeating sequences and repeating sequences. This array will be referred to as the double-ended sequence array for distinction. If the value at the first position is occupied, the existence of a second integer in the double-ended sequence array is checked to determine whether the current double-ended sequence is a repeating sequence.
[0087] In a specific implementation, detecting whether a second integer exists in the double-ended sequence array can be done by detecting whether there is a value in the double-ended sequence array that is the same as the second integer, or by detecting whether there is a value at the position corresponding to the double-ended sequence positioning feature value in the double-ended sequence array. The specific settings can be made according to actual needs and are not limited here.
[0088] Step S40: If the second integer exists in the double-ended sequence array, then the current double-ended sequence is determined to be a repeating sequence.
[0089] In this embodiment, if a second integer exists in the double-ended sequence array, it is determined that there exists a sequence containing the same sequence segment as the second sequence segment in the sequence preceding the current double-ended sequence. In this case, the current double-ended sequence can be determined to be a repeating sequence.
[0090] Furthermore, in one embodiment, after determining that the current paired-end sequence is a repetitive sequence, the number of repetitive sequences can be incremented by one. In this embodiment, based on the number of repetitive sequences and the total number of sequences obtained from paired-end sequencing, the repetition rate of the sequences obtained from single-end sequencing can be calculated.
[0091] Furthermore, in some feasible embodiments, after detecting whether the value at the first position corresponding to the paired-end sequence positioning feature value in the preset counting array is an occupied value in step S20 above, the repeating sequence detection method further includes:
[0092] Step S50: If the value at the first position is not the occupied value, then determine that the current double-ended sequence is not a repeating sequence;
[0093] In this embodiment, after detecting whether the value at the first position corresponding to the feature value of the double-ended sequence in the preset counting array is an occupied value, if the value at the first position is not an occupied value, then it is determined that the current double-ended sequence is not a repeating sequence.
[0094] Step S60: Store the second integer in the second position corresponding to the double-ended sequence positioning feature value in the double-ended sequence array, and set the value at the first position as the occupied value.
[0095] In this embodiment, the second integer is stored in the second position corresponding to the double-ended sequence location feature value in the double-ended sequence array, and the value at the first position is set as an occupied value for subsequent sequences to perform repeat sequence detection.
[0096] In this embodiment, if the value at the first position is not an occupied value, it is determined that the current paired sequence is not a repeating sequence. The second integer is stored in the second position corresponding to the paired sequence location feature value in the paired sequence array, and the value at the first position is set to an occupied value. This embodiment enables the storage of non-repeating sequences and the first occurrence of sequences in repeating sequences while performing repeating sequence detection, and removes repeating sequences. Compared with using the rmdup and MarkDuplicates functions of samtools (a tool for processing alignment files in SAM (sequence alignment map) or BAM (binary SAM file) format to remove repeating sequences from BAM files after repeating sequence alignment, this embodiment can reduce the workload of repeating sequence analysis and improve the speed of repeating sequence removal.
[0097] Furthermore, in some feasible embodiments, step S30 above: detecting whether the second integer exists in the paired-end sequence array includes:
[0098] Step S301: Detect whether the value at the second position in the double-ended sequence array is consistent with the second integer;
[0099] In this embodiment, it is detected whether a second integer exists in the double-ended sequence array. Specifically, it is detected whether the value at the second position in the double-ended sequence array is consistent with the second integer.
[0100] Step S302: If the value at the second position is consistent with the second integer, then it is determined that the second integer exists in the double-ended sequence array;
[0101] If the value at the second position is the same as the second integer, then it is determined that the second integer exists in the double-ended sequence array. At this time, it can be determined that the current double-ended sequence is a repeating sequence.
[0102] Step S303: If the value at the second position is inconsistent with the second integer, then it is determined that the second integer does not exist in the double-ended sequence array.
[0103] If the value at the second position is inconsistent with the second integer, then it is determined that the second integer does not exist in the double-ended sequence array.
[0104] In this embodiment, the presence of a second integer is detected by checking whether the value at the second position in the paired-end sequence array is consistent with the second integer. Compared with directly detecting whether the second position in the paired-end sequence array is occupied, this embodiment avoids the problem of inaccurate sequence fragment alignment to the genome sequence due to sequence fragment errors, thus improving the accuracy of repetitive sequence detection.
[0105] Furthermore, in some feasible embodiments, step S10 above: converting the first sequence segment in the current double-ended sequence into a first integer includes:
[0106] Step S101: Convert each base of the first sequence fragment in the current double-ended sequence into a numerical value to obtain a numerical string;
[0107] In this embodiment, each base of the first sequence segment in the current double-ended sequence is converted into a numerical value to obtain a numerical string. Specifically, in this embodiment, each base of the first sequence segment corresponds to a different numerical value. For example, in one implementation, to ensure the uniqueness of each integer, base A corresponds to a preset first numerical value of 7, base C corresponds to a preset first numerical value of 74, base T corresponds to a preset first numerical value of 222, base G corresponds to a preset first numerical value of 31, and base X corresponds to a preset first numerical value of 13. The specific values can also be set according to actual needs and are not limited here.
[0108] Step S102: Convert the numerical string into an integer to obtain the first integer.
[0109] In this embodiment, after converting each base of the first sequence fragment in the current double-ended sequence into a numerical value to obtain a numerical string, the numerical string is converted into an integer to obtain a first integer.
[0110] In a specific implementation, the process of converting a numerical string into an integer can involve calculating each base in the first sequence segment until the last base is calculated, obtaining an output value, and then converting this output value into a 64-bit integer to obtain the first integer. Specifically, the process of calculating each base in the first sequence segment to obtain the first integer can be as follows:
[0111] Step 1: int offset = (p + posOffset) * mBufNum + i;
[0112] Step 2: offset = mOffsetMask;
[0113] Step 3: output[i] = mPrimeArrays[offset] * (base + (p + posOffset)).
[0114] Where posOffset is the first integer type, p is the sequence length, mBufNum is the number of buffers used to store integer data (e.g., in one implementation, mBufNum can be 2), OffsetMask is a numeric integer of approximately 1GB in size, which can hold the 64-bit integers converted from the sequence, and PrimeArrays is an array of prime numbers used to ensure the uniqueness of the first sequence after conversion to integers. The above iterative calculation is performed on each base until the last base is reached, resulting in output. Finally, output is converted to a 64-bit integer, thus obtaining the first integer type.
[0115] It is understandable that the process of converting the second sequence fragment into the second integer can be carried out in the same way as described above, and will not be repeated here.
[0116] Furthermore, in some feasible embodiments, step S20 above: calculating the paired-end sequence localization feature value based on the first integer includes:
[0117] Step S201: Convert the first integer into a binary hash code;
[0118] In this embodiment, the first integer is converted into a binary hash code. In a specific implementation, the first integer can be moduloed by the number of binary bits in the cache storing the integer data to obtain a binary hash table location code, i.e., a binary hash code.
[0119] Step S202: Calculate the feature value based on the binary hash code, and determine the value of the preset number of bits in the feature value as the double-ended sequence positioning feature value.
[0120] In this embodiment, the feature value is calculated based on the binary hash code. In a specific implementation, the feature value can be obtained by dividing the binary hash code by a preset value, or by multiplying the binary hash code by a preset value; the specific method is not limited here.
[0121] For example, in a specific implementation, the preset value can be 3. In this implementation, the binary hash code can be divided by 3 to convert the binary hash location code into a byte location value, that is, a feature value. In another implementation, the preset value can also be 1 / 3. In this case, the binary hash code can be multiplied by 1 / 3 to obtain the feature value.
[0122] In this embodiment, the value at a preset number of bits in the feature value is determined as the paired-end sequence localization feature value. For example, in one embodiment, the preset number of bits can be the 3rd bit. Specifically, the 3rd binary number of the feature value is taken to obtain the position of the first sequence fragment compared to the genome sequence, that is, the paired-end sequence localization feature value.
[0123] Furthermore, in one embodiment, the paired-end sequencing data is used as samples based on a first sequence fragment and a second sequence fragment to perform repetitive sequence detection. The first sequence fragment and the second sequence fragment in the paired-end sequencing data are then used as samples to perform repetitive sequence analysis, and the repetition rates are shown in Table 1 below.
[0124] sample Repetition rate First sequence segment 0.492809% Second sequence segment 0.393106% First sequence segment and second sequence segment 0.10098%
[0125] Table 1
[0126] As shown in Table 1, the repetition rate obtained by performing repetition sequence detection on the first or second sequence fragment alone is significantly higher than the repetition rate obtained by performing repetition sequence analysis on the first and second sequence fragments simultaneously.
[0127] In this embodiment, the current paired-end sequence is read from the sequencing data obtained by paired-end sequencing, and the first sequence fragment in the current paired-end sequence is converted into a first integer, and the second sequence fragment in the current paired-end sequence is converted into a second integer. The paired-end sequence localization feature value is calculated based on the first integer, and it is detected whether the value at the first position corresponding to the paired-end sequence localization feature value in the preset counting array is an occupied value. If the value at the first position is an occupied value, it is detected whether there is a second integer in the paired-end sequence array. If there is a second integer in the paired-end sequence array, it is determined that the current paired-end sequence is a repeating sequence.
[0128] Compared to using FastQC tools to detect repetitive sequences in two sequence fragments of paired-end sequencing data separately, this embodiment can perform repetitive sequence analysis based on the two sequence fragments corresponding to each sequence in the sequencing data. This embodiment determines the sequence repetition when both sequence fragments are identified as repetitive, avoiding the overestimation of repetitive sequences and improving the accuracy of repetitive sequence detection.
[0129] Furthermore, based on the first embodiment described above, a second embodiment of the repetitive sequence detection method of the present invention is proposed. In this embodiment, the repetitive sequence detection method further includes:
[0130] Step S70: Read the current single-end sequence from the sequencing data obtained from single-end sequencing, and convert the current single-end sequence into a single-end sequence integer;
[0131] High-throughput sequencing is divided into single-end sequencing and paired-end sequencing. Single-end sequencing yields a single sequence. When performing repetitive sequence detection on the sequences obtained from single-end sequencing, it is necessary to perform repetitive sequence detection on each sequence obtained from single-end sequencing. In this embodiment, the sequence that needs to be detected for repetitive sequences is referred to as the current single-end sequence.
[0132] Specifically, in this embodiment, the current single-ended sequence is read and converted into an integer (hereinafter referred to as single-ended sequence integer for distinction).
[0133] In a specific implementation, the process of converting the current single-end sequence into a single-end sequence integer can be as follows: convert each base in the current single-end sequence into its corresponding preset value to obtain a value string, and then convert this value string into an integer to obtain the first integer. The specific settings can be configured according to actual needs and are not limited here.
[0134] Step S80: Calculate the single-ended sequence positioning feature value based on the single-ended sequence integer, and check whether the single-ended sequence positioning position corresponding to the single-ended sequence positioning feature value exists in the single-ended sequence array;
[0135] In this embodiment, an array is pre-set to store the first occurrence of non-repetitive sequences and repetitive sequences obtained from single-end sequencing. This array will be referred to as the single-end sequence array for distinction. After converting the current single-end sequence into a first integer type, the presence of single-end sequence integers in the single-end sequence array is checked.
[0136] In a specific implementation, the presence of a first integer in the double-ended sequence array is detected by detecting whether a value exists at the position corresponding to the single-ended sequence integer in the single-ended sequence array.
[0137] In this embodiment, the presence of single-end sequence integers in the single-end sequence array is detected. Specifically, in this embodiment, the position of the current single-end sequence aligned to the genome sequence for high-throughput sequencing is calculated based on the single-end sequence integers (hereinafter referred to as the single-end sequence localization feature value for distinction). After obtaining the single-end sequence localization feature value, the presence of single-end sequence integers is detected at the corresponding position in the single-end sequence array (hereinafter referred to as the single-end sequence localization position for distinction).
[0138] Furthermore, in one embodiment, it can be to detect whether there is an integer at the single-ended sequence location to determine whether there is a single-ended sequence integer in the single-ended sequence array. The specific settings can be configured according to actual needs, and are configured here.
[0139] Step S90: If the single-ended sequence is located at the single-ended sequence position, then the current single-ended sequence is determined to be the repeating sequence.
[0140] In this embodiment, if a single-ended sequence integer exists at the single-ended sequence location position, it is determined that there is a sequence that repeats the single-ended current sequence among the sequences that performed repeat sequence detection before the single-ended current sequence. Since each different sequence is converted to a different integer, the single-ended sequence location feature values corresponding to different single-ended sequences based on integer conversion are different. Therefore, when a single-ended sequence integer exists at the single-ended sequence location position, it can be determined that the single-ended current sequence repeats the sequence occupying the single-ended sequence location position, that is, the single-ended current sequence is a repeating sequence.
[0141] In a specific implementation, the specific process of converting the current single-ended sequence into a single-ended sequence integer, and the specific process of calculating the single-ended sequence location feature value based on the single-ended sequence integer, can be referred to the first embodiment, and will not be elaborated here.
[0142] Furthermore, in one embodiment, after determining that the current single-end sequence is a repetitive sequence, the number of repetitive sequences can be incremented by one. In this embodiment, the repetition rate of the single-end sequence can be calculated based on the number of repetitive sequences and the total number of sequences obtained from single-end sequencing.
[0143] Furthermore, in one embodiment, referring to Figure 3 , Figure 3 This is a schematic flowchart of an embodiment of the repetitive sequence detection method of the present invention, which involves the single-end current sequence (i.e., Figure 3 The Reads (read lengths) (sequences) shown are converted to single-ended sequence integers (i.e., Figure 3 The 64-bit integer shown in the figure is used to detect the single-ended sequence array (i.e., Figure 3 The algorithm checks whether the single-ended sequence positions in the approximately 1GB array shown are occupied. If the single-ended sequence positions are occupied, then the current single-ended sequence is determined to be a repeating sequence. In this embodiment, after determining that the current single-ended sequence is a repeating sequence, the number of repeating sequences (i.e., ...) can be checked. Figure 3 The total number of duplicate reads shown is incremented by one, and based on the number of duplicate reads and the total number of sequences obtained from single-end sequencing, the duplication rate of the sequences obtained from single-end sequencing can be calculated. Figure 3The Dup (duplicate reads) rate is shown in the figure.
[0144] In this embodiment, the single-ended sequence location feature value is obtained based on the single-ended sequence integer calculation. By detecting whether the single-ended sequence location position corresponding to the single-ended sequence location feature value in the single-ended sequence array is occupied, it is possible to detect whether the current single-ended sequence is a repeating sequence. This embodiment can quickly determine repeating sequences and improve the speed of repeating sequence detection.
[0145] Furthermore, in some feasible embodiments, after detecting whether the single-ended sequence is located at the position corresponding to the single-ended sequence location feature value in the single-ended sequence array, the repeat sequence detection method further includes:
[0146] Step A10: If the single-ended sequence integer does not exist at the single-ended sequence positioning position, then it is determined that the current single-ended sequence is not a repeating sequence, and the single-ended sequence integer is stored at the single-ended sequence positioning position.
[0147] If the single-end sequence location in the single-end sequence array does not contain a single-end sequence integer, it is determined that there is no sequence identical to the current single-end sequence among the sequences read before the current single-end sequence. That is, the current single-end sequence is a non-repeating sequence. In this case, the single-end sequence integer is stored in the single-end sequence location in the single-end sequence array for comparison with other single-end sequencing sequences.
[0148] In this embodiment, if a single-end sequence integer is not present at the single-end sequence location, the current single-end sequence is determined not to be a repeating sequence, and the single-end sequence integer is stored at the single-end sequence location. This embodiment enables the storage of non-repeating sequences while performing repeating sequence detection, and the removal of repeating sequences. Compared to using the rmdup and MarkDuplicates functions of the samtools tool to remove repeating sequences from the BAM file after repeating sequence alignment, this embodiment can reduce the workload of the repeating sequence analysis process and improve the speed of repeating sequence removal.
[0149] In this embodiment, the current single-end sequence is read from the sequencing data obtained by single-end sequencing, and the current single-end sequence is converted into a single-end sequence integer. The single-end sequence localization feature value is calculated based on the single-end sequence integer, and it is detected whether the single-end sequence localization position corresponding to the single-end sequence localization feature value in the single-end sequence array is occupied. If the single-end sequence localization position is occupied, the current single-end sequence is determined to be a repeating sequence.
[0150] In this embodiment, whether the current single-ended sequence is a repeating sequence is determined based on whether the single-ended sequence positioning position corresponding to the current single-ended sequence is occupied. Compared with comparing the current single-ended sequence with each sequence in the double-ended sequence array, this embodiment can quickly determine the repeating sequence and improve the speed of repeating sequence detection.
[0151] Furthermore, the present invention also provides a repeat sequence detection device, with reference to Figure 4 , Figure 4 This is a functional block diagram of the repeat sequence detection device according to an embodiment of the present invention. The repeat sequence detection device of the present invention includes:
[0152] The conversion module 10 is used to read the current sequence of the paired ends from the sequencing data obtained by paired-end sequencing, and convert the first sequence fragment in the current sequence of the paired ends into a first integer and the second sequence fragment in the current sequence of the paired ends into a second integer.
[0153] The detection module 20 is used to calculate the double-ended sequence positioning feature value based on the first integer, and to detect whether the value at the first position corresponding to the double-ended sequence positioning feature value in the preset counting array is an occupied value.
[0154] The detection module 20 is further configured to detect whether the second integer exists in the double-ended sequence array if the value at the first position is the occupied value;
[0155] The determining module 30 is used to determine that the current double-ended sequence is a repeating sequence if the second integer exists in the double-ended sequence array.
[0156] Furthermore, the aforementioned determining module 30 is also used for:
[0157] If the value at the first position is not the occupied value, then it is determined that the current sequence at both ends is not a repeating sequence;
[0158] The second integer is stored in the second position corresponding to the double-ended sequence location feature value in the double-ended sequence array, and the value at the first position is set as the occupied value.
[0159] Furthermore, the aforementioned detection module 20 is also used for:
[0160] Check whether the value at the second position in the double-ended sequence array is consistent with the second integer;
[0161] If the value at the second position is the same as the second integer, then it is determined that the second integer exists in the double-ended sequence array;
[0162] If the value at the second position is inconsistent with the second integer, then it is determined that the second integer does not exist in the double-ended sequence array.
[0163] Furthermore, the aforementioned conversion module 10 is also used for:
[0164] Each base of the first sequence segment in the current double-ended sequence is converted into a numerical value to obtain a numerical string;
[0165] The numerical string is converted into an integer to obtain the first integer.
[0166] Furthermore, the aforementioned detection module 20 is also used for:
[0167] Convert the first integer into a binary hash code;
[0168] The feature value is calculated based on the binary hash code, and the value of the preset number of bits in the feature value is determined as the double-ended sequence positioning feature value.
[0169] Furthermore, the conversion module 10 is also used to: read the current single-end sequence from the sequencing data obtained from single-end sequencing, and convert the current single-end sequence into a single-end sequence integer;
[0170] The detection module 20 is further configured to: calculate the single-ended sequence positioning feature value based on the single-ended sequence integer, and detect whether the single-ended sequence positioning position corresponding to the single-ended sequence positioning feature value exists in the single-ended sequence array;
[0171] The aforementioned determining module 30 is further configured to: if the single-ended sequence location contains the single-ended sequence integer, then determine the current single-ended sequence as the repeating sequence.
[0172] Furthermore, the aforementioned determining module 30 is also used for:
[0173] If the single-ended sequence integer does not exist at the single-ended sequence location, then the current single-ended sequence is determined to be a non-repeating sequence, and the single-ended sequence integer is stored at the single-ended sequence location.
[0174] Each functional module of the repeat sequence detection device implements the steps of the repeat sequence detection method described above during operation.
[0175] Furthermore, the present invention also provides a computer-readable storage medium. (See reference...) Figure 5 , Figure 5 This is a schematic diagram of the structure of a computer-readable storage medium according to an embodiment of the present invention. The computer-readable storage medium stores a repeating sequence detection program, which, when executed by a processor, implements the steps of the repeating sequence detection method described above.
[0176] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0177] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0178] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a computer-readable storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a repeating sequence detection device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0179] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. A method for detecting repetitive sequences, characterized in that, The method for detecting repetitive sequences includes: Read the current paired-end sequence from the sequencing data obtained from paired-end sequencing, and convert the first sequence fragment in the current paired-end sequence into a first integer type, and convert the second sequence fragment in the current paired-end sequence into a second integer type; The double-ended sequence positioning feature value is calculated based on the first integer, and it is detected whether the value at the first position corresponding to the double-ended sequence positioning feature value in the preset counting array is an occupied value. If the value at the first position is the occupied value, then check whether the second integer exists in the double-ended sequence array; If the second integer exists in the double-ended sequence array, then the current double-ended sequence is determined to be a repeating sequence; The step of converting the first sequence segment in the current double-ended sequence into a first integer includes: Each base of the first sequence segment in the current double-ended sequence is converted into a numerical value to obtain a numerical string, and the numerical string is converted into an integer to obtain a first integer. The step of calculating the paired-end sequence localization feature value based on the first integer includes: The first integer is converted into a binary hash code, and a feature value is obtained by dividing the binary hash code by a preset value. The value at a preset number of bits of the feature value is determined as the double-ended sequence positioning feature value.
2. The method for detecting repetitive sequences as described in claim 1, characterized in that, After the step of detecting whether the value at the first position corresponding to the paired-end sequence positioning feature value in the preset counting array is an occupied value, the method further includes: If the value at the first position is not the occupied value, then it is determined that the current sequence at both ends is not a repeating sequence; The second integer is stored in the second position corresponding to the double-ended sequence location feature value in the double-ended sequence array, and the value at the first position is set as the occupied value.
3. The method for detecting repetitive sequences as described in claim 2, characterized in that, The step of detecting whether the second integer type exists in the paired-end sequence array includes: Check whether the value at the second position in the double-ended sequence array is consistent with the second integer; If the value at the second position is the same as the second integer, then it is determined that the second integer exists in the double-ended sequence array; If the value at the second position is inconsistent with the second integer, then it is determined that the second integer does not exist in the double-ended sequence array.
4. A device for detecting repetitive sequences, characterized in that, The repeat sequence detection device includes: The conversion module is used to read the current paired-end sequence from the sequencing data obtained by paired-end sequencing, and convert the first sequence fragment in the current paired-end sequence into a first integer and the second sequence fragment in the current paired-end sequence into a second integer. The detection module is used to calculate the double-ended sequence positioning feature value based on the first integer, and to detect whether the value at the first position corresponding to the double-ended sequence positioning feature value in the preset counting array is an occupied value. The detection module is further configured to detect whether the second integer exists in the double-ended sequence array if the value at the first position is the occupied value; The determining module is configured to determine that the current double-ended sequence is a repeating sequence if the second integer exists in the double-ended sequence array; The conversion module is further configured to: convert each base of the first sequence fragment in the current double-ended sequence into a numerical value to obtain a numerical string, and convert the numerical string into an integer to obtain a first integer. The detection module is further configured to: convert the first integer into a binary hash code, divide the binary hash code by a preset value to obtain a feature value, and determine the value of the preset number of bits in the feature value as the double-ended sequence positioning feature value.
5. A device for detecting repetitive sequences, characterized in that, The repeat sequence detection device includes: a memory, a processor, and a repeat sequence detection program stored in the memory and executable on the processor, the repeat sequence detection program being configured to implement the steps of the repeat sequence detection method as described in any one of claims 1 to 3.
6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a repeating sequence detection program, which, when executed by a processor, implements the steps of the repeating sequence detection method as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Method and device for processing circulating tumor DNA repetitive sequence
CN108229103A
Rapid character string matching method based on suffix array
CN108920483A