Biomolecule sequence search method, device, equipment and storage medium
The biomolecule sequence is encoded into vector representation through the sequence coding model, and similarity search is carried out in the low-dimensional vector space, which solves the problems of low efficiency and insufficient accuracy of the biomolecule sequence homology search in the prior art, and realizes efficient and accurate homologous sequence screening.
Patent Information
- Application Number
- CN202411721651.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-11-28
AI Technical Summary
The prior art is low in efficiency and insufficient accuracy in searching for biomolecular sequence homology, making it difficult to process large-scale biological sequence data.
Unknown biomolecule sequences are encoded into vector representations through the sequence encoding model, and a rapid similarity search is performed on the biomolecule sequence vector database in the low-dimensional vector space to screen out homologous biomolecule sequences.
The accuracy and efficiency of homologous biomolecule sequence search is improved, and the homologous sequences of unknown biomolecule sequences can be efficiently screened out from multiple known biomolecule sequences.
Smart Images

Figure CN119229970B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing technology, and more specifically, to a biomolecule sequence search method, device, equipment and storage medium. Background Art
[0002] Homology Search is a bioinformatics method that compares the sequences of biological molecules such as deoxyribonucleic acid (DNA), ribonucleic acid (RNA) or proteins to find known sequences that are similar to new sequences, so as to further infer the function, structure or potential biological role of the new sequence. The core concept "homology" refers to sequences inherited from common ancestors in different species, and therefore have similar structures or functions.
[0003] Homology search is widely used in gene function annotation, evolutionary biology and drug development. For example, it is used to predict the function of new genes or proteins and to find protein family members with potential drug targets. It is an indispensable tool in modern biological research. Traditional homology sequence search tools are not competent for a large number of current search tasks. Inspired by artificial intelligence technology, researchers have gradually introduced deep learning methods into homology sequence search.
[0004] The search for homologous biological molecule sequences can include search methods based on structural letters and transfer learning. Currently, methods based on deep learning can directly realize end-to-end search for homologous biological molecule sequences. This end-to-end method requires the use of large-scale biological sequence data sets during training to learn the implicit patterns in the sequence. However, these methods have low efficiency and poor accuracy in searching for homologous biological sequences. Summary of the invention
[0005] The embodiments of the present disclosure provide a method, device, equipment and storage medium for searching biological molecule sequences, which can improve the accuracy of searching homologous biological sequences and the search efficiency.
[0006] According to one aspect of the present disclosure, a biomolecule sequence search method is provided, which includes: obtaining an unknown biomolecule sequence; inputting the unknown biomolecule sequence into a sequence encoding model for sequence encoding to obtain an unknown biomolecule sequence representation; using the unknown biomolecule sequence representation, performing similarity searches on different candidate vector sets in a biomolecule sequence vector database, wherein each candidate vector in the candidate vector set corresponds to a candidate biomolecule sequence with the same sequence length; searching for a preset number of known biomolecule sequence representations from each candidate vector set based on similarity search results; and screening out homologous biomolecule sequences corresponding to the unknown biomolecule sequence from known biomolecule sequences corresponding to multiple known biomolecule sequence representations.
[0007] According to another aspect of the present disclosure, a biomolecule sequence search device is provided, which includes: a sequence acquisition module for acquiring an unknown biomolecule sequence; a sequence encoding module for inputting the unknown biomolecule sequence into a sequence encoding model for sequence encoding to obtain an unknown biomolecule sequence representation; a sequence search module for performing similarity searches on different candidate vector sets in a biomolecule sequence vector database using the unknown biomolecule sequence representation, wherein the candidate biomolecule sequences corresponding to each candidate vector in the candidate vector set have the same sequence length; a representation search module for searching for a preset number of known biomolecule sequence representations from each candidate vector set based on similarity search results; and a homology determination module for screening out homologous biomolecule sequences corresponding to the unknown biomolecule sequence from known biomolecule sequences corresponding to multiple known biomolecule sequence representations.
[0008] Optionally, the homology determination module may include a reordering submodule and a sequence screening submodule. The reordering submodule is used to reorder the known biomolecule sequences corresponding to the plurality of known biomolecule sequence representations to obtain a target biomolecule sequence sequence; and the sequence screening submodule is used to screen out a homologous biomolecule sequence corresponding to the unknown biomolecule sequence from the target biomolecule sequence sequence.
[0009] Optionally, the reordering submodule may include a sequence combination unit, a score prediction unit, and a reordering unit. The sequence combination unit is used to represent each known biomolecule sequence as a corresponding known biomolecule sequence, and respectively form a corresponding biomolecule sequence pair with the unknown biomolecule sequence; the score prediction unit is used to input the biomolecule sequence pair into a sequence scoring model for sequence relationship score prediction for each biomolecule sequence pair, and obtain a sequence relationship score corresponding to each biomolecule sequence pair; the reordering unit is used to reorder the sequences of the known biomolecule sequences according to each sequence relationship score, and obtain a target biomolecule sequence order.
[0010] Optionally, the sequence scoring model includes a feature extraction network and a relationship scoring network, and the score prediction unit includes a first subunit, a second subunit, and a third subunit. The first subunit is used to input the known biomolecule sequence and the unknown biomolecule sequence in the biomolecule sequence pair into the feature extraction network for feature extraction, respectively, to obtain a first molecular sequence representation corresponding to the known biomolecule sequence and a second molecular sequence representation corresponding to the unknown biomolecule sequence; the second subunit is used to calculate the absolute value of the difference between the first molecular sequence representation and the second molecular sequence representation to obtain a molecular sequence representation pair difference; the third subunit is used to input the molecular sequence representation pair difference into the relationship scoring network for sequence relationship score prediction, to obtain a sequence relationship score of the biomolecule sequence pair.
[0011] Optionally, the third subunit can be specifically used to: input the difference of the molecular sequence representation pair into the relationship scoring network, and predict the category prediction probability of the biological molecule sequence pair under each preset sequence relationship category according to the difference of the molecular sequence representation pair; normalize each category prediction probability to obtain the normalized prediction probability corresponding to each preset sequence relationship category; and determine the maximum normalized prediction probability as the sequence relationship score of the biological molecule sequence pair according to each normalized prediction probability.
[0012] Optionally, the reordering unit can be specifically used to: for each biomolecule sequence pair, perform a universal sequence similarity score prediction on the biomolecule sequence pair to obtain the universal sequence similarity score of each biomolecule sequence pair; perform a weighted calculation on the sequence relationship score and the universal sequence similarity score of each biomolecule sequence pair to obtain a corresponding sequence weighted score; and perform sequence reordering on the known biomolecule sequences in each biomolecule sequence pair according to the sequence weighted score of each biomolecule sequence pair to obtain a target biomolecule sequence order.
[0013] Optionally, the sequence screening submodule can be specifically used to: select multiple target biomolecule sequences from the target biomolecule sequence ranking in descending order of sequence weighted scores; and use the multiple target biomolecule sequences as homologous biomolecule sequences corresponding to the unknown biomolecule sequence.
[0014] Optionally, the biomolecule sequence search device may further include a sample acquisition module, a relationship prediction module, an error calculation module, and a model training module. The sample acquisition module is used to acquire a first sample biomolecule sequence and a second sample biomolecule sequence, as well as a sample sequence relationship category corresponding to the first sample biomolecule sequence and the second sample biomolecule sequence; the relationship prediction module is used to input the first sample biomolecule sequence and the second sample biomolecule sequence into a preset scoring model for sequence relationship prediction, respectively, to obtain a predicted sequence relationship category; the error calculation module is used to perform error calculation based on the predicted sequence relationship category and the sample sequence relationship category to obtain a target loss; the model training module is used to iteratively train the preset scoring model through the target loss until the training end condition is met to obtain a sequence scoring model.
[0015] Optionally, the reordering submodule can be specifically used to: obtain the sequence similarity corresponding to each known biomolecule sequence representation based on the similarity search results; sort the known biomolecule sequences corresponding to each known biomolecule sequence representation according to each sequence similarity to obtain the target biomolecule sequence sorting; the sequence screening submodule can be specifically used to select multiple known biomolecule sequences from the target biomolecule sequence sorting in descending order of sequence similarity; and determine the multiple known biomolecule sequences as homologous biomolecule sequences corresponding to the unknown biomolecule sequence.
[0016] Optionally, the sequence search module can be specifically used to: for different candidate vector sets in the biological molecule sequence vector database, perform similarity calculation on the unknown biological molecule sequence representation in parallel with each candidate vector in the candidate vector set to obtain the sequence similarity corresponding to each candidate vector in the different candidate vector sets; the representation search module can be specifically used to sort the candidate vectors in each candidate vector set in descending order of similarity according to the sequence similarity corresponding to each candidate vector in the different candidate vector sets to obtain the similar sequence sorting corresponding to each candidate vector set; according to the descending order of the similar sequence sorting, select a preset number of target candidate vectors from each candidate vector set in turn as the known biological molecule sequence representation.
[0017] Optionally, the sequence encoding model includes a protein encoder, a nucleotide encoder and a pooling layer, and the sequence encoding module can be specifically used for: when it is detected that the biological molecule category of the unknown biological molecule sequence is a protein molecule, the unknown biological molecule sequence is input into the protein encoder for sequence encoding to obtain a protein sequence feature, and the protein sequence feature is input into the pooling layer for pooling operation to obtain a representation of the unknown biological molecule sequence whose biological molecule category is a protein molecule; when it is detected that the biological molecule category of the unknown biological molecule sequence is a nucleotide molecule, the unknown biological molecule sequence is input into the nucleotide encoder for sequence encoding to obtain a nucleotide sequence feature, and the nucleotide sequence feature is input into the pooling layer for pooling operation to obtain a representation of the unknown biological molecule sequence whose biological molecule category is a nucleotide molecule.
[0018] Optionally, the biomolecule sequence search device may further include a label acquisition module and a vector filtering module. The label acquisition module is used to obtain a sequence label corresponding to the unknown biomolecule sequence; the vector filtering module is used to perform vector filtering on each vector data segment in the biomolecule sequence vector database through the sequence label to obtain a candidate vector set corresponding to each vector data segment.
[0019] Optionally, the vector filtering module can be specifically used to: obtain each vector data segment in the biological molecule sequence vector database; for each vector data segment, match the sequence tag with the vector tag corresponding to each sequence vector in the vector data segment, determine the sequence vector whose vector tag in the vector data segment matches the sequence tag as a candidate vector, and store the candidate vector in the candidate vector set corresponding to the vector data segment.
[0020] Optionally, the biomolecule sequence search device may also include a molecular sequence acquisition module, a molecular sequence encoding module, a vector label determination module, a sequence representation storage module and a vector label storage module. The molecular sequence acquisition module is used to acquire the biomolecule sequence to be stored; the molecular sequence encoding module is used to input the biomolecule sequence to be stored into a sequence encoding model to obtain the biomolecule sequence representation; the vector label determination module is used to acquire the biomolecule sequence metadata corresponding to the biomolecule sequence to be stored, and determine the vector label corresponding to the biomolecule sequence representation according to the biomolecule sequence metadata; the sequence representation storage module is used to store the biomolecule sequence representation into the corresponding vector data segment in the biomolecule sequence vector database according to the sequence length of the biomolecule sequence to be stored, and the sequence length of the biomolecule sequence corresponding to each vector in the vector data segment is the same as the sequence length of the biomolecule sequence to be stored; the vector label storage module is used to store the vector label into the biomolecule sequence vector database.
[0021] According to another aspect of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the above-mentioned biomolecule sequence search method is executed.
[0022] According to another aspect of the present disclosure, a computer device is provided. The computer device includes a processor and a memory. The memory stores a computer program. When the computer program is called by the processor, the computer program executes the above-mentioned biomolecule sequence search method.
[0023] According to another aspect of the present disclosure, a computer program product is provided, which includes a computer program or computer instructions, which are stored in a storage medium; a processor of a computer device reads the computer program or computer instructions from the storage medium, and the processor executes the computer program or computer instructions, so that the computer device executes the above-mentioned biomolecule sequence search method.
[0024] The disclosed embodiment can encode the acquired unknown biomolecule sequence into an unknown biomolecule sequence representation through a sequence encoding model, and then through the unknown biomolecule sequence representation, in a low-dimensional vector space, it can perform a fast similarity search on different candidate vector sets in a biomolecule sequence vector database, and then efficiently search for a preset number of known biomolecule sequence representations from each candidate vector set according to the similarity search results. In the vector database, the sequence lengths of the candidate biomolecule sequences corresponding to each candidate vector in the same candidate vector set are the same, and the sequence lengths of the candidate molecular sequences corresponding to the candidate vectors in different candidate vector sets are different. Therefore, when searching for similarity, by performing a similarity search on the candidate vectors corresponding to the biomolecule sequences of the same sequence length, it is possible to avoid the candidate vectors with high local similarity in the candidate vector set but low global similarity in the entire biomolecule sequence vector database from being mistakenly selected as the known biomolecule sequence representation similar to the unknown biomolecule sequence representation, thereby improving the accuracy of the known biomolecule sequence representation obtained by the similarity search. Compared with the method of only performing a similarity search on the biomolecule sequence in the related art, the disclosed invention can also screen out homologous biomolecule sequences corresponding to the unknown biomolecule sequence on the basis of the known biomolecule sequences corresponding to the multiple known biomolecule sequence representations. In this way, multiple known biomolecule sequences are obtained through rapid similarity search, and multiple known biomolecule sequences with higher accuracy are further screened to screen out high-quality homologous biomolecule sequences, thereby improving the accuracy of the search for homologous biomolecule sequences while also improving the efficiency of the search for homologous biomolecule sequences.
[0025] Other features and advantages of the present disclosure will be described in the following description, and partly become apparent from the description, or understood by practicing the present disclosure. The purpose and other advantages of the present disclosure can be realized and obtained by the structures particularly pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0027] Figure 1 A schematic diagram of a system architecture provided by an embodiment of the present disclosure is shown.
[0028] Figure 2 A schematic diagram of system deployment provided by an embodiment of the present disclosure is shown.
[0029] Figure 3 A diagram showing an application scenario of a biomolecule sequence search method provided by an embodiment of the present disclosure.
[0030] Figure 4 A diagram showing an application scenario of another biomolecule sequence search method provided by an embodiment of the present disclosure.
[0031] Figure 5 A schematic flow chart of a biomolecule sequence search method provided by an embodiment of the present disclosure is shown.
[0032] Figure 6 A model architecture diagram of a sequence coding model provided by an embodiment of the present disclosure is shown.
[0033] Figure 7 A schematic diagram of storage of a biological molecule sequence representation provided by an embodiment of the present disclosure is shown.
[0034] Figure 8 A search schematic diagram of a biomolecule sequence similarity search provided by an embodiment of the present disclosure is shown.
[0035] Fig. 9 A model schematic diagram of a sequence scoring model provided by an embodiment of the present disclosure is shown.
[0036] Fig.10 A flowchart of a method for training a sequence scoring model provided in an embodiment of the present disclosure is shown.
[0037] Fig.11A schematic flow chart of another biomolecule sequence search method provided by an embodiment of the present disclosure is shown.
[0038] Fig.12 A homology search flow chart of a biological molecule sequence provided by an embodiment of the present disclosure is shown.
[0039] Fig.13 A comparison chart of the accuracy of a homologous protein search provided by an embodiment of the present disclosure is shown.
[0040] Fig.14 A comparison diagram of search speeds for homologous protein searches provided by an embodiment of the present disclosure is shown.
[0041] Fig.15 An AUROC curve of a homologous protein search provided by an embodiment of the present disclosure is shown.
[0042] Fig.16 An AUROC curve of a homologous nucleotide search provided by an embodiment of the present disclosure is shown.
[0043] Fig.17 A comparison chart of the accuracy of homologous nucleotide searches provided by an embodiment of the present disclosure is shown.
[0044] Fig.18 A comparison diagram of search speeds for homologous nucleotide searches provided by an embodiment of the present disclosure is shown.
[0045] Fig.19 A comparison diagram of search time for a nucleotide sequence provided by an embodiment of the present disclosure is shown.
[0046] Fig. 20 A comparison diagram of the search speed of a nucleotide sequence provided by an embodiment of the present disclosure is shown.
[0047] Fig.21 It is a module block diagram of a biological molecule sequence search device provided by an embodiment of the present disclosure.
[0048] Fig. 22 It is a module block diagram of a computer device provided by an embodiment of the present disclosure.
[0049] Fig.23 It is a module block diagram of a computer-readable storage medium provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0050] In order to enable those skilled in the art to better understand the solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The implementation methods described with reference to the drawings are exemplary and are only used to explain the present disclosure, and cannot be understood as limitations on the present disclosure. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present disclosure.
[0051] In some processes described in the specification, claims and the above drawings, multiple steps appearing in a specific order are included, but it should be clearly understood that these steps may not be executed in the order in which they appear in this document or may be executed in parallel. The step numbers are only used to distinguish different steps, and the numbers themselves do not represent any execution order. In addition, the descriptions such as "first", "second" or "target" in this document are used to distinguish similar objects, and are not necessarily used to describe a specific order, sequence or quantity.
[0052] It is worth noting that in the specific embodiments of the present disclosure, related data such as biological molecule sequences are involved. When the above embodiments of the present disclosure are applied to specific products or technologies, it is necessary to obtain the permission or consent of the object, and the collection, use and processing of the relevant data must comply with relevant laws, regulations and standards. For example, when the embodiments of the present disclosure need to obtain biological molecule sequences, a separate license or separate consent for the biological molecule sequence can be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining a separate license or separate consent, the necessary related data for the normal operation of the embodiments of the present disclosure can be obtained.
[0053] Homology search is a method of identifying similarities between biological molecule sequences (such as DNA, RNA or protein sequences) by comparing them. The purpose is to infer the function of the sequence: for example, by comparing with known functional sequences, predicting the function of unknown sequences; analyzing evolutionary relationships: determining the conserved regions of the sequence or inferring common ancestors, etc. It is usually necessary to compare the target sequence with the reference sequence in the database, and screen potential homologous sequences by calculating the similarity (such as score or e-value), and then interpret the comparison results biologically. Classic homology search tools include Basic Local Alignment Search Tool (BLAST), Fast All (FASTA) and Cluster Alignment (Clustal).
[0054] With the rapid development of biological database technology, the demand for homology search has gradually increased. Homology search has a wide range of applications in disease research, drug design, and genome annotation. By analyzing the similarity between new sequences and known sequences, protein functions can be predicted and pathogen mutations can be identified. In recent years, with the advancement of high-throughput sequencing technology, the accumulation of genome-scale data has made homology search more challenging. In order to process massive data, researchers use language models based on deep learning methods to encode biological sequences to predict the structural similarity scores between biological sequence pairs.
[0055] For example, the technology uses deep learning to detect protein homology and compare structures. It uses the pre-trained protein language model ProtTrans (ProtT5-XL-UniRef50) to obtain the embedding vector of the protein sequence, and trains a twin neural network model based on the Class, Architecture, Topology, and Homology (CATH) classification dataset or the homology modeling database (SWISS-MODEL). The embedding vector is mapped to a vector with 512 components, and then the template modeling score (TM-Score) between the structures corresponding to the two protein sequences is fitted by calculating the dot product between the vectorized sequences. However, the technology still faces some defects, including low computational efficiency when processing very large databases, and it is difficult to accurately capture the similarity of biological sequences.
[0056] In summary, the efficiency and accuracy of the related technology in homology search for biological sequences are low. To solve the above problems, the inventors have proposed the biological molecule sequence search method disclosed in the present invention after research. The system implementation environment and related application scenarios of the above method involved in the present invention are first described below.
[0057] See also Figure 1 , Figure 1 A schematic diagram of a system architecture is shown. The biomolecule sequence search method provided in the embodiment of the present disclosure can be applied in the system 100. The data acquisition device 110 is used to acquire biomolecule sequences. For example, the data acquisition device 110 can acquire a large number of protein sequences from a protein database and a large number of nucleotide sequences from a nucleotide database. Furthermore, the data acquisition device 110 can store the nucleotide sequences and protein sequences as training data in the database 120 for use in model training.
[0058] Optionally, the training data maintained in the database 120 does not necessarily come from the data acquisition device 110, but can also be received from other devices. For example, the execution device 140 can also store the biomolecule sequence obtained from the biomolecule sequence database open on the Internet into the database 120. The above description should not be used as a limitation on the embodiments of the present disclosure. The training device 130 can train the preset scoring model based on the training data in the database 120 until the preset scoring model meets the training end condition, and obtain the trained sequence scoring model, that is, the target model 101.
[0059] Among them, the training end conditions may include: the total loss value of the target loss is less than a preset value, the total loss value of the target loss is within a threshold range, or the number of training times reaches a preset number of times, etc. The target model 101 can be a deep neural network composed of one or more neural networks. Exemplarily, the target model 101 can be a sequence scoring model composed of a pre-trained language model and a multilayer perceptron (MLP). The network structure of the target model 101 is not limited here.
[0060] The execution device 140 can deploy the target model 101 trained by the training device 130. When the processing module 141 of the execution device 140 performs calculations and other related processing, the execution device 140 can call the data, programs, etc. in the data storage system 142 for the corresponding calculation processing, and store the data and instructions such as the processing results obtained by the calculation processing in the data storage system 142. For example, when the execution device 140 receives the unknown biomolecule sequence sent by the user device 150, it can call the processing module 141 to run the target model 101 to search for homologous biomolecule sequences, and return the search results to the user device 150. Data transmission can be performed between the execution device 140 and the user device 150 through the input / output (I / O) interface.
[0061] The training device 130, the execution device 140 and the user device 150 can be computer devices such as servers or terminals. The server can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), blockchains, and big data and artificial intelligence platforms. The terminal can be a laptop, a tablet computer, a desktop computer, etc.
[0062] It should be noted that Figure 1It is only a schematic diagram of a system architecture provided by an embodiment of the present disclosure. The system architecture and application scenarios described in the embodiment of the present disclosure are intended to more clearly illustrate the technical solution of the embodiment of the present disclosure, and do not constitute a limitation on the technical solution provided by the embodiment of the present disclosure. Figure 1 The execution device 140 is used to deploy the target model 101 trained by the training device 130 so as to search for homologous biological molecule sequences for unknown biological molecule sequences sent by the user device 150. In other cases, the user device 150 can also directly deploy the target model 101 trained by the training device 130 to search for homologous biological molecule sequences locally.
[0063] See also Figure 2 , Figure 2 Schematic diagram of a system deployment is shown. For example, the biomolecule sequence search method provided by the embodiment of the present disclosure can also be deployed in Figure 2 In the C / S (Client / Server) architecture system shown in FIG. , the system may include a server, a gateway, the Internet, and devices.
[0064] A server is a computer system that can provide certain services to the server side. Compared with ordinary computer equipment, servers have higher requirements in terms of stability, security, and performance. Figure 2 As shown, the server 210 can be a high-performance computer in a network platform, a cluster of multiple high-performance computers, a portion of a high-performance computer (eg, a virtual machine), or a combination of portions of multiple high-performance computers (eg, virtual machines).
[0065] A gateway is also called an internetwork connector or a protocol converter. Figure 2 As shown, gateway 220 realizes network interconnection at the transport layer through Internet 230, and is a computer system or device that acts as a conversion. The gateway is a translator between two systems that use different communication protocols, data formats or languages, or even completely different architectures. At the same time, the gateway can also provide filtering and security functions.
[0066] A device can send a request to a server to access or use resources, data or services on the server. The device usually provides an interface for users to interact with the system, and the device generates a request in response to the user's interactive operation on the interface. Figure 2 As shown, the device may include a tablet computer 240a, a laptop computer 240b, and a desktop computer 240c, and may also include various forms such as a personal digital assistant (PDA). In addition, it may be a single device or a collection of multiple devices.
[0067] Devices can communicate with servers in wired or wireless ways to exchange data. Figure 2 As shown, the tablet computer 240a can communicate with the Internet 230 through the wireless router 250, and the message sent by the desktop computer 240c to the server 210 through the Internet 230 can be transmitted to the corresponding server 210 through the gateway 220. The message sent by the server 210 to the laptop computer 240b through the gateway 220 can also be transmitted to the laptop computer 240b through the Internet 230.
[0068] As an implementation mode, the biomolecule sequence search method disclosed in the present invention can be implemented in part on the server and in part on the device. For example, the server is deployed with a trained sequence scoring model and a pre-trained sequence encoding model. When the device sends the unknown biomolecule sequence input by the user to the server, the server can input the unknown biomolecule sequence into the sequence encoding model for sequence encoding to obtain the unknown biomolecule sequence representation, and through the unknown biomolecule sequence representation, respectively perform similarity search on different candidate vector sets in the biomolecule sequence vector database, and then search for a preset number of known biomolecule sequence representations from each candidate vector set based on the similarity search results, and screen out homologous biomolecule sequences corresponding to the unknown biomolecule sequence from the known biomolecule sequences corresponding to the multiple known biomolecule sequence representations. Furthermore, the server can return the homologous biomolecule sequence to the device, and then the device can display the homologous biomolecule sequence to the user.
[0069] It should be noted that Figure 2 This is only a schematic diagram of a system deployment provided by the embodiment of the present disclosure. The system deployment scheme described in the embodiment of the present disclosure is only for the purpose of more clearly illustrating the technical solution of the embodiment of the present disclosure, and does not constitute a limitation on the technical solution provided by the embodiment of the present disclosure. For example, a device may generally refer to one of multiple devices. This embodiment only refers to Figure 2 The three devices (tablet computer 240a, laptop computer 240b and desktop computer 240c) shown in the figure are used as examples. A person skilled in the art will appreciate that, with the evolution of system deployment solutions, the technical solutions provided in the embodiments of the present invention are also applicable to similar technical problems.
[0070] The embodiments of the present disclosure can be applied in various scenarios, such as Figure 3 The pathogen detection scenario shown and Figure 4 The drug development scenario shown, etc.
[0071] (1) Pathogen detection scenarios
[0072] Pathogen species detection is an important step in identifying and finding the source and transmission path of pathogenic microorganisms (such as viruses, bacteria, and fungi) that cause infectious diseases. Researchers can extract pathogen nucleotides from the collected samples, and then use the biomolecule sequence search method disclosed in the present invention to perform homology detection on the pathogen nucleotide sequence to determine its pathogen species. In some embodiments, based on the biomolecule sequence search method disclosed in the present invention, a homology sequence search system that can be used to search for homologous sequences of pathogen nucleotides can be developed. Figure 3 As shown, the homologous sequence search system may include a server 311 deployed on a cloud server 310 and a client 321 deployed on a desktop computer 320. The server 311 is mainly responsible for performing complex calculations or logical processing, processing, analyzing or calculating the data requested by the client 321, for example, performing a homologous sequence search based on the unknown biological molecule sequence to be searched sent by the client 321. The client 321 is mainly responsible for providing an interactive interface, sending requests to the server 311 according to the user's operation on the interactive interface, and presenting data.
[0073] like Figure 3 As shown, the researcher edits or pastes the sequence to be searched in the edit bar 3211 on the interface of the client 321, or clicks button 3213 to upload the sequence to be searched in batches. At the same time, optionally, the database to be searched can also be selected in the drop-down menu 3214, which is usually the default biological molecule sequence vector database disclosed in the present invention. After completing the input of the sequence to be searched and the selection of the database, the researcher can click button 3215 to start the homologous sequence search. Further, the client 321 generates a search request in response to the click operation on button 3215, and sends the search request to the server 311 of the cloud server 310. When the server 311 receives the search request, the homologous sequence search can be performed on the sequence to be searched to obtain the search result. Further, the cloud server 310 returns the search result to the client 321 of the desktop computer 320, and the client 321 displays the search result in the display box 3212 on the interface. The researcher can also click button 3216 to download the search result, thereby determining the type of the pathogen according to the homologous nucleotide sequence in the search result.
[0074] (2) Drug development scenario
[0075] Drug development based on homologous protein search compares the sequence and structural similarities between the target protein and the homologous protein to discover their functional relevance, and then screens and designs targeted inhibitors, thereby effectively locking in therapeutic targets and accelerating drug development. For example, in the development of anti-tumor drugs, homologous protein search can help identify and verify potential drug targets. To this end, after the researchers collect the key protein sequence of the key protein A in cancer cells, they can upload the key protein sequence to the homologous sequence search system for homologous protein sequence search, which can be developed based on the biomolecule sequence search method disclosed in the present invention.
[0076] like Figure 4 The anti-tumor drug development scenario shown. Through tissue sampling, protein extraction and purification, and sequence analysis, the protein sequence A of the key protein A is obtained. The developer can input the protein sequence A into the homologous sequence search system installed in the drug development device 400, perform a homologous protein sequence search on the protein sequence A, and search for two homologous protein sequences in the biological molecule sequence vector database: protein sequence B and protein sequence C. Furthermore, the developer can determine that the key protein A has a high degree of homology with protein B and protein C, and then use protein B and protein C as models to help design targeted inhibitors based on their structural information to improve the targeting of anti-tumor drugs.
[0077] It should be noted that Figure 3 and Figure 4 These are only two schematic diagrams of application scenarios provided by the embodiments of the present disclosure. The application scenarios described in the embodiments of the present disclosure are only for the purpose of more clearly illustrating the technical solutions of the embodiments of the present disclosure, and do not constitute a limitation on the technical solutions provided by the embodiments of the present disclosure. The biomolecule sequence search method proposed in the present disclosure can also be used in other application scenarios that require homology search. It is known to those skilled in the art that, with the evolution of application scenarios, the technical solutions provided by the embodiments of the present disclosure are also applicable to similar technical problems.
[0078] According to an embodiment of the present disclosure, a biomolecule sequence search method is provided. The biomolecule sequence search method can be executed by a computer device (such as a server, an edge computing device or other terminal device with a certain processing capability, etc.), and the computer device has at least storage, computing and communication functions. Figure 5 A schematic flow chart of the biomolecule sequence search method provided in this embodiment is shown. The biomolecule sequence search method is specifically described as follows.
[0079] Step 110: Obtaining unknown biomolecule sequence.
[0080] In the disclosed embodiments, a biomolecule sequence refers to a linear sequence in an organism that is composed of specific chemical molecules arranged in a certain order, and is the basis of the organism's genetic information and function execution. The biomolecule sequence includes a protein sequence and a nucleotide sequence. An unknown biomolecule sequence refers to a biomolecule sequence used for searching. For example, a new protein sequence "MKTLLILTCLVFGND..." was discovered in an experiment, and one wants to know whether it has homology with known proteins in the database, so as to infer its function. The new protein sequence is an unknown biomolecule sequence. For another example, a partial RNA sequence "AUGGCUACGU..." derived from virus A, researchers hope to find similar sequences in other viruses through homologous biological sequence searches to analyze the evolutionary relationship or functional similarity of virus A. The RNA sequence is an unknown biomolecule sequence.
[0081] As an implementation method, if the above-mentioned biological sequence search method can be implemented in part on a server and in part on a device, the acquisition method of the unknown biological molecule sequence can include sending a downstream task, and the downstream task refers to the task to which the biological sequence search method of the present disclosure is applied, such as genome annotation, disease research, and drug design. Figure 3 Taking the pathogen detection scenario shown as an example, the cloud server 310 can receive the unknown biological molecule sequence “pathogen nucleotide sequence” sent by the desktop computer 320 .
[0082] Step 120: Input the unknown biomolecule sequence into a sequence encoding model for sequence encoding to obtain a representation of the unknown biomolecule sequence.
[0083] Since biomolecule sequences are represented by discrete characters (such as ATCG or the amino acid alphabet), using such high-dimensional discrete characters to directly perform homology searches requires comparing two sequences character by character. For large-scale databases, one-by-one comparisons will consume a lot of time and computing resources. To this end, biomolecule sequences can be encoded into sequence representations in the form of vectors to improve the computational efficiency of homology searches.
[0084] The sequence encoding model is a deep neural network that can encode discrete characters in a high-dimensional sequence space into a sequence representation in a low-dimensional vector space. The sequence encoding model may include a protein encoder, a nucleotide encoder, and a pooling layer. The protein encoder refers to a pre-trained protein language model for encoding protein sequences. The nucleotide encoder refers to a pre-trained nucleotide language model for encoding nucleotide sequences. The pooling layer is used to perform a pooling operation on the outputs of the protein encoder and the nucleotide encoder so that the sequence encoding model can capture the global features of the entire unknown biomolecule sequence.
[0085] Among them, the protein encoder and the nucleotide encoder are pre-trained language models, and the model type of the language model is not limited here. For example, the protein encoder can be the second-generation evolutionary scale model (Evolutionary Scale Modeling 2, ESM2). For another example, in order to improve the encoding performance of long DNA sequences with a length of more than 10,000, the long-range language model (Long-Context Language Models) can be used as the backbone network to train a DNA language model based on a self-constructed gene database to encode long DNA sequences. The gene database includes a training set and a test set, and the training set and the test set have a low similarity.
[0086] In some embodiments, the computer device can detect whether the biomolecule category of the unknown biomolecule sequence is a protein molecule or a nucleotide molecule, and then use a protein encoder to encode the unknown biomolecule sequence of the protein molecule, and use a nucleotide encoder to encode the unknown biomolecule sequence of the nucleotide molecule. For example, DNA sequences and protein sequences have different alphabets (character sets), and character analysis can directly determine whether a biomolecule sequence belongs to a DNA sequence or a protein sequence.
[0087] like Figure 6 The model architecture diagram of a sequence encoding model shown in FIG. 1 includes a protein encoder, a DNA encoder, and a pooling layer. The output of the protein encoder and the DNA encoder can be used as the input of the pooling layer. The output of the pooling layer is the sequence representation of the unknown biomolecule sequence in the low-dimensional vector space. The sequence representation is a dense embedding representation, that is, the discrete characters of the unknown biomolecule sequence are mapped to dense embeddings. The pooling operation of the pooling layer can be average pooling. In this way, the mean of the local features of the unknown biomolecule sequence is calculated by average pooling, which effectively reduces the feature dimension of the unknown biomolecule sequence, and removes noise and redundant information to obtain the overall sequence representation of the DNA sequence and protein sequence.
[0088] As an implementation mode, when the computer device detects that the biological molecule category of an unknown biological molecule sequence is a protein molecule, the unknown biological molecule sequence is input into a protein encoder for sequence encoding to obtain protein sequence features, and the protein sequence features are input into a pooling layer for pooling operations to obtain a representation of the unknown biological molecule sequence whose biological molecule category is a protein molecule.
[0089] As another embodiment, when the computer device detects that the biological molecule category of an unknown biological molecule sequence is a nucleotide molecule, the unknown biological molecule sequence is input into a nucleotide encoder for sequence encoding to obtain a nucleotide sequence feature, and the nucleotide sequence feature is input into a pooling layer for pooling operation to obtain a representation of the unknown biological molecule sequence whose biological molecule category is a nucleotide molecule.
[0090] Step 130: Using the unknown biomolecule sequence representation, perform similarity searches on different candidate vector sets in the biomolecule sequence vector database.
[0091] The goal of homologous biological sequence search is to identify the similarities between different species or individuals by comparing biological molecule sequences, so as to infer their evolutionary relationships, functions and structures, etc. To this end, the similarity between the unknown biological molecule sequence representation and the sequence representation in the vector database is calculated, and the known biological molecule sequence representation that has homology with the unknown biological molecule sequence representation is obtained by comparing the size of each calculated similarity, and then the homologous biological molecule sequence corresponding to the unknown biological molecule sequence can be determined.
[0092] A biomolecule sequence vector database refers to a vector database used to store representations of known biomolecule sequences. Since homologous biological sequence searches usually require searching for massive amounts of known biomolecule sequence representations, for example, similarity searches for dense representations of billions of numbers in a biomolecule sequence vector database, the disclosed embodiment proposes a method for constructing a biomolecule sequence vector database to improve the efficiency and accuracy of homologous biological sequence searches.
[0093] In some embodiments, a computer device can obtain a biological molecule sequence to be stored, and output the biological molecule sequence to be stored to a sequence encoding model to obtain a biological molecule sequence representation. Further, the computer device can obtain biological molecule sequence metadata corresponding to the biological molecule sequence to be stored, and determine a vector label corresponding to the biological molecule sequence representation based on the biological molecule sequence metadata. Then, the computer device can store the biological molecule sequence representation in a corresponding vector data segment in a biological molecule sequence vector database according to the sequence length of the biological molecule sequence to be stored, and store the vector label in the biological molecule sequence vector database.
[0094] The biomolecule sequences to be stored refer to protein sequences and nucleotide sequences of known types in the real world. Biomolecule sequence metadata refers to additional data about the biomolecule sequence itself, which is used to describe other background knowledge such as the classification label and biological characteristics of the biomolecule sequence. For example, the biomolecule sequence metadata corresponding to the protein sequence may include data such as sequence length and Pfam family. For another example, the biomolecule sequence metadata corresponding to the nucleotide sequence may include data such as superkingdom.
[0095] A vector data segment refers to a logical structural unit used to store biomolecule sequence representations in a biomolecule sequence vector database, for example, a segment. Each vector data segment has a corresponding index, and when searching for vector data segments, the biomolecule sequence vector database can be divided into multiple vector data segments, and each vector data segment stores biomolecule sequence representations corresponding to biomolecule sequences with the same sequence length, that is, the sequence length of the biomolecule sequence corresponding to each vector in the vector data segment is the same as the sequence length of the biomolecule sequence to be stored.
[0096] This is because if the biomolecule sequence representations of biomolecule sequences of different sequence lengths are mixed and stored, in the subsequent similarity search process, the sequence similarity of some vectors in the vector data segment may be underestimated or overestimated, resulting in the final selected vector not being the vector that is truly most similar to the unknown biomolecule sequence representation, thereby reducing the accuracy of the homologous biological sequence search. It is understandable that when performing similarity search in multiple vector data segments that are not segmented according to sequence length and stored chaotically, the following problems may occur: First, the misselection of high local similarity. Some candidate vectors are highly similar to the biomolecule sequence representation in the local features of their own vector data segment (i.e., certain specific dimensions). This may be because some dimensions in the vector feature space are accidentally matched, while the actual global similarity in the entire biomolecule sequence vector database is low. Second, the implicit influence of sequence length. Sequence length affects the overall structure and feature expression of biomolecule sequence representation. Sequence representations of biomolecule sequences of different lengths are difficult to accurately compare using a unified similarity measurement method (such as cosine similarity). Therefore, the biomolecule sequence representations of biomolecule sequences of the same sequence length can be stored in the same vector data segment, so that when performing similarity search, by performing similarity search on candidate vectors corresponding to biomolecule sequences of the same sequence length, respectively, it is possible to avoid candidate vectors with high local similarity in the candidate vector set but low global similarity in the entire biomolecule sequence vector database from being mistakenly selected as known biomolecule sequence representations similar to unknown biomolecule sequence representations, thereby improving the accuracy of known biomolecule sequence representations obtained by similarity search. In addition, the biomolecule sequence representations stored in the biomolecule sequence vector database are divided and stored according to different vector data segments, which can facilitate the subsequent parallel similarity search of each vector data segment, thereby improving the overall search efficiency of homologous biomolecule sequence search.
[0097] As an implementation method, the computer device can input the biomolecule sequence to be stored into the sequence encoding model for sequence encoding, obtain the biomolecule sequence representation corresponding to the biomolecule sequence to be stored, store the biomolecule sequence representation corresponding to the biomolecule sequence to be stored with the same sequence length in the same vector data segment, determine the vector label corresponding to the biomolecule sequence representation using the biomolecule sequence metadata, and store the vector label in the biomolecule sequence vector database in a columnar data storage format. Among them, the columnar data storage format is particularly suitable for storing and streaming data sets with large data volumes, thereby meeting the storage requirements of massive biomolecule sequence representations.
[0098] For example, Figure 7The storage diagram of a biomolecule sequence representation shown in the figure can store the biomolecule sequence representation in the corresponding vector data segment based on the high-dimensional vector approximate nearest neighbor indexing algorithm (Inverted File with Product Quantization, IVFPQ) combined with the efficient approximate nearest neighbor search algorithm based on the small world graph (Hierarchical Navigable Small World, HNSW) indexing algorithm. Each vector data segment can store 10 million sequence representations, and the vector labels are stored in the biomolecule sequence vector database in the columnar data storage format of the Arrow format (.arrow). Each vector data segment can be set with an index to facilitate fast search.
[0099] In some embodiments, the computer device may perform a similarity search for each candidate vector set in the biomolecule sequence vector database for the unknown biomolecule sequence representation. The candidate vector set refers to a vector set to be searched for similarity, and a candidate vector set may correspond to a complete vector data segment or a vector data segment after metadata filtering, and the sequence length of the candidate biomolecule sequence corresponding to each candidate vector in the candidate vector set is the same.
[0100] As an implementation method, the computer device can perform similarity calculations on the unknown biomolecule sequence representation in parallel with each candidate vector in the candidate vector set for different candidate vector sets in the biomolecule sequence vector database, and obtain the sequence similarity corresponding to each candidate vector in the different candidate vector sets. For example, Figure 8 A search schematic diagram of a biomolecule sequence similarity search is shown. An unknown biomolecule sequence (such as a protein sequence or a nucleotide sequence) is input into a sequence encoding model for sequence encoding, thereby obtaining an unknown biomolecule sequence representation (such as a protein sequence representation or a nucleotide sequence representation), and the unknown biomolecule sequence representation is searched for similarity in parallel with each candidate vector set.
[0101] Specifically, similarity calculation is performed on the unknown biomolecule sequence representation and each candidate vector in the vector data segment. The relative degree calculation may include calculating cosine similarity, Euclidean distance or Pearson correlation coefficient, etc., which are not limited here, such as the following cosine similarity calculation process.
[0102] .
[0103] Among them, Sq refers to the unknown biomolecule sequence representation, Sc refers to the candidate vector in the vector data segment, || || refers to the norm calculation, and Simcos(Sq, Sc) refers to the cosine similarity between the unknown biomolecule sequence representation and the candidate vector in the vector data segment, that is, the sequence similarity.
[0104] Step 140: According to the similarity search results, a preset number of known biomolecule sequence representations are searched from each candidate vector set.
[0105] As an implementation method, the computer device can sort the candidate vectors in each candidate vector set in descending order of similarity based on the sequence similarity corresponding to each candidate vector in different candidate vector sets, obtain a similar sequence sorting corresponding to each candidate vector set, and then select a preset number of target candidate vectors from each candidate vector set in turn as known biological molecule sequence representations based on the descending order of the similar sequence sorting.
[0106] For example, the unknown biomolecule sequence is represented and similarity search is performed with different candidate vector sets respectively, and the sequence similarity corresponding to each candidate vector in each candidate vector set can be obtained. Figure 8 As shown in the figure, the top-k target candidate vectors with the largest sequence similarity are selected from the similar sequence rankings corresponding to each candidate vector set as the corresponding known biomolecule sequence representations, where top-k is a preset number. Furthermore, the top-k known biomolecule sequence representations corresponding to each candidate vector set are clustered together to obtain the final top-m known biomolecule sequence representations.
[0107] By storing the biomolecule sequence representations corresponding to biomolecule sequences with the same sequence length in the same vector data segment in the biomolecule sequence vector database, similarity search can be performed between vector data segments with the same sequence length during similarity search. Since the biomolecule sequences corresponding to the candidate vectors in each candidate vector set have the same sequence length, it is ensured that the similarity comparison within the candidate vector set is based on the standard of the same sequence length, thereby avoiding the inability to accurately search for top-k candidates due to different sequence lengths. In this way, the obtained top-m known biomolecule sequence representations are the most accurate known biomolecule sequence representations relative to the entire biomolecule sequence vector database, thereby improving the accuracy of homologous biological sequence searches for biomolecule sequences.
[0108] Step 150: Screening out homologous biomolecule sequences corresponding to the unknown biomolecule sequence from the known biomolecule sequences corresponding to the plurality of known biomolecule sequence representations.
[0109] In order to achieve a more accurate search for homologous biomolecule sequences, after obtaining a preset number of known biomolecule sequence representations corresponding to each candidate vector set, the known biomolecule sequences corresponding to each known biomolecule sequence representation can be reordered, so that a more accurate homologous biomolecule sequence can be selected for the unknown biomolecule sequence from multiple known biomolecule sequence representations.
[0110] The reordering may include reordering the known biomolecule sequences corresponding to the plurality of known biomolecule sequence representations to obtain a target biomolecule sequence sequence, and screening out homologous biomolecule sequences corresponding to the unknown biomolecule sequences from the target biomolecule sequence sequence.
[0111] In some embodiments, a sequence scoring model can be trained to calculate the score of sequence category relationship between known biomolecule sequences and unknown biomolecule sequences, and then the known biomolecule sequences are reordered according to the calculated sequence relationship score, so as to use one or more known biomolecule sequences with the highest score as homologous biomolecule sequences corresponding to the unknown biomolecule sequences. The specific sequence reordering process may include the following steps.
[0112] (1) Each known biomolecule sequence is represented by a corresponding known biomolecule sequence, and each of them forms a corresponding biomolecule sequence pair with the unknown biomolecule sequence.
[0113] As an implementation, the computer device may obtain the known biomolecule sequence corresponding to each known biomolecule sequence representation, and further form a biomolecule sequence pair with the unknown biomolecule sequence and each known biomolecule sequence, for calculating the sequence relationship score.
[0114] (2) For each biomolecule sequence pair, the biomolecule sequence pair is input into the sequence scoring model to predict the sequence relationship score, and the sequence relationship score corresponding to each biomolecule sequence pair is obtained;
[0115] As an implementation method, the sequence scoring model includes a feature extraction network and a relationship scoring network. The feature extraction network is used to extract features from the unknown biomolecule sequence and the known biomolecule sequence in the biomolecule sequence pair to obtain the corresponding sequence representations of the two. The relationship scoring network is used to calculate the sequence relationship score corresponding to the biomolecule sequence pair based on the corresponding sequence representations of the two. The sequence relationship score refers to the predicted probability value of a most likely sequence relationship category between the unknown biomolecule sequence and the known biomolecule sequence in the biomolecule sequence pair. The calculation process of the sequence relationship score can specifically include the following steps.
[0116] (2.1) inputting the known biomolecule sequence and the unknown biomolecule sequence in the biomolecule sequence pair into the feature extraction network respectively for feature extraction, thereby obtaining a first molecular sequence representation corresponding to the known biomolecule sequence and a second molecular sequence representation corresponding to the unknown biomolecule sequence;
[0117] (2.2) calculating the absolute value of the difference between the first molecular sequence representation and the second molecular sequence representation to obtain the molecular sequence representation difference;
[0118] (2.3) The difference between the molecular sequence representation pairs is input into the relationship scoring network to predict the sequence relationship score, and the sequence relationship score of the biological molecule sequence pair is obtained.
[0119] For example, the feature extraction network can be a pre-trained language model for feature extraction of biomolecule sequences, and the relationship scoring network can be a multi-layer perceptron. Taking protein sequences as an example, Fig. 9 A model schematic diagram of a sequence scoring model is shown, in which an unknown biomolecule sequence and a known biomolecule sequence in a biomolecule sequence pair are respectively input into a protein language model, and then the protein language model performs feature extraction on the unknown biomolecule sequence and the known biomolecule sequence, respectively, to obtain a corresponding first molecular sequence representation and a second molecular sequence representation, and further, the absolute value of the difference between the first molecular sequence representation and the second molecular sequence representation is calculated to obtain a molecular sequence representation pair difference, and then the molecular sequence representation pair difference is input into a multi-layer perceptron for sequence relationship score prediction to obtain a sequence relationship score of the biomolecule sequence pair.
[0120] Specifically, in the process of calculating the sequence relationship score, the difference of the molecular sequence representation pair is input into the relationship scoring network, and the category prediction probability of the biological molecule sequence pair under each preset sequence relationship category is predicted according to the difference of the molecular sequence representation pair, and each category prediction probability is normalized to obtain the normalized prediction probability corresponding to each preset sequence relationship category, and then according to each normalized prediction probability, the maximum normalized prediction probability is determined as the sequence relationship score of the biological molecule sequence pair.
[0121] Among them, the preset sequence relationship category is the preset relationship category for unknown biomolecule sequences and known biomolecule sequences. For example, four different sequence relationship categories can be set for two protein sequences: 1. Same family; 2. Not same family but same superfamily; 3. Not same superfamily but same fold; 4. Not same fold. Family and superfamily are classification units that describe the evolutionary relationship and functional characteristics between proteins. Folding describes how proteins form their functional structures through specific spatial arrangements. These concepts help understand the diversity, function and evolutionary origin of proteins.
[0122] After obtaining the category prediction probability under each preset sequence relationship category, each category prediction probability can be normalized using the Softmax function to obtain the normalized prediction probability corresponding to each preset sequence relationship category. The calculation process is as follows.
[0123] .
[0124] in, is the preset sequence relationship category in the i-th The predicted probability of the category under . is the preset sequence relationship category in the i-th The normalized prediction probability under . j is the number of preset sequence relationship categories. Further, the maximum value among the j category prediction probabilities can be used as the sequence relationship score of the biomolecule sequence pair, and the sequence relationship score Score is as follows.
[0125] .
[0126] (3) Reorder the known biomolecule sequences according to each sequence relationship score to obtain the target biomolecule sequence order.
[0127] As an implementation, the computer device can directly reorder the known biomolecule sequences in each biomolecule sequence pair based on the sequence relationship score of each biomolecule sequence pair to obtain the target biomolecule sequence order. The sequence reordering can also be performed by combining the sequence relationship score with the sequence similarity score calculated by other common homologous biological sequence search tools.
[0128] Taking the sequence reordering in a combined manner as an example, for each biomolecule sequence pair, a universal sequence similarity score prediction can be performed on the biomolecule sequence pair to obtain the universal sequence similarity score of each biomolecule sequence pair, and the sequence relationship score and the universal sequence similarity score of each biomolecule sequence pair are weighted to obtain the corresponding sequence weighted score. Furthermore, based on the sequence weighted score of each biomolecule sequence pair, the known biomolecule sequences in each biomolecule sequence pair can be sequence reordered to obtain the target biomolecule sequence order.
[0129] Among them, the universal sequence similarity score is calculated by a universal homologous biological sequence search tool, which may include the Multiple Sequence Alignment Fast Tool 2 (MMseqs2), the Protein Structure Fast Search Tool (Flodseek), and the Topology Alignment Tool (TM-align), etc., without limitation here.
[0130] As an implementation method, after obtaining the target biomolecule sequence ranking, the computer device can select multiple target biomolecule sequences from the target biomolecule sequence ranking in descending order of sequence weighted scores, and use the multiple target biomolecule sequences as homologous biomolecule sequences corresponding to the unknown biomolecule sequence. In this way, in addition to using the sequence scoring model disclosed in the present invention for re-ranking, other general homologous biological sequence search tools can also be combined to optimize the search results, providing additional options for optimizing the search results, thereby improving the scalability of homologous biological sequence searches.
[0131] In other embodiments, based on the sequence similarity corresponding to each known biomolecule sequence representation obtained in the similarity search phase, the known biomolecule sequence corresponding to each known biomolecule sequence representation may be reordered. The specific sequence reordering process is described as follows.
[0132] As an implementation method, the computer device can obtain the sequence similarity corresponding to each known biomolecule sequence representation based on the similarity search results, sort the known biomolecule sequences corresponding to each known biomolecule sequence representation according to each sequence similarity to obtain the target biomolecule sequence sorting, and select multiple known biomolecule sequences from the target biomolecule sequence sorting in order of sequence similarity from large to small, and then determine the multiple target biomolecule sequences as homologous biomolecule sequences corresponding to the unknown biomolecule sequence.
[0133] In this way, after obtaining multiple known biomolecule sequence representations from the biomolecule sequence vector database through similarity search, the known biomolecule sequences corresponding to the known biomolecule sequence representations are reordered. In this way, the known biomolecule sequence that is closest to the unknown biomolecule sequence in terms of sequence category relationship can be further searched as the corresponding homologous biomolecule sequence, effectively improving the accuracy of the homologous biological sequence search.
[0134] In this embodiment, the acquired unknown biomolecule sequence can be encoded into an unknown biomolecule sequence representation through a sequence encoding model, and then through the unknown biomolecule sequence representation, different candidate vector sets in the biomolecule sequence vector database can be quickly searched for similarity in a low-dimensional vector space, and then a preset number of known biomolecule sequence representations can be efficiently searched from each candidate vector set according to the similarity search results. In the vector database, the sequence length of the candidate biomolecule sequence corresponding to each candidate vector in different candidate vector sets is the same, so when searching for similarity, the candidate vectors corresponding to the biomolecule sequence of the same sequence length can be searched for similarity, so as to avoid the candidate vectors with high local similarity in the vector set but low global similarity in the entire biomolecule sequence vector database being mistakenly selected as the known biomolecule sequence representation similar to the unknown biomolecule sequence representation, thereby improving the accuracy of the known biomolecule sequence representation obtained by the similarity search. Compared with the method of only searching for similarity on the biomolecule sequence in the related art, the present disclosure can also screen out the homologous biomolecule sequence corresponding to the unknown biomolecule sequence based on the known biomolecule sequence corresponding to the multiple known biomolecule sequence representations. In this way, multiple known biomolecule sequences are obtained through rapid similarity search, and multiple known biomolecule sequences with higher accuracy are further screened to screen out high-quality homologous biomolecule sequences, thereby improving the accuracy of the search for homologous biomolecule sequences while also improving the efficiency of the search for homologous biomolecule sequences.
[0135] According to one embodiment of the present disclosure, a method for training a sequence scoring model is provided. The method for training a sequence scoring model can be performed by a computer device (such as a server, an edge computing device, or other terminal device with certain processing capabilities) before step 150 of the above embodiment, and the computer device has at least storage, computing, and communication functions. Fig.10 FIG. 4 is a flow chart showing a method for training a sequence scoring model provided in this embodiment. Fig.10 As shown, the biomolecule sequence search method can be specifically described as follows.
[0136] Step 210: Obtain a first sample biomolecule sequence and a second sample biomolecule sequence, and a sample sequence relationship category corresponding to the first sample biomolecule sequence and the second sample biomolecule sequence.
[0137] As an implementation, the computer device may randomly select a first sample biomolecule sequence and a second sample biomolecule sequence of the same biomolecule category from the training data, for example, obtain a protein sequence A from a protein sequence database (SCOPe40 dataset) as the first sample biomolecule sequence, and select a protein sequence B as the second sample biomolecule sequence. And determine the sequence relationship category between the protein sequence A and the protein sequence B as the sample sequence relationship category.
[0138] Step 220: Input the first sample biomolecule sequence and the second sample biomolecule sequence into a preset scoring model to perform sequence relationship prediction to obtain a predicted sequence relationship category.
[0139] As an implementation mode, the computer device can input the first sample biomolecule sequence and the second sample biomolecule sequence into a preset scoring model, respectively, and the sequence scoring model includes a feature extraction network and a relationship scoring network. Further, the first sample biomolecule sequence and the second sample biomolecule sequence are respectively input into the feature extraction network for feature extraction to obtain a first sample sequence representation corresponding to the first sample biomolecule sequence and a second sample sequence representation corresponding to the second sample biomolecule sequence. Further, the first sample sequence representation and the second sample sequence representation are subtracted, and the absolute value of the calculated difference is taken, and the calculation process is as follows.
[0140] .
[0141] Wherein, dA-B represents the molecular sequence representation difference between protein sequence A and protein sequence B. Further, the molecular sequence representation difference dA-B is input into the relationship scoring network to obtain the predicted sequence relationship category corresponding to protein sequence A and protein sequence B. The predicted sequence relationship category is a probability value. The calculation process of the predicted sequence relationship category is as follows.
[0142] .
[0143] in, Represents the predicted sequence relationship category, d is the molecular sequence, W* and b* are the weight parameters of the preset scoring model.
[0144] Step 230: Calculate the error based on the predicted sequence relationship category and the sample sequence relationship category to obtain the target loss.
[0145] As an implementation method, the computer device may calculate the error between the predicted sequence relationship category and the sample sequence relationship category to obtain the target loss. For example, the cross entropy loss function between the predicted sequence relationship category and the sample sequence relationship category is calculated as the target loss, and the calculation formula is as follows.
[0146] .
[0147] in, is the target loss, is the sample sequence relationship category, To predict the sequence relationship category.
[0148] Step 240: Iteratively train the preset scoring model using the target loss until the training end condition is met to obtain a sequence scoring model.
[0149] As an implementation method, the computer device can iteratively train the preset scoring model based on the target loss to update the weight parameters of the preset scoring model until the training end condition is met to obtain a sequence scoring model. Among them, the training result condition training end condition can be: the total loss value of the target loss is less than the preset value, the total loss value of the target loss is within the threshold range, or the number of training times reaches the preset number of times, etc. For example, in the embodiment of the present disclosure, an iteration threshold for iterative training of the diffusion model can be set, and the iteration threshold can be determined by experimenting on the empirical value. Optionally, an optimizer can be used to optimize the target loss, and the learning rate (Learning Rate), the batch size (Batch Size) during training, and the training period (Epoch) can be set based on experimental experience.
[0150] According to an embodiment of the present disclosure, another biomolecule sequence search method is provided. The biomolecule sequence search method can be executed by a computer device (such as a server, an edge computing device or other terminal device with a certain processing capability, etc.), and the computer device has at least storage, computing and communication functions. Fig.11 FIG. 2 shows a schematic flow chart of the biomolecule sequence search method provided in this embodiment. Fig.11 As shown, the biomolecule sequence search method can be specifically described as follows.
[0151] Step 310: Obtain unknown biomolecule sequence.
[0152] Step 320: Input the unknown biomolecule sequence into the sequence encoding model for sequence encoding to obtain the unknown biomolecule sequence representation.
[0153] As an implementation manner, the specific implementation contents of step 310 and step 320 may refer to step 110 and step 120 in the above embodiment, and will not be described in detail here.
[0154] In order to improve the search speed of homologous biomolecule sequences, before using the biomolecule sequence vector database to perform similarity search on unknown biomolecule sequences, each vector data segment in the biomolecule sequence vector database can be vector filtered to obtain filtered vector data segments, that is, candidate vector sets.
[0155] The purpose of vector filtering is to filter out the vectors in the vector database that do not match the metadata of the unknown biomolecule sequence, leaving the matching vectors, that is, candidate vectors. In this way, the search space of the subsequent similarity search can be effectively reduced, thereby increasing the search speed of homologous biomolecule sequences and more accurately searching for high-quality homologous biomolecule sequences. The specific implementation process may include the following steps.
[0156] Step 330: Obtain a sequence tag corresponding to the unknown biomolecule sequence.
[0157] As an embodiment, a sequence tag refers to metadata used to describe an unknown biological molecule sequence. The sequence tag can be obtained by user input or generated based on the unknown biological molecule sequence. Exemplarily, the user can input the corresponding sequence tag while inputting the unknown biological molecule sequence. For another example, if it is detected that the user inputs a sequence tag, the sequence tag corresponding to the unknown biological molecule sequence can be obtained. For example, a protein sequence as an unknown biological molecule sequence is input into the PfamScan tool, and PfamScan identifies the Pfam family tag of the sequence, such as PF00069 (protein kinase family).
[0158] Step 340: Perform vector filtering on each vector data segment in the biomolecule sequence vector database using sequence tags to obtain a candidate vector set corresponding to each vector data segment.
[0159] As an implementation method, a computer device may perform label matching on sequence tags corresponding to unknown biomolecule sequences with biomolecule sequence vectors stored in different vector data segments in a biomolecule sequence vector database to filter out a candidate vector set for label matching, which may specifically include the following steps.
[0160] (1) Obtain each vector data segment in the biomolecule sequence vector database;
[0161] (2) For each vector data segment, match the sequence label with the vector label corresponding to each sequence vector in the vector data segment, determine the sequence vector whose vector label in the vector data segment matches the sequence label as a candidate vector, and store the candidate vector in the candidate vector set corresponding to the vector data segment.
[0162] Exemplarily, each vector data segment in the biomolecule sequence vector database can be obtained, and the sequence tags corresponding to the unknown biomolecule sequences are matched with the vector tags of each biomolecule sequence vector in each vector data segment, and the sequence vectors in the vector data segment whose vector tags do not match the sequence tags are deleted, and the matched vector data segments are used as candidate vector sets.
[0163] Step 350: Using the unknown biomolecule sequence representation, perform similarity searches on different candidate vector sets in the biomolecule sequence vector database.
[0164] Step 360: Based on the similarity search results, a preset number of known biomolecule sequence representations are searched from each candidate vector set.
[0165] Step 370: Screen out homologous biomolecule sequences corresponding to the unknown biomolecule sequence from the known biomolecule sequences corresponding to the plurality of known biomolecule sequence representations.
[0166] As an implementation manner, the specific implementation contents of step 350 to step 370 may refer to step 130 to step 150 in the above embodiment, and will not be elaborated here.
[0167] See also Fig.12 , Fig.12 A homology search process flow chart of a biological molecule sequence is shown. The homology search process is divided into three stages: a pre-search stage, a search stage, and a post-search stage.
[0168] In the pre-search phase, the sequence tags corresponding to the unknown biomolecule sequence are matched with the metadata (i.e., vector tags) stored in the biomolecule sequence vector database, including the assumed tags and the determined tags, to filter the vector data segments in the biomolecule sequence vector database. Specifically, the assumed tag refers to the sequence category tag of the assumed biomolecule sequence, which can be the protein family category obtained by the PfamScan protein function analysis, or the PfamScan annotation obtained by the nuclear sequence analysis using the hidden Markov model. The determined tag refers to the determined sequence category tag of the biomolecule sequence, for example, the sequence length and superfamily classification tag. The sequence tags corresponding to the unknown biomolecule sequence are filtered with the metadata stored in the biomolecule sequence vector database to obtain the candidate vector set, that is, the vector data segments in the biomolecule sequence vector database. After filtering in the pre-search phase, the vector set representing the biomolecule sequence matching the sequence tag is left.
[0169] In the search stage, the unknown biomolecule sequence representation is used to perform similarity search on different candidate vector sets in the biomolecule sequence vector database. Specifically, the generated molecular sequence representation corresponding to the unknown biomolecule sequence representation in the top-k cosine similarities is first searched from each filtered vector data segment, and then the top-k generated molecular sequence representations corresponding to each vector data segment are clustered to obtain the final top-m generated molecular sequence representations as the known biomolecule sequence representation.
[0170] In the post-search phase, the sequence scoring model obtained through training is used to score the known biomolecule sequences corresponding to the known biomolecule sequences and the unknown biomolecule sequences, respectively, to obtain a more accurate homologous biomolecule sequence of the unknown biomolecule sequence. In addition, other common homologous biomolecule sequence search tools (such as MMseqs2, Flodseek, and TM-align, etc.) can also be integrated to provide additional options for optimizing search results.
[0171] By performing a three-stage homology search on the unknown biomolecule sequence, the vectors in the biomolecule sequence vector database that do not match the metadata of the unknown biomolecule sequence can be deleted in the pre-search stage, leaving the matching vectors, that is, candidate vectors. In this way, the search space of the subsequent similarity search can be effectively reduced, and while the search speed of homologous biomolecule sequences is improved, high-quality homologous biomolecule sequences can be searched more accurately. Further, in the similarity search process, by calculating the similarity between each candidate vector in the candidate vector set and the unknown biomolecule sequence representation, the known biomolecule sequence representation with high similarity to the unknown biomolecule sequence representation can be determined according to the similarity score corresponding to each candidate vector. Then, in the post-search stage, the sequence relationship score of the known biomolecule sequence and the unknown biomolecule sequence is calculated through the sequence scoring model, and the known biomolecule sequence can be re-ranked based on the sequence relationship score between each known biomolecule sequence and the unknown biomolecule sequence, so that the known biomolecule sequence with the sequence relationship score in the top-k of the re-ranking is determined as the homologous biomolecule sequence of the unknown biomolecule sequence. In this way, the efficiency and accuracy of homology search can be effectively improved by first performing the pre-search phase of vector filtering, then the intermediate search phase of similarity search, and finally the post-search phase of reordering.
[0172] In order to verify the search performance of the biomolecule sequence search method provided by the embodiment of the present disclosure, the embodiment of the present disclosure conducts comparative experiments on different data sets, and it should be noted that the following examples used to show the experimental results are Figures 13 to 20The prior art mentioned above is a common technology for technicians in the field of homology search technology. Since the introduction of all the prior art is quite long, only some of the prior art are selected for introduction below. For other prior art not introduced, technicians in this field can know it by referring to the accompanying drawings, as follows.
[0173] In the homologous protein search scenario, experiments were conducted based on the SCOPe40-test dataset. The prior art used as a control group may at least include the search method described below.
[0174] Sequence search: MMseqs2, Basic Local Alignment Search Tool for Proteins (Blastp);
[0175] Searches based on structure letters: 3D-BLAST-SW, CLE-SW (Cross Lingual Evaluation with Smith-Waterman), Foldseek, and Foldseek-TM;
[0176] Search based on structural alignment: Combinatorial Extension (CE), Distance-matrix Alignment (Dali), TM-align.
[0177] like Fig.13 The accuracy of various methods is demonstrated. The method disclosed in this paper reaches 0.944, 0.866 and 0.916 in P@1, P@10 and MAP respectively, all exceeding other existing technologies.
[0178] like Fig.14 The search speeds of various methods are demonstrated. With the advantage of vector search, the disclosed method is the fastest among the most accurate methods, with a search speed 4 times that of Foldseek and 4000 times that of TM-align, while the version without the rearrangement step is 50 times faster than Foldseek and 50000 times faster than TMalign. Among the fastest methods, the disclosed method is the most sensitive, and its AUROC is significantly better than mmseqs2 at the fold level (increased from 0.002 to 0.400).
[0179] like Fig.15 The AUROC curves of various methods are shown, and the disclosed method is nearly five percentage points higher than other existing technologies at the fold level.
[0180] In the homologous nucleotide search scenario, experiments were conducted based on the NCBITaxonomic-test dataset. The prior art used as a control group includes the following method.
[0181] Transfer learning based methods: MMseqs2, Blastn;
[0182] Directly predict label method: bertax
[0183] like Fig.16 The AUROC curves of various methods are shown, and the disclosed method is significantly better than the other two methods.
[0184] like Fig.17 The accuracy comparison of various methods is shown. In terms of average accuracy, the disclosed method exceeds blastn by 4.0%, 5.7% and 4.3% respectively in representing three levels of the biological classification hierarchy: genus, phylum and superkingdom.
[0185] In terms of search speed, Fig.18 The ability of the disclosed method to expand the biological vector database to one billion samples is demonstrated. Tests were performed on subsets of Swiss-Prot and UniRef90. To ensure fairness, the same query set was used, 500 queries were executed, and the average was taken as the search time. The search time complexity is between O(logn) and O(loglogn), showing good scalability for expanding the biological database to the order of 1 billion.
[0186] like Fig.19 The comparison of search time with and without parallel search strategy is shown. By dividing the database into several segments (datasets) to implement parallel search strategy, the trend of search time is reduced from O(n) to O(loglogn). In addition, the disclosed method performs well in the retrieval time of long sequences, such as Fig. 20 The search speeds of different tools when processing nucleotide sequences of different lengths are shown, and the search speed of the disclosed method is always between 1 and 10 microseconds. In contrast, blastn is significantly affected by sequence length, and the search time of MMseqs2 is always longer. When the sequence length exceeds 100,000, the average search speed of the disclosed method is about 64 times that of blastn, showing the superior performance of the disclosed method in long sequence searches.
[0187] See also Fig.21, which shows a structural block diagram of a biomolecule sequence search device 400 provided by an embodiment of the present disclosure. The biomolecule sequence search device 400 may include a sequence acquisition module 410, a sequence encoding module 420, a sequence search module 430, a representation search module 440 and a homology determination module 450.
[0188] A sequence acquisition module 410 is used to acquire the sequence of unknown biomolecules;
[0189] A sequence encoding module 420, used for inputting the unknown biomolecule sequence into a sequence encoding model for sequence encoding to obtain a sequence representation of the unknown biomolecule;
[0190] A sequence search module 430 is used to perform similarity search on different candidate vector sets in the biomolecule sequence vector database respectively by using the unknown biomolecule sequence representation, wherein the sequence lengths of the candidate biomolecule sequences corresponding to each candidate vector in the candidate vector set are the same;
[0191] A representation search module 440, configured to search for a preset number of known biomolecule sequence representations from each candidate vector set according to similarity search results;
[0192] The homology determination module 450 is used to screen out homologous biomolecule sequences corresponding to the unknown biomolecule sequence from known biomolecule sequences corresponding to a plurality of known biomolecule sequence representations.
[0193] In some embodiments, the homology determination module 450 may include a reordering submodule and a sequence screening submodule.
[0194] A reordering submodule, for reordering the known biomolecule sequences corresponding to the plurality of known biomolecule sequence representations, to obtain a target biomolecule sequence order;
[0195] The sequence screening submodule is used to screen out homologous biomolecule sequences corresponding to the unknown biomolecule sequences from the target biomolecule sequence ranking.
[0196] In some embodiments, the reordering submodule may include a sequence combination unit, a score prediction unit, and a reordering unit.
[0197] A sequence combination unit, used to represent each known biomolecule sequence as a corresponding known biomolecule sequence, and to form corresponding biomolecule sequence pairs with the unknown biomolecule sequence;
[0198] A score prediction unit, for inputting each biomolecule sequence pair into a sequence scoring model to perform sequence relationship score prediction, and obtaining a sequence relationship score corresponding to each biomolecule sequence pair;
[0199] The reordering unit is used to reorder the sequences of known biomolecules according to each sequence relationship score to obtain a target biomolecule sequence order.
[0200] In some embodiments, the sequence scoring model includes a feature extraction network and a relationship scoring network, and the scoring prediction unit includes a first subunit, a second subunit, and a third subunit.
[0201] A first subunit is used to input the known biomolecule sequence and the unknown biomolecule sequence in the biomolecule sequence pair into the feature extraction network for feature extraction, respectively, to obtain a first molecular sequence representation corresponding to the known biomolecule sequence and a second molecular sequence representation corresponding to the unknown biomolecule sequence;
[0202] A second subunit is used to calculate the absolute value of the difference between the first molecular sequence representation and the second molecular sequence representation to obtain a molecular sequence representation pair difference;
[0203] The third subunit is used to input the difference of the molecular sequence representation pair into the relationship scoring network to perform sequence relationship score prediction to obtain the sequence relationship score of the biological molecule sequence pair.
[0204] In some embodiments, the third subunit can be specifically used to: input the difference of the molecular sequence representation pair into the relationship scoring network, and predict the category prediction probability of the biological molecule sequence pair under each preset sequence relationship category based on the difference of the molecular sequence representation pair; normalize each category prediction probability to obtain the normalized prediction probability corresponding to each preset sequence relationship category; and determine the maximum normalized prediction probability as the sequence relationship score of the biological molecule sequence pair based on each normalized prediction probability.
[0205] In some embodiments, the reordering unit can be specifically used to: for each biomolecule sequence pair, perform a universal sequence similarity score prediction on the biomolecule sequence pair to obtain the universal sequence similarity score of each biomolecule sequence pair; perform a weighted calculation on the sequence relationship score and the universal sequence similarity score of each biomolecule sequence pair to obtain a corresponding sequence weighted score; and perform sequence reordering on the known biomolecule sequences in each biomolecule sequence pair according to the sequence weighted score of each biomolecule sequence pair to obtain a target biomolecule sequence order.
[0206] In some embodiments, the sequence screening submodule can be specifically used to: select multiple target biomolecule sequences from the target biomolecule sequence ranking in descending order of sequence weighted scores; and use the multiple target biomolecule sequences as homologous biomolecule sequences corresponding to the unknown biomolecule sequence.
[0207] In some embodiments, the biomolecule sequence search apparatus 400 may further include a sample acquisition module, a relationship prediction module, an error calculation module, and a model training module.
[0208] A sample acquisition module, used to acquire a first sample biomolecule sequence and a second sample biomolecule sequence, and a sample sequence relationship category corresponding to the first sample biomolecule sequence and the second sample biomolecule sequence;
[0209] A relationship prediction module, used to input the first sample biomolecule sequence and the second sample biomolecule sequence into a preset scoring model to perform sequence relationship prediction and obtain a predicted sequence relationship category;
[0210] An error calculation module, used to perform error calculation according to the predicted sequence relationship category and the sample sequence relationship category to obtain a target loss;
[0211] The model training module is used to iteratively train the preset scoring model through the target loss until the training end condition is met to obtain a sequence scoring model.
[0212] In some embodiments, the reordering submodule can be specifically used to: obtain the sequence similarity corresponding to each known biomolecule sequence representation based on the similarity search results; sort the known biomolecule sequences corresponding to each known biomolecule sequence representation according to each sequence similarity to obtain the target biomolecule sequence sorting; the sequence screening submodule can be specifically used to select multiple known biomolecule sequences from the target biomolecule sequence sorting in order of sequence similarity from large to small; and determine the multiple known biomolecule sequences as homologous biomolecule sequences corresponding to the unknown biomolecule sequence.
[0213] In some embodiments, the sequence search module 430 can be specifically used to: for different candidate vector sets in the biological molecule sequence vector database, perform similarity calculation on the unknown biological molecule sequence representation in parallel with each candidate vector in the candidate vector set to obtain the sequence similarity corresponding to each candidate vector in the different candidate vector sets; the representation search module 440 can be specifically used to sort the candidate vectors in each candidate vector set in descending order of similarity according to the sequence similarity corresponding to each candidate vector in the different candidate vector sets to obtain the similar sequence sorting corresponding to each candidate vector set; according to the descending order of the similar sequence sorting, select a preset number of target candidate vectors from each candidate vector set in turn as the known biological molecule sequence representation.
[0214] In some embodiments, the sequence encoding model includes a protein encoder, a nucleotide encoder and a pooling layer, and the sequence encoding module 420 can be specifically used for: when it is detected that the biological molecule category of the unknown biological molecule sequence is a protein molecule, the unknown biological molecule sequence is input into the protein encoder for sequence encoding to obtain a protein sequence feature, and the protein sequence feature is input into the pooling layer for pooling operation to obtain a representation of the unknown biological molecule sequence whose biological molecule category is a protein molecule; when it is detected that the biological molecule category of the unknown biological molecule sequence is a nucleotide molecule, the unknown biological molecule sequence is input into the nucleotide encoder for sequence encoding to obtain a nucleotide sequence feature, and the nucleotide sequence feature is input into the pooling layer for pooling operation to obtain a representation of the unknown biological molecule sequence whose biological molecule category is a nucleotide molecule.
[0215] In some embodiments, the biomolecule sequence search apparatus 400 may further include a label acquisition module and a vector filtering module.
[0216] A label acquisition module is used to obtain sequence labels corresponding to unknown biomolecule sequences;
[0217] The vector filtering module is used to perform vector filtering on each vector data segment in the biomolecule sequence vector database through the sequence tag to obtain a candidate vector set corresponding to each vector data segment.
[0218] In some embodiments, the vector filtering module can be specifically used to: obtain each vector data segment in a biological molecule sequence vector database; for each vector data segment, match the sequence tag with the vector tag corresponding to each sequence vector in the vector data segment, determine the sequence vector whose vector tag in the vector data segment matches the sequence tag as a candidate vector, and store the candidate vector in a candidate vector set corresponding to the vector data segment.
[0219] In some embodiments, the biomolecule sequence search apparatus 400 may further include a molecular sequence acquisition module, a molecular sequence encoding module, a vector label determination module, a sequence representation storage module, and a vector label storage module.
[0220] A molecular sequence acquisition module is used to acquire the biological molecular sequence to be stored;
[0221] A molecular sequence encoding module, used for inputting the biomolecule sequence to be stored into a sequence encoding model to obtain a biomolecule sequence representation;
[0222] A vector label determination module, used to obtain the biomolecule sequence metadata corresponding to the biomolecule sequence to be stored, and determine the vector label corresponding to the biomolecule sequence representation according to the biomolecule sequence metadata;
[0223] A sequence representation storage module, used for storing the biomolecule sequence representation into a corresponding vector data segment in a biomolecule sequence vector database according to the sequence length of the biomolecule sequence to be stored, wherein the sequence length of the biomolecule sequence corresponding to each vector in the vector data segment is the same as the sequence length of the biomolecule sequence to be stored;
[0224] A vector label storage module is used to store the vector label in the biomolecule sequence vector database.
[0225] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices, modules, etc. can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0226] In several embodiments provided in the present disclosure, the coupling between modules may be electrical, mechanical or other forms of coupling.
[0227] In addition, each functional module in each embodiment of the present disclosure may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module. The above integrated modules may be implemented in the form of hardware or in the form of software functional modules.
[0228] In this embodiment, the acquired unknown biomolecule sequence can be encoded into an unknown biomolecule sequence representation through a sequence encoding model, and then through the unknown biomolecule sequence representation, different candidate vector sets in the biomolecule sequence vector database can be quickly searched for similarity, and then a preset number of known biomolecule sequence representations can be efficiently searched from each candidate vector set according to the similarity search results. In the vector database, the sequence length of the candidate biomolecule sequence corresponding to each candidate vector in different candidate vector sets is the same, so during the similarity search, the candidate vectors corresponding to the biomolecule sequence of the same sequence length can be searched for similarity, so as to avoid the candidate vectors with high local similarity in the selected vector set but low global similarity in the entire biomolecule sequence vector database being mistakenly selected as the known biomolecule sequence representation similar to the unknown biomolecule sequence representation, thereby improving the accuracy of the known biomolecule sequence representation obtained by the similarity search. Compared with the method of the related art that only searches for similarity on the biomolecule sequence, the present disclosure also screens out the homologous biomolecule sequence corresponding to the unknown biomolecule sequence on the basis of the known biomolecule sequence corresponding to the multiple known biomolecule sequence representations. In this way, multiple known biomolecule sequences are obtained through rapid similarity search, and multiple known biomolecule sequences with higher accuracy are further screened to screen out high-quality homologous biomolecule sequences, thereby improving the accuracy of the search for homologous biomolecule sequences while also improving the efficiency of the search for homologous biomolecule sequences.
[0229] like Fig. 22 As shown, the embodiment of the present disclosure further provides a computer device 500, which includes a processor 510, a memory 520, a power supply 530 and an input unit 540. The memory 520 stores a computer program, and when the computer program is called by the processor 510, the various method steps provided in the above embodiments can be implemented. It can be understood by those skilled in the art that the structure of the computer device shown in the figure does not constitute a limitation on the computer device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0230] The processor 510 may include one or more processing cores. The processor 510 uses various interfaces and lines to connect various parts of the entire battery management system, and executes various functions and processes data of the battery management system, as well as various functions and processes data of the computer device by running or executing instructions, programs, instruction sets or program sets stored in the memory 520, calling data stored in the memory 520, thereby controlling the computer device as a whole. Optionally, the processor 510 may be implemented in at least one hardware form of digital signal processing (DSP), field programmable gate array (FPGA), and programmable logic array (PLA). The processor 510 may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It is understandable that the above-mentioned modem may not be integrated into the processor 510, but may be implemented separately through a communication chip.
[0231] The memory 520 may include a random access memory (RAM) or a read-only memory (ROM). The memory 520 may be used to store instructions, programs, instruction sets or program sets. The memory 520 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc. The data storage area may also store data (such as a phone book and audio and video data) created by the computer device during use. Accordingly, the memory 520 may also include a memory controller to provide the processor 510 with access to the memory 520.
[0232] The power supply 530 can be logically connected to the processor 510 through a power management system, so as to manage charging, discharging, power consumption, etc. through the power management system. The power supply 530 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0233] The input unit 540 can be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0234] Although not shown, the computer device 500 may also include an output unit, a display unit, etc., which are not described in detail herein. Specifically, in the embodiment of the present disclosure, the processor 510 of the computer device will load the executable files corresponding to the processes of one or more computer programs into the memory 520 according to the following instructions, and the processor 510 will run the data stored in the memory 520, such as the phone book and audio and video data, so as to implement the various method steps provided in the aforementioned embodiments.
[0235] like Fig.23 As shown, the embodiment of the present disclosure further provides a computer-readable storage medium 600, in which a computer program or computer instruction 610 is stored. The computer program or computer instruction 610 can be called by a processor of a computer device to execute various method steps provided by the embodiment of the present disclosure.
[0236] The computer-readable storage medium may be an electronic memory such as a flash memory, an EEPROM (Electrically Erasable Programmable Read-Only Memory), an EPROM, a hard disk, or a ROM. Optionally, the computer-readable storage medium includes a non-transitory computer-readable storage medium (Non-Transitory Computer-Readable Storage Medium). The computer-readable storage medium 600 has a storage space for a computer program or computer instruction that executes any method step in the above-mentioned embodiment. These computer programs or computer instructions can be read from or written into one or more computer program products. The computer program or computer instruction can be compressed in an appropriate form.
[0237] According to one aspect of the present disclosure, a computer program product is provided, the computer program product comprising a computer program or a computer instruction, the computer program or the computer instruction being stored in a computer-readable storage medium. A processor of a computer device reads the computer program or the computer instruction from the computer-readable storage medium, and the processor executes the computer program or the computer instruction, so that the computer device executes various method steps provided in the above embodiments.
[0238] The terms "include" and "comprising" and any variations thereof in the specification of the present disclosure and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices. The term "module" or "unit" refers to a computer program or a part of a computer program that has a predetermined function, and works with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.
[0239] It should be understood that in the present disclosure, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0240] It should be understood that in the description of the embodiments of the present disclosure, the meaning of multiple (or multiple items) is more than two, greater than, less than, exceed, etc. are understood as not including the number, and above, below, within, etc. are understood as including the number.
[0241] In the several embodiments provided in the present disclosure, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0242] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, each functional unit in each embodiment of the present disclosure may be integrated into a processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware or in the form of software functional units.
[0243] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present disclosure is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present disclosure. It should also be understood that the various implementation methods provided in the embodiments of the present disclosure can be arbitrarily combined to achieve different technical effects.
[0244] The above are only preferred embodiments of the present disclosure, and are not intended to limit the present disclosure in any form. Although the present disclosure has been disclosed as above in the form of preferred embodiments, it is not intended to limit the present disclosure. Any technical personnel in this field can make some changes or modify the technical contents disclosed above into equivalent embodiments without departing from the scope of the technical solution of the present disclosure. However, any brief modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present disclosure without departing from the content of the technical solution of the present disclosure are still within the scope of the technical solution of the present disclosure.
Claims
1. A method for searching a biomolecule sequence, characterized in that: The method comprises: Obtain unknown biomolecule sequences; Inputting the unknown biomolecule sequence into a sequence encoding model for sequence encoding to obtain a representation of the unknown biomolecule sequence; For different candidate vector sets in a biomolecule sequence vector database, the unknown biomolecule sequence representation is parallelly calculated with each candidate vector in the candidate vector set to obtain the sequence similarity corresponding to each candidate vector in the different candidate vector sets, and the sequence lengths of the candidate biomolecule sequences corresponding to each candidate vector in the candidate vector set are the same; According to the sequence similarity corresponding to each candidate vector in the different candidate vector sets, the candidate vectors in each candidate vector set are sorted in descending order of similarity to obtain a similar sequence sorting corresponding to each candidate vector set, and according to the descending order of the similar sequence sorting, a preset number of target candidate vectors are selected from each candidate vector set in turn as known biomolecule sequence representations; From the known biomolecule sequences corresponding to the plurality of known biomolecule sequence representations, a homologous biomolecule sequence corresponding to the unknown biomolecule sequence is screened out.
2. The method according to claim 1, characterized in that The step of screening out a homologous biomolecule sequence corresponding to the unknown biomolecule sequence from known biomolecule sequences corresponding to the plurality of known biomolecule sequences includes: Reordering the known biomolecule sequences corresponding to the plurality of known biomolecule sequence representations to obtain a target biomolecule sequence order; From the target biomolecule sequence ranking, a homologous biomolecule sequence corresponding to the unknown biomolecule sequence is screened out.
3. The method according to claim 2, characterized in that The step of reordering the known biomolecule sequences corresponding to the plurality of known biomolecule sequence representations to obtain a target biomolecule sequence order includes: Each known biomolecule sequence represents a corresponding known biomolecule sequence, and each of them forms a corresponding biomolecule sequence pair with the unknown biomolecule sequence; For each biomolecule sequence pair, the biomolecule sequence pair is input into a sequence scoring model to perform sequence relationship score prediction to obtain a sequence relationship score corresponding to each biomolecule sequence pair; The sequences of known biomolecules are reordered according to each sequence relationship score to obtain the sequence order of the target biomolecules.
4. The method according to claim 3, characterized in that The sequence scoring model includes a feature extraction network and a relationship scoring network, and the step of inputting the biomolecule sequence pair into the sequence scoring model to perform sequence relationship score prediction includes: Inputting the known biomolecule sequence and the unknown biomolecule sequence in the biomolecule sequence pair into the feature extraction network to extract features, respectively, to obtain a first molecular sequence representation corresponding to the known biomolecule sequence and a second molecular sequence representation corresponding to the unknown biomolecule sequence; Calculating the absolute value of the difference between the first molecular sequence representation and the second molecular sequence representation to obtain a molecular sequence representation difference; The difference between the molecular sequence representation pairs is input into the relationship scoring network to perform sequence relationship score prediction to obtain the sequence relationship score of the biological molecule sequence pair.
5. The method according to claim 4, characterized in that The step of inputting the difference between the molecular sequence representation pairs into the relationship scoring network to perform sequence relationship score prediction to obtain the sequence relationship score of the biomolecule sequence pair comprises: Inputting the molecular sequence representation pair difference into the relationship scoring network, and predicting the category prediction probability of the biological molecule sequence pair under each preset sequence relationship category according to the molecular sequence representation pair difference; Normalize the prediction probability of each category to obtain the normalized prediction probability corresponding to each preset sequence relationship category; According to each normalized prediction probability, the maximum normalized prediction probability is determined as the sequence relationship score of the biomolecule sequence pair.
6. The method according to any one of claims 3 to 5, characterized in that: The step of reordering the known biomolecule sequences according to each sequence relationship score to obtain the target biomolecule sequence order includes: For each biomolecule sequence pair, performing a universal sequence similarity score prediction on the biomolecule sequence pair to obtain a universal sequence similarity score for each biomolecule sequence pair; Perform weighted calculation on the sequence relationship score and universal sequence similarity score of each biomolecule sequence pair to obtain a corresponding sequence weighted score; According to the sequence weighted score of each biomolecule sequence pair, the known biomolecule sequences in each biomolecule sequence pair are reordered to obtain the target biomolecule sequence order.
7. The method according to claim 6, characterized in that The step of screening out homologous biomolecule sequences corresponding to the unknown biomolecule sequences from the target biomolecule sequence ranking includes: From the target biomolecule sequence ranking, selecting a plurality of target biomolecule sequences in descending order of sequence weighted scores; The multiple target biomolecule sequences are used as homologous biomolecule sequences corresponding to the unknown biomolecule sequences.
8. The method according to claim 3, characterized in that The training steps of the sequence scoring model include: Acquire a first sample biomolecule sequence and a second sample biomolecule sequence, and a sample sequence relationship category corresponding to the first sample biomolecule sequence and the second sample biomolecule sequence; Inputting the first sample biomolecule sequence and the second sample biomolecule sequence into a preset scoring model to perform sequence relationship prediction, respectively, to obtain a predicted sequence relationship category; Perform error calculation based on the predicted sequence relationship category and the sample sequence relationship category to obtain a target loss; The preset scoring model is iteratively trained using the target loss until a training end condition is met, thereby obtaining a sequence scoring model.
9. The method according to claim 2, characterized in that: The step of reordering the known biomolecule sequences corresponding to the plurality of known biomolecule sequence representations to obtain a target biomolecule sequence order includes: According to the similarity search results, the sequence similarity corresponding to each known biomolecule sequence representation is obtained; According to each sequence similarity, the known biomolecule sequence corresponding to each known biomolecule sequence representation is sorted to obtain the target biomolecule sequence sorting; The step of screening out homologous biomolecule sequences corresponding to the unknown biomolecule sequences from the target biomolecule sequence ranking includes: From the target biomolecule sequence ranking, selecting a plurality of known biomolecule sequences in descending order of sequence similarity; The plurality of known biomolecule sequences are determined as homologous biomolecule sequences corresponding to the unknown biomolecule sequence.
10. The method according to claim 1, characterized in that The sequence encoding model includes a protein encoder, a nucleotide encoder and a pooling layer. The unknown biomolecule sequence is input into the sequence encoding model for sequence encoding to obtain the unknown biomolecule sequence representation, including: When it is detected that the biomolecule category of the unknown biomolecule sequence is a protein molecule, the unknown biomolecule sequence is input into the protein encoder for sequence encoding to obtain a protein sequence feature, and the protein sequence feature is input into the pooling layer for pooling operation to obtain a representation of the unknown biomolecule sequence whose biomolecule category is a protein molecule; When it is detected that the biological molecule category of the unknown biological molecule sequence is a nucleotide molecule, the unknown biological molecule sequence is input into the nucleotide encoder for sequence encoding to obtain a nucleotide sequence feature, and the nucleotide sequence feature is input into the pooling layer for pooling operation to obtain a representation of the unknown biological molecule sequence whose biological molecule category is a nucleotide molecule.
11. The method according to claim 1, characterized in that: Before calculating the similarity between the unknown biomolecule sequence representation and each candidate vector in the candidate vector set for different candidate vector sets in the biomolecule sequence vector database to obtain the sequence similarity corresponding to each candidate vector in the different candidate vector sets, the method further includes: Obtain sequence tags corresponding to unknown biomolecule sequences; Through the sequence tag, vector filtering is performed on each vector data segment in the biomolecule sequence vector database to obtain a candidate vector set corresponding to each vector data segment.
12. The method according to claim 11, characterized in that The vector filtering is performed on each vector data segment in the biomolecule sequence vector database through the sequence tag to obtain a candidate vector set corresponding to each vector data segment, including: Obtain each vector data segment in a biomolecule sequence vector database; For each vector data segment, the sequence label is matched with the vector label corresponding to each sequence vector in the vector data segment, the sequence vector whose vector label in the vector data segment matches the sequence label is determined as a candidate vector, and the candidate vector is stored in the candidate vector set corresponding to the vector data segment.
13. The method according to claim 11 or 12, characterized in that: The biomolecule sequence vector database is obtained according to the following steps: Obtaining the biomolecule sequence to be stored; Inputting the biomolecule sequence to be stored into a sequence encoding model to obtain a biomolecule sequence representation; Acquire biomolecule sequence metadata corresponding to the biomolecule sequence to be stored, and determine a vector label corresponding to the biomolecule sequence representation according to the biomolecule sequence metadata; According to the sequence length of the biomolecule sequence to be stored, the biomolecule sequence representation is stored in a corresponding vector data segment in a biomolecule sequence vector database, wherein the sequence length of the biomolecule sequence corresponding to each vector in the vector data segment is the same as the sequence length of the biomolecule sequence to be stored; The vector tag is stored in the biomolecule sequence vector database.
14. A biomolecule sequence search device, characterized in that: The device comprises: A sequence acquisition module is used to obtain unknown biomolecule sequences; A sequence encoding module, used for inputting the unknown biomolecule sequence into a sequence encoding model for sequence encoding to obtain a sequence representation of the unknown biomolecule; A sequence search module, for calculating similarity between the unknown biomolecule sequence representation and each candidate vector in the candidate vector set for different candidate vector sets in the biomolecule sequence vector database, to obtain sequence similarity corresponding to each candidate vector in the different candidate vector sets, wherein the sequence lengths of the candidate biomolecule sequences corresponding to each candidate vector in the candidate vector set are the same; a representation search module, configured to sort the candidate vectors in each candidate vector set in descending order of similarity according to the sequence similarity corresponding to each candidate vector in the different candidate vector sets, obtain a similar sequence sorting corresponding to each candidate vector set, and select a preset number of target candidate vectors from each candidate vector set in turn as known biomolecule sequence representations according to the descending order of the similar sequence sorting; The homology determination module is used to screen out homologous biomolecule sequences corresponding to the unknown biomolecule sequence from known biomolecule sequences corresponding to multiple known biomolecule sequence representations.
15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the biomolecule sequence search according to any one of claims 1 to 13 is implemented.
16. A computer device, characterized in that: include: Memory; A processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the biomolecule sequence search according to any one of claims 1 to 13 is implemented.
17. A computer program product comprising a computer program or computer instructions, characterized in that When the computer program or computer instruction is executed by a processor, the biomolecule sequence search according to any one of claims 1 to 13 is implemented.
Citation Information
Patent Citations
Protein sequence alignment method and apparatus, and server and storage medium
WO2023116816A1