A method and device for analyzing species based on base sequence

By reading the base sequence in the microbial gene library and aligning it with the species base sequence library, combining similarity and frequency to calculate the probability score, the problem of uncertainty in the base sequence attribute in the prior art is solved, and the detection of genes is realized Accurate species attribution analysis of sequences.

CN114743597BActive Publication Date: 2024-12-06BGI CLINICAL LAB (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210326419.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-30
Publication Date
2024-12-06
Estimated Expiration
2042-03-30

AI Technical Summary

Technical Problem

The existing base sequence alignment methods cannot accurately determine the species attribute of the gene sequence to be detected, especially the possible homologous sequences of different species, resulting in uncertainty in the alignment results.

Method used

By obtaining the gene sequence to be detected from the existing microbial gene library, the base sequence is read based on the preset length and sliding step length, and aligning it in the preset species base sequence library to combine the similarity of the base sequences of the base sequences. and the frequency of occurrence, calculate the probability score of each species information and determine the species of the base sequence.

Benefits of technology

The precise analysis of species attribution to detect gene sequences is achieved, the scientificity and accuracy of base sequence attribution is improved, and the probability distribution of base sequences in each species can be better measured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114743597B_ABST
    Figure CN114743597B_ABST
Patent Text Reader

Abstract

The present application discloses a method and device for analyzing species based on base sequences, the method comprising: obtaining a gene sequence to be detected, reading the gene sequence to be detected, obtaining a number of base sequences to be analyzed, determining a number of target base sequences matching the base sequence to be analyzed in a species base sequence library, and a number of species information corresponding to each target base sequence, determining a matching score between the species information and the base sequence to be analyzed, and counting the frequency of occurrence of the species information, thereby obtaining a probability score of the species to which the base sequence to be analyzed belongs, and the species with the highest probability score is used as the belonging species. It can be seen that when comparing, the similarity of two base sequences is analyzed, the species information corresponding to the base sequence to be analyzed is scored, and the possibility of the base sequence to be analyzed belonging to a species is analyzed in combination with the frequency of occurrence of the species information, so as to more scientifically and accurately measure the probability distribution of the base sequence to be analyzed in each species, which is helpful to determine the species belonging to the gene sequence to be detected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of base detection, and more specifically, to a method and device for analyzing species based on base sequences. Background Art

[0002] As microorganisms multiply, they become increasingly complex and their species increase. It is uncertain whether newly derived microorganisms originate from dangerous species, making microorganisms of unknown origin the focus of global attention. Therefore, the first step to determine the species of microorganisms is to quickly identify the microbial protozoa. Currently, the sequencing sequence is aligned to the reference database through sequence alignment, and the species protozoa are analyzed based on the sequence alignment results.

[0003] However, homologous sequences may exist in different species. The current alignment method usually results in a sequence being aligned to the genomes of multiple species, making it impossible to determine the species to which the base sequence belongs.

[0004] How to achieve accurate analysis of species attribution based on base sequences is an issue that requires attention. Summary of the invention

[0005] In view of the above problems, the present application is proposed to provide a method and device for analyzing species based on base sequences, so as to achieve accurate analysis of species affiliation based on base sequences.

[0006] In order to achieve the above objectives, the specific plan is proposed as follows:

[0007] A method for analyzing species based on base sequences, comprising:

[0008] Obtain the gene sequence to be tested from the existing microbial gene library;

[0009] Based on a preset read length and a first sliding step length, the gene sequence to be detected is read to obtain a plurality of base sequences to be analyzed having a length equal to the read length;

[0010] For each base sequence to be analyzed, determine a number of target base sequences that are successfully aligned in a configured species base sequence library, and a number of species information corresponding to each target base sequence, wherein the species base sequence library contains a number of base sequences with a preset read length, and a number of species information corresponding to each base sequence;

[0011] For each species information corresponding to each target base sequence, based on the similarity between the target base sequence and the base sequence to be analyzed, determining a matching score between the species information and the base sequence to be analyzed;

[0012] Count the occurrence frequency of each type of species information in the species information corresponding to each target base sequence;

[0013] For each base sequence to be analyzed, the occurrence frequency of each species information corresponding to the target base sequence that is successfully aligned with it is multiplied by the matching score between the species information and the base sequence to be analyzed to obtain an observation score, and the observation score is added to the matching score between the species information and the base sequence to be analyzed, and the result is used as the probability score that the species information belongs to the species to which the base sequence to be analyzed belongs, and the species with the highest probability score is used as the species to which the base sequence to be analyzed belongs.

[0014] Optionally, the counting of the occurrence frequency of each type of species information in the species information corresponding to each target base sequence includes:

[0015] Add the number of species information corresponding to each target base sequence to obtain the total number of species information occurrences, and count the number of occurrences of each type of species information in the species information corresponding to each target base sequence;

[0016] The ratio of the number of occurrences of each type of species information in the species information corresponding to each target base sequence to the total number of occurrences of the species information is taken as the frequency of occurrence of each type of species information.

[0017] Optionally, for each base sequence to be analyzed, determining a number of target base sequences that have been successfully aligned in the configured species base sequence library includes:

[0018] For each base sequence to be analyzed, the base sequences in the configured species base sequence library are compared with the base sequence to be analyzed one by one, and the base sequence with the number of successful base comparisons greater than the preset number of comparisons is taken as the target base sequence.

[0019] Optionally, after taking the species with the highest probability score as the species to which the base sequence to be analyzed belongs, the method further includes:

[0020] The species with the largest number of occurrences in each base sequence to be analyzed is taken as the species to which the gene sequence to be detected belongs.

[0021] Optionally, the process of constructing the species base sequence library includes:

[0022] Obtain gene sequences of several species from existing gene banks;

[0023] Taking the preset length as the read length and the preset step length being greater than a second sliding step length of 1, the gene sequence of each species is read to obtain a plurality of base sequences of each species having a length of the read length, wherein the GPU memory used in the reading process does not exceed the preset memory;

[0024] A species base sequence library consisting of base sequences of each species is constructed.

[0025] Optionally, the configured species base sequence library is obtained from an existing gene library, and the gene sequences of several species are obtained, with the preset length as the read length and the step length as 1 base, and the gene sequence of each species is read to obtain several base sequences of each species with the length of the read length, which are constructed by the base sequences of each species, and the species to which each base sequence to be analyzed belongs is obtained as the first classification result;

[0026] The method further comprises:

[0027] Adjusting the step length when establishing the species base sequence library to obtain an adjusted species base sequence library, wherein the adjusted step length is not 1;

[0028] Return to executing the step of determining, for each base sequence to be analyzed, a number of target base sequences that have been successfully aligned in the configured species base sequence library, and a number of species information corresponding to each target base sequence, until the species to which each base sequence to be analyzed belongs is obtained as the second classification result;

[0029] Determine whether the difference between the first classification result and the second classification result is greater than a preset difference;

[0030] If not, the adjusted species base sequence library is used as the final species base sequence library;

[0031] If so, return to the step of adjusting the step length when establishing the species base sequence library to obtain the adjusted species base sequence library.

[0032] A device for analyzing species based on base sequences, comprising:

[0033] A gene sequence acquisition unit to be tested, used to obtain the gene sequence to be tested from an existing microbial gene library;

[0034] A base sequence acquisition unit to be analyzed, used for reading the gene sequence to be detected based on a preset read length and a first sliding step length, and obtaining a plurality of base sequences to be analyzed with a length of the read length;

[0035] A base sequence comparison unit, for each base sequence to be analyzed, determines a number of target base sequences that have been successfully compared in a configured species base sequence library, and a number of species information corresponding to each target base sequence, wherein the species base sequence library contains a number of base sequences with a preset read length, and a number of species information corresponding to each base sequence;

[0036] a matching score determining unit, configured to determine, for each species information corresponding to each target base sequence, a matching score between the species information and the base sequence to be analyzed based on the similarity between the target base sequence and the base sequence to be analyzed;

[0037] An occurrence frequency statistics unit is used to count the occurrence frequency of each type of species information in the species information corresponding to each target base sequence;

[0038] The belonging species determination unit is used to, for each base sequence to be analyzed, multiply the occurrence frequency of each species information corresponding to the target base sequence that has been successfully aligned with it by the matching score between the species information and the base sequence to be analyzed to obtain an observation score, add the observation score to the matching score between the species information and the base sequence to be analyzed, and use the result as the probability score that the species information belongs to the belonging species of the base sequence to be analyzed, and use the belonging species with the highest probability score as the belonging species of the base sequence to be analyzed.

[0039] Optionally, the occurrence frequency statistics unit includes:

[0040] The first occurrence frequency counting subunit is used to add the number of species information corresponding to each target base sequence to obtain the total number of species information occurrences, and to count the number of occurrences of each type of species information in the species information corresponding to each target base sequence;

[0041] The second occurrence frequency statistical subunit is used to take the ratio of the number of occurrences of each type of species information in the species information corresponding to each target base sequence to the total number of occurrences of the species information as the occurrence frequency of each type of species information.

[0042] Optionally, the base sequence comparison unit includes:

[0043] The target base sequence determination unit is used to compare the base sequences in the configured species base sequence library with the base sequence to be analyzed one by one for each base sequence to be analyzed, and take the base sequence with the number of successful base comparisons greater than the preset number of comparisons as the target base sequence.

[0044] Optionally, the device further comprises:

[0045] The species determination unit is used to take the species with the largest number of occurrences in each base sequence to be analyzed as the species to which the gene sequence to be detected belongs.

[0046] Optionally, the device further comprises:

[0047] Species gene sequence acquisition unit, used to obtain gene sequences of several species from existing gene banks;

[0048] A base sequence reading unit, configured to read the gene sequence of each species with the preset length as the read length and a preset step length greater than 1 as the second sliding step length, to obtain a plurality of base sequences of each species with the length of the read length, wherein the GPU video memory used in the reading process does not exceed the preset video memory;

[0049] The retrieval sequence library construction unit is used to construct a species base sequence library composed of base sequences of various species.

[0050] Optionally, the configured species base sequence library is obtained from an existing gene library, and the gene sequences of several species are obtained, with the preset length as the read length and the step length as 1 base, and the gene sequence of each species is read to obtain several base sequences of each species with the length of the read length, which are constructed by the base sequences of each species, and the species to which each base sequence to be analyzed belongs is obtained as the first classification result;

[0051] The device also includes:

[0052] A step length adjustment unit is used to adjust the step length when establishing the species base sequence library to obtain the adjusted species base sequence library, wherein the adjusted step length is not 1, and the processing steps of the base sequence comparison unit are returned to be executed until the species to which each base sequence to be analyzed belongs is obtained as the second classification result;

[0053] The difference judgment unit is used to judge whether the difference between the first classification result and the second classification result is greater than a preset difference. If not, the adjusted species base sequence library is used as the final species base sequence library. If so, return to the processing step of executing the step adjustment unit.

[0054] By means of the above technical scheme, since the pre-constructed species gene sequence library contains the information of each species corresponding to each base sequence, the species information corresponding to the base sequence to be analyzed can be scored according to the similarity between the base sequence to be analyzed and the target base sequence during comparison. The frequency of occurrence of each information for each base sequence to be analyzed is combined to analyze the possibility that the base sequence to be analyzed belongs to each species, thereby more scientifically and accurately measuring the probability distribution degree of each base sequence to be analyzed in each species, which is helpful to determine the species affiliation of the gene sequence to be detected. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0056] Figure 1A schematic diagram of a process for analyzing species based on base sequences provided in an embodiment of the present application;

[0057] Figure 2 A schematic diagram of another process for analyzing species based on base sequences provided in an embodiment of the present application;

[0058] Figure 3 A schematic diagram of the structure of a device for analyzing species based on base sequences provided in an embodiment of the present application;

[0059] Figure 4 A schematic diagram of the structure of a species analysis device based on base sequence provided in an embodiment of the present application. DETAILED DESCRIPTION

[0060] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0061] The present application solution can be implemented based on a terminal with data processing capabilities, which can be a computer, server, cloud, etc.

[0062] Next, combine Figure 1 The method for analyzing species based on base sequence of the present application may include the following steps:

[0063] Step S110: Obtain the gene sequence to be detected from the existing microbial gene library.

[0064] Specifically, the existing microbial gene library may contain a number of unknown microbial gene sequences, and these unknown microbial gene sequences need to be detected.

[0065] Step S120: Based on a preset read length and a first sliding step length, the gene sequence to be detected is read to obtain a plurality of base sequences to be analyzed having a length equal to the read length.

[0066] Specifically, the preset read length can represent the number of bases selected from the gene sequence to be detected at one time. For example, if the read length is 4, it can represent the number of bases selected from the gene sequence to be detected. The first sliding step can represent the number of bases moved by two adjacent reads. For example, for the gene sequence to be detected, assuming it is: AATCGG, when the read length is 4 and the first sliding step is 2, the base sequence to be analyzed obtained by the first reading is: AATC, and the base sequence to be analyzed obtained by the second reading is: TCGG.

[0067] Step S130: for each base sequence to be analyzed, determine a number of target base sequences that have been successfully aligned in the configured species base sequence library, and a number of species information corresponding to each target base sequence.

[0068] The configured species base sequence library may include a number of base sequences with a preset read length and a number of species information corresponding to each base sequence. The target base sequence may represent a base sequence used to represent a base sequence to be analyzed.

[0069] It is understandable that the same base fragments may exist between the gene sequences of different species, so one base sequence may indicate multiple species, and therefore each base sequence may correspond to information of several species.

[0070] Specifically, a condition for successful alignment of two base sequences may be preset, and when the two base sequences meet the condition during alignment, it is determined that the alignment is successful, otherwise it is determined that the alignment fails.

[0071] Step S140: for each species information corresponding to each target base sequence, based on the similarity between the target base sequence and the base sequence to be analyzed, determine the matching score between the species information and the base sequence to be analyzed.

[0072] Specifically, the similarity between the target base sequence and the base sequence can indicate the reliability of the target base sequence in representing the base sequence to be analyzed. The higher the similarity, the higher the reliability of the target base sequence in representing the base sequence to be analyzed, and thus the higher the matching score between the species information and the base sequence to be analyzed.

[0073] Step S150: Count the occurrence frequency of each type of species information in the species information corresponding to each target base sequence.

[0074] Specifically, the occurrence frequency of each species information may represent the possibility of the species information determined based on the target base sequence.

[0075] Step S160: For each base sequence to be analyzed, the occurrence frequency of each species information corresponding to the target base sequence successfully aligned therewith is multiplied by the matching score between the species information and the base sequence to be analyzed to obtain an observation score.

[0076] Specifically, the observation score may represent the distribution observed through the currently displayed species distribution. The observation scores obtained by referring to different species base sequence libraries are different, and may also be used as an empirical score for the final result score.

[0077] Step S170: Add the observed score to the matching score between the species information and the base sequence to be analyzed, and use the result as the probability score that the species information belongs to the species to which the base sequence to be analyzed belongs.

[0078] The probability score of the species to which the base sequence to be analyzed belongs can represent the possibility that the base sequence to be analyzed belongs to the species.

[0079] Specifically, for each base sequence to be analyzed, the observation score may be added to the matching score between the species information and the base sequence to be analyzed, and the result may be used as the probability score that the species information belongs to the species to which the base sequence to be analyzed belongs.

[0080] It can be understood that the final evaluation score of the species information of each base sequence to be analyzed is composed of the basic score of the species information and the observation score (empirical score). The basic score can represent the matching score between the species information and the base sequence to be analyzed. Combining the two to quantify the final score can make the evaluation effect more objective and accurate.

[0081] Step S180: taking the species with the highest probability score as the species of the base sequence to be analyzed.

[0082] It is understandable that for each base sequence to be analyzed, there may be multiple species affiliations and scores for each species affiliation, and the species affiliation with the highest probability score can be used as the species affiliation of the base sequence to be analyzed.

[0083] The method for analyzing species based on base sequences provided in this embodiment can pre-construct a species gene sequence library containing information of each species corresponding to each base sequence. During comparison, the species information corresponding to the base sequence can be scored according to the similarity between the base sequence and the target base sequence. The possibility of the base sequence belonging to each species is analyzed by combining the frequency of occurrence of each information for each base sequence, thereby more scientifically and accurately measuring the probability distribution degree of each base sequence in each species, which is helpful to determine the species to which the gene sequence to be detected belongs.

[0084] In some embodiments of the present application, the process of counting the occurrence frequency of each type of species information in the species information corresponding to each target base sequence in the above step S150 is introduced, and the process may include:

[0085] S1. Add the number of species information corresponding to each target base sequence to obtain the total number of species information occurrences, and count the number of occurrences of each type of species information in the species information corresponding to each target base sequence.

[0086] It is understandable that since each base sequence to be analyzed may match multiple target base sequences, and each target base sequence may have multiple species information, analyzing each base sequence to be analyzed may result in multiple species information. In this case, the number of each species information and the number of all species information can be counted.

[0087] S2. The ratio of the number of occurrences of each type of species information in the species information corresponding to each target base sequence to the total number of occurrences of the species information is used as the frequency of occurrence of each type of species information.

[0088] It can be understood that the frequency of occurrence of each species information can be expressed as the ratio of the frequency of occurrence of each species to the frequency of occurrence of all species, that is, the ratio of the number of each species information to the number of all species information.

[0089] The method for analyzing species based on base sequences provided in this embodiment can count the number of each species information and the total number of species information in the base sequence to be analyzed, thereby calculating the frequency of occurrence of each species information in the base sequence to be analyzed for analyzing the species abundance of the base sequence to be analyzed.

[0090] In some embodiments of the present application, considering that the benchmark for successfully comparing the base sequence to be analyzed with the target base sequence may be the number of matching bases in the two base sequences, or the proportion of matching bases in the two base sequences, based on this, the process of determining a number of target base sequences that have been successfully compared in the configured species base sequence library for each base sequence to be analyzed mentioned in the above embodiment is introduced, and the process may include the following two cases:

[0091] The first method is to compare the base sequences in the configured species base sequence library with the base sequence to be analyzed one by one for each base sequence to be analyzed, and take the base sequence with the number of successful base comparisons greater than the preset number of comparisons as the target base sequence.

[0092] Specifically, the preset number of alignments may represent the minimum number of base matches required to determine a successful sequence alignment.

[0093] For example, the base sequence to be analyzed is: AATCGG, the preset number of successful alignments is 4, and a base sequence in the species base sequence library is: ATTCGG, of which 5 bases are successfully aligned with the base sequence to be analyzed, then the base sequence is determined to be the target base sequence.

[0094] Second, for each base sequence to be analyzed, the base sequences in the configured species base sequence library are compared with the base sequence to be analyzed one by one, and the base sequence with a base comparison success rate greater than a preset rate is taken as the target base sequence.

[0095] For example, the base sequence to be analyzed is: AATCGG, the preset ratio is 80%, and a base sequence in the species base sequence library is: ATTCGG, of which 83.3% of the bases are successfully aligned with the base sequence to be analyzed, then the base sequence is determined to be the target base sequence.

[0096] The method for analyzing species based on base sequences provided in this embodiment can control the number of target base sequences that are successfully aligned with the base sequence to be analyzed by pre-setting a benchmark for successful alignment, thereby making the target base sequence more accurate and more similar to the base sequence to be analyzed.

[0097] In some embodiments of the present application, considering that after determining the species affiliation of each base sequence to be analyzed, it is necessary to determine the species affiliation of the gene sequence to be detected that is read for each base sequence to be analyzed, so as to achieve the effect of species analysis of each gene sequence to be detected, based on this, in the above embodiment, after taking the belonging species with the highest probability score as the belonging species of the base sequence to be analyzed, the belonging species with the largest number of occurrences in each base sequence to be analyzed is taken as the belonging species of the gene sequence to be detected.

[0098] In some embodiments of the present application, before reading the gene sequence to be detected to obtain the base sequence to be analyzed mentioned in the above embodiments, it is necessary to pre-construct a species base sequence library for comparison. Specifically, the construction process of the species base sequence library may include:

[0099] S1. Obtain gene sequences of several species from existing gene banks.

[0100] Specifically, the existing gene bank may include the gene sequences of all species currently known to humans, so the gene sequences obtained from the existing gene bank may correspond to the species currently known to humans.

[0101] S2. With the preset length as the read length and a second sliding step length greater than 1, the gene sequence of each species is read to obtain a plurality of base sequences of each species having a length of the read length, and the GPU memory used in the reading process does not exceed the preset memory.

[0102] It can be understood that when the gene sequence is read with a sliding step size greater than 1, the number of base sequences read can be reduced, and the consumption of video memory and memory in the machine is reduced, thereby saving the video memory and memory of the machine.

[0103] Specifically, when the preset length is used as the read length and the second sliding step length is used to read the gene sequence, the video memory used by the machine cannot exceed 90% of the maximum video memory.

[0104] S3. Construct a species base sequence library consisting of base sequences of various species.

[0105] Specifically, all base sequences obtained by reading the gene sequence can be used to form a species base sequence library for comparison with the base sequence to be analyzed.

[0106] The method for analyzing species based on base sequences provided in this embodiment can obtain gene sequences of several species from an existing gene library, and divide multiple base sequences into segments according to a preset read length and a sliding step length that is not 1, and the base sequences obtained from each division constitute a species base sequence library. It can be seen that by limiting the video memory of the machine and controlling the sliding step length, the process of establishing the species base sequence library can save the video memory and internal memory of the machine, and when used as a comparison library, the number of base sequences is reduced, which can reduce the occupied machine resources.

[0107] The above embodiment introduces the construction of a species base sequence library with a step length greater than 1, but a species base sequence library constructed with an excessively long step length may result in low accuracy of the final classification result. In some embodiments of the present application, considering the balance of the machine resources occupied when the base sequence to be analyzed is compared with the species base sequence library, and the accuracy of the final classification result, based on this, it is necessary to configure a species base sequence library with the preset length as the read length and the step length of 1 base, and the species to which each base sequence to be analyzed is obtained as the first classification result, and the classification accuracy of the result is relatively higher, so it is used as a reference classification result for comparison with the classification result obtained based on the preset length as the read length and the step length of the species base sequence library not being 1 base, to optimize the step length required when establishing the species base sequence library, and obtain the final species base sequence library.

[0108] Based on this, combined Figure 2 As shown, in some embodiments of the present application, the method for analyzing species based on base sequence may include the following steps:

[0109] Step S201: Obtain the gene sequence to be detected from an existing microbial gene library.

[0110] Step S202: Based on a preset read length and a first sliding step length, the gene sequence to be detected is read to obtain a plurality of base sequences to be analyzed having a length equal to the read length.

[0111] Step S203: for each base sequence to be analyzed, determine a number of target base sequences that have been successfully aligned in the species base sequence library, and a number of species information corresponding to each target base sequence.

[0112] Step S204: for each species information corresponding to each target base sequence, based on the similarity between the target base sequence and the base sequence to be analyzed, determine the matching score between the species information and the base sequence to be analyzed.

[0113] Step S205: Count the occurrence frequency of each type of species information in the species information corresponding to each target base sequence.

[0114] Step S206: For each base sequence to be analyzed, the occurrence frequency of each species information corresponding to the target base sequence successfully aligned therewith is multiplied by the matching score between the species information and the base sequence to be analyzed to obtain an observation score.

[0115] Step S207: Add the observed score to the matching score between the species information and the base sequence to be analyzed, and use the result as the probability score that the species information belongs to the species to which the base sequence to be analyzed belongs.

[0116] Step S208: taking the species with the highest probability score as the species to which the base sequence to be analyzed belongs, as the second classification result.

[0117] The above steps S201-S208 correspond one-to-one to steps S110-S180 in the above embodiment. Please refer to the above introduction for details and will not be repeated here.

[0118] Step S209, determining whether the difference between the first classification result and the second classification result is greater than a preset difference, if so, executing step S210, if not, executing step S211.

[0119] Specifically, the preset difference degree may represent the similarity between the first classification result and the second classification result.

[0120] When the difference between the first classification result and the second classification result is greater than the preset difference, it may indicate that the accuracy of the second classification result is not high and the species base sequence library based on the result needs to be readjusted, and step S210 is executed.

[0121] When the difference between the first classification result and the second classification result is not greater than the preset difference, it can be indicated that the accuracy of the second classification result reaches the preset standard, and step S211 is executed.

[0122] Step S210: adjust the step length when establishing the species base sequence library to obtain an adjusted species base sequence library, and return to execute step S203.

[0123] It is understandable that the adjusted species base sequence library needs to be different from the species base sequence library on which the reference classification result is based, so the step size of the adjustment is not 1.

[0124] Specifically, after adjusting the step length when establishing the species base sequence library, the process may return to step S203 to compare the base sequence to be analyzed with the adjusted species base sequence library.

[0125] Step S211: Using the adjusted species base sequence library as the final species base sequence library.

[0126] It can be understood that the final species base sequence library balances the machine resources occupied when comparing the base sequence to be analyzed with the species base sequence library, and the accuracy of the final species classification result, so the species base sequence library can be compared with the base sequence to be analyzed.

[0127] The method for analyzing species based on base sequences provided in this embodiment can determine the species base sequence library after the step size is adjusted, and the species base sequence library can be compared with the base sequence to be analyzed. Since the adjusted species base sequence library reduces the storage of base sequences, the occupied machine resources are reduced when the base sequence to be analyzed is compared with the species base sequence library, and the final species classification result is similar to the first classification result, thereby ensuring the accuracy of the final species classification.

[0128] The following is a description of an apparatus for analyzing species based on base sequences provided in an embodiment of the present application. The apparatus for analyzing species based on base sequences described below and the method for analyzing species based on base sequences described above can be referenced to each other.

[0129] See also Figure 3 , Figure 3 This is a schematic diagram of the structure of a device for analyzing species based on base sequences disclosed in an embodiment of the present application.

[0130] like Figure 3 As shown, the device may include:

[0131] The gene sequence acquisition unit 11 is used to acquire the gene sequence to be detected from the existing microbial gene library;

[0132] The base sequence acquisition unit 12 to be analyzed is used to read the gene sequence to be detected based on a preset read length and a first sliding step length to obtain a plurality of base sequences to be analyzed with a length of the read length;

[0133] The base sequence comparison unit 13 is used to determine, for each base sequence to be analyzed, a number of target base sequences that have been successfully compared in a configured species base sequence library, and a number of species information corresponding to each target base sequence, wherein the species base sequence library contains a number of base sequences with a preset read length, and a number of species information corresponding to each base sequence;

[0134] A matching score determination unit 14 is used to determine, for each species information corresponding to each target base sequence, a matching score between the species information and the base sequence to be analyzed based on the similarity between the target base sequence and the base sequence to be analyzed;

[0135] An occurrence frequency statistics unit 15 is used to count the occurrence frequency of each type of species information in the species information corresponding to each target base sequence;

[0136] The belonging species determination unit 16 is used to, for each base sequence to be analyzed, multiply the occurrence frequency of each species information corresponding to the target base sequence that has been successfully matched with it by the matching score between the species information and the base sequence to be analyzed to obtain an observation score, add the observation score to the matching score between the species information and the base sequence to be analyzed, and use the result as the probability score that the species information belongs to the belonging species of the base sequence to be analyzed, and use the belonging species with the highest probability score as the belonging species of the base sequence to be analyzed.

[0137] Optionally, the occurrence frequency counting unit 15 includes:

[0138] The first occurrence frequency counting subunit is used to add the number of species information corresponding to each target base sequence to obtain the total number of species information occurrences, and to count the number of occurrences of each type of species information in the species information corresponding to each target base sequence;

[0139] The second occurrence frequency statistical subunit is used to take the ratio of the number of occurrences of each type of species information in the species information corresponding to each target base sequence to the total number of occurrences of the species information as the occurrence frequency of each type of species information.

[0140] Optionally, the base sequence comparison unit 13 includes:

[0141] The target base sequence determination unit is used to compare the base sequences in the configured species base sequence library with the base sequence to be analyzed one by one for each base sequence to be analyzed, and take the base sequence with the number of successful base comparisons greater than the preset number of comparisons as the target base sequence.

[0142] Optionally, the device further comprises:

[0143] The species determination unit is used to take the species with the largest number of occurrences in each base sequence to be analyzed as the species to which the gene sequence to be detected belongs.

[0144] Optionally, the device further comprises:

[0145] Species gene sequence acquisition unit, used to obtain gene sequences of several species from existing gene banks;

[0146] A base sequence reading unit, configured to read the gene sequence of each species with the preset length as the read length and a preset step length greater than 1 as the second sliding step length, to obtain a plurality of base sequences of each species with the length of the read length, wherein the GPU video memory used in the reading process does not exceed the preset video memory;

[0147] The retrieval sequence library construction unit is used to construct a species base sequence library composed of base sequences of various species.

[0148] Optionally, the configured species base sequence library is obtained from an existing gene library, and the gene sequences of several species are obtained, with the preset length as the read length and the step length as 1 base, and the gene sequence of each species is read to obtain several base sequences of each species with the length of the read length, which are constructed by the base sequences of each species, and the species to which each base sequence to be analyzed belongs is obtained as the first classification result;

[0149] The device also includes:

[0150] A step length adjustment unit is used to adjust the step length when establishing the species base sequence library to obtain the adjusted species base sequence library, wherein the adjusted step length is not 1, and the processing steps of the base sequence comparison unit 13 are returned to be executed until the species to which each base sequence to be analyzed belongs is obtained as the second classification result;

[0151] The difference judgment unit is used to judge whether the difference between the first classification result and the second classification result is greater than a preset difference. If not, the adjusted species base sequence library is used as the final species base sequence library. If so, return to the processing step of executing the step adjustment unit.

[0152] The apparatus for analyzing species based on base sequence provided in the embodiment of the present application can be applied to devices for analyzing species based on base sequence, such as terminals: mobile phones, computers, etc. Optionally, Figure 4 The hardware structure diagram of the base sequence analysis device is shown in FIG. Figure 4 , the hardware structure of the species analysis device based on base sequence may include: at least one processor 1, at least one communication interface 2, at least one memory 3 and at least one communication bus 4;

[0153] In the embodiment of the present application, the number of the processor 1, the communication interface 2, the memory 3, and the communication bus 4 is at least one, and the processor 1, the communication interface 2, and the memory 3 communicate with each other through the communication bus 4;

[0154] The processor 1 may be a central processing unit CPU, or an application-specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present invention, etc.;

[0155] The memory 3 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory;

[0156] The memory stores a program, and the processor can call the program stored in the memory, wherein the program is used to:

[0157] Obtain the gene sequence to be tested from the existing microbial gene library;

[0158] Based on a preset read length and a first sliding step length, the gene sequence to be detected is read to obtain a plurality of base sequences to be analyzed having a length equal to the read length;

[0159] For each base sequence to be analyzed, determine a number of target base sequences that are successfully aligned in a configured species base sequence library, and a number of species information corresponding to each target base sequence, wherein the species base sequence library contains a number of base sequences with a preset read length, and a number of species information corresponding to each base sequence;

[0160] For each species information corresponding to each target base sequence, based on the similarity between the target base sequence and the base sequence to be analyzed, determining a matching score between the species information and the base sequence to be analyzed;

[0161] Count the occurrence frequency of each type of species information in the species information corresponding to each target base sequence;

[0162] For each base sequence to be analyzed, the occurrence frequency of each species information corresponding to the target base sequence that is successfully aligned with it is multiplied by the matching score between the species information and the base sequence to be analyzed to obtain an observation score, and the observation score is added to the matching score between the species information and the base sequence to be analyzed, and the result is used as the probability score that the species information belongs to the species to which the base sequence to be analyzed belongs, and the species with the highest probability score is used as the species to which the base sequence to be analyzed belongs.

[0163] Optionally, the detailed functions and extended functions of the program may refer to the above description.

[0164] The embodiment of the present application further provides a storage medium, which may store a program suitable for execution by a processor, wherein the program is used to:

[0165] Obtain the gene sequence to be tested from the existing microbial gene library;

[0166] Based on a preset read length and a first sliding step length, the gene sequence to be detected is read to obtain a plurality of base sequences to be analyzed having a length equal to the read length;

[0167] For each base sequence to be analyzed, determine a number of target base sequences that are successfully aligned in a configured species base sequence library, and a number of species information corresponding to each target base sequence, wherein the species base sequence library contains a number of base sequences with a preset read length, and a number of species information corresponding to each base sequence;

[0168] For each species information corresponding to each target base sequence, based on the similarity between the target base sequence and the base sequence to be analyzed, determining a matching score between the species information and the base sequence to be analyzed;

[0169] Count the occurrence frequency of each type of species information in the species information corresponding to each target base sequence;

[0170] For each base sequence to be analyzed, the occurrence frequency of each species information corresponding to the target base sequence that is successfully aligned with it is multiplied by the matching score between the species information and the base sequence to be analyzed to obtain an observation score, and the observation score is added to the matching score between the species information and the base sequence to be analyzed, and the result is used as the probability score that the species information belongs to the species to which the base sequence to be analyzed belongs, and the species with the highest probability score is used as the species to which the base sequence to be analyzed belongs.

[0171] Optionally, the detailed functions and extended functions of the program may refer to the above description.

[0172] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0173] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can refer to each other.

[0174] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for analyzing species based on base sequences, characterized in that: include: Obtain the gene sequence to be tested from the existing microbial gene library; Based on a preset read length and a first sliding step length, the gene sequence to be detected is read to obtain a plurality of base sequences to be analyzed having a length equal to the read length; For each base sequence to be analyzed, determine a number of target base sequences that are successfully aligned in a configured species base sequence library, and a number of species information corresponding to each target base sequence, wherein the species base sequence library contains a number of base sequences with a preset read length, and a number of species information corresponding to each base sequence; For each species information corresponding to each target base sequence, based on the similarity between the target base sequence and the base sequence to be analyzed, determining a matching score between the species information and the base sequence to be analyzed; Count the occurrence frequency of each type of species information in the species information corresponding to each target base sequence; For each base sequence to be analyzed, the occurrence frequency of each species information corresponding to the target base sequence that is successfully aligned with it is multiplied by the matching score between the species information and the base sequence to be analyzed to obtain an observation score, and the observation score is added to the matching score between the species information and the base sequence to be analyzed, and the result is used as the probability score that the species information belongs to the species to which the base sequence to be analyzed belongs, and the species with the highest probability score is used as the species to which the base sequence to be analyzed belongs.

2. The method according to claim 1, characterized in that The counting of the occurrence frequency of each type of species information in the species information corresponding to each target base sequence includes: Add the number of species information corresponding to each target base sequence to obtain the total number of species information occurrences, and count the number of occurrences of each type of species information in the species information corresponding to each target base sequence; The ratio of the number of occurrences of each type of species information in the species information corresponding to each target base sequence to the total number of occurrences of the species information is taken as the frequency of occurrence of each type of species information.

3. The method according to claim 1, characterized in that For each base sequence to be analyzed, determining a number of target base sequences that have been successfully aligned in the configured species base sequence library includes: For each base sequence to be analyzed, the base sequences in the configured species base sequence library are compared with the base sequence to be analyzed one by one, and the base sequence with the number of successful base comparisons greater than the preset number of comparisons is taken as the target base sequence.

4. The method according to claim 1, characterized in that: After taking the species with the highest probability score as the species to which the base sequence to be analyzed belongs, the method further includes: The species with the largest number of occurrences in each base sequence to be analyzed is taken as the species to which the gene sequence to be detected belongs.

5. The method according to claim 1, characterized in that The process of constructing the species base sequence library includes: Obtain gene sequences of several species from existing gene banks; Taking the preset length as the read length and the preset step length being greater than a second sliding step length of 1, the gene sequence of each species is read to obtain a plurality of base sequences of each species having a length of the read length, wherein the GPU memory used in the reading process does not exceed the preset memory; A species base sequence library consisting of base sequences of each species is constructed.

6. The method according to claim 1, characterized in that The configured species base sequence library is obtained from an existing gene library by obtaining gene sequences of several species, taking the preset length as the read length and the step length as 1 base, reading the gene sequence of each species, and obtaining several base sequences of each species with a length of the read length, which are constructed from the base sequences of each species, and the species to which each base sequence to be analyzed is obtained as the first classification result; The method further includes: Adjusting the step length when establishing the species base sequence library to obtain an adjusted species base sequence library, wherein the adjusted step length is not 1; Return to executing the step of determining, for each base sequence to be analyzed, a number of target base sequences that have been successfully aligned in the configured species base sequence library, and a number of species information corresponding to each target base sequence, until the species to which each base sequence to be analyzed belongs is obtained as the second classification result; Determine whether the difference between the first classification result and the second classification result is greater than a preset difference; If not, the adjusted species base sequence library is used as the final species base sequence library; If so, return to the step of adjusting the step length when establishing the species base sequence library to obtain the adjusted species base sequence library.

7. A device for analyzing species based on base sequences, characterized in that: include: A gene sequence acquisition unit to be tested, used to obtain the gene sequence to be tested from an existing microbial gene library; A base sequence acquisition unit to be analyzed, used for reading the gene sequence to be detected based on a preset read length and a first sliding step length, and obtaining a plurality of base sequences to be analyzed with a length of the read length; A base sequence comparison unit, for each base sequence to be analyzed, determines a number of target base sequences that have been successfully compared in a configured species base sequence library, and a number of species information corresponding to each target base sequence, wherein the species base sequence library contains a number of base sequences with a preset read length, and a number of species information corresponding to each base sequence; a matching score determining unit, configured to determine, for each species information corresponding to each target base sequence, a matching score between the species information and the base sequence to be analyzed based on the similarity between the target base sequence and the base sequence to be analyzed; An occurrence frequency statistics unit is used to count the occurrence frequency of each type of species information in the species information corresponding to each target base sequence; The belonging species determination unit is used to, for each base sequence to be analyzed, multiply the occurrence frequency of each species information corresponding to the target base sequence that has been successfully aligned with it by the matching score between the species information and the base sequence to be analyzed to obtain an observation score, add the observation score to the matching score between the species information and the base sequence to be analyzed, and use the result as the probability score that the species information belongs to the belonging species of the base sequence to be analyzed, and use the belonging species with the highest probability score as the belonging species of the base sequence to be analyzed.

8. The device according to claim 7, characterized in that The occurrence frequency statistics unit includes: The first occurrence frequency counting subunit is used to add the number of species information corresponding to each target base sequence to obtain the total number of species information occurrences, and to count the number of occurrences of each type of species information in the species information corresponding to each target base sequence; The second occurrence frequency statistical subunit is used to take the ratio of the number of occurrences of each type of species information in the species information corresponding to each target base sequence to the total number of occurrences of the species information as the occurrence frequency of each type of species information.

9. The device according to claim 7, characterized in that The base sequence comparison unit comprises: The target base sequence determination unit is used to compare the base sequences in the configured species base sequence library with the base sequence to be analyzed one by one for each base sequence to be analyzed, and take the base sequence with the number of successful base comparisons greater than the preset number of comparisons as the target base sequence.

10. The device according to claim 7, characterized in that Also includes: The species determination unit is used to take the species with the largest number of occurrences in each base sequence to be analyzed as the species to which the gene sequence to be detected belongs.

Citation Information

Patent Citations

  • Pathogenic microorganism analysis and identification system and application thereof

    CN111462821A