Prediction model training method and device, electronic equipment, medium and program product

Through genome-wide sequence pre-training and fine-tuning training technology, the accuracy of DNA methylation status prediction is improved, the problems of high error rate and experimental complexity in the existing technology are solved, and efficient and accurate methylation status detection is achieved .

CN119049562APending Publication Date: 2024-11-29TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411162345.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-22
Publication Date
2024-11-29

AI Technical Summary

Technical Problem

The prior art has high error rates and complex experimental processes when detecting DNA methylation states, making it difficult to effectively improve the accuracy of methylation state prediction.

Method used

Through a pre-training model based on genome-wide sequences, sequences within the pre-configured window range of the target dinucleotide site are extracted, the actual methylation status is marked, and fine-tuning training is used to improve the accuracy of the prediction model, reducing data complexity and Computing resource requirements.

Benefits of technology

It significantly improves the prediction accuracy of methylation status of genolocal sites, simplifies data processing flow, reduces experimental complexity and cost, and is suitable for the detection of complex biological samples.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119049562A_ABST
    Figure CN119049562A_ABST
Patent Text Reader

Abstract

The invention provides a prediction model training method and device, electronic equipment, a medium and a program product. The method comprises the following steps: pre-training an initialized first prediction model based on a first training data set to obtain a second prediction model; extracting a target dinucleotide site from each first sample whole genome sequence, and extracting a second sample whole genome sequence containing the target dinucleotide site in a pre-configuration window range; labeling an actual methylation state for a target dinucleotide site in each second sample whole genome sequence; combining each labeled second sample whole genome sequence into a second training data set; the second prediction model is trained based on the second training data set, a trained third prediction model is obtained, and the third prediction model is used for predicting the methylation state of the dinucleotide sites in the whole genome sequence to be detected. Through the application, the accuracy of predicting the methylation state of the gene locus can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to artificial intelligence technology, and in particular to a prediction model training method, device, electronic device, medium and program product. Background Art

[0002] Methylation refers to the process of catalytically transferring methyl groups from active methyl compounds to other compounds, mainly involving the addition of methyl groups (-CH3) to deoxyribonucleic acid (DNA) molecules, usually occurring at the 5th position of the carbon atom of cytosine. Abnormal methylation status is closely related to a variety of diseases, such as cancer and neurological diseases. By detecting the methylation status of dinucleotide sites (CpG dinucleotide sites) in DNA, we can gain a deep understanding of the gene expression regulation mechanism and explore the epigenetic causes of diseases.

[0003] The methylation status detection of related technologies mainly relies on methylation-specific experiments, which require complex experimental processes and high sequencing costs. At the same time, due to the existence of noise and technical deviations, related technologies may have a high error rate when processing complex biological samples. In related technologies, there is currently no better way to improve the accuracy of methylation status prediction. Summary of the invention

[0004] The embodiments of the present application provide a prediction model training method, device, electronic device, computer-readable storage medium and computer program product, which can improve the accuracy of predicting the methylation status of gene sites.

[0005] The technical solution of the embodiment of the present application is implemented as follows:

[0006] The present application provides a prediction model training method, the method comprising:

[0007] Pre-training the initialized first prediction model based on a first training data set to obtain a second prediction model, wherein the first training data set includes a plurality of first sample whole genome sequences;

[0008] Extracting a target dinucleotide site from each of the first sample whole genome sequences, and using a sequence within a preconfigured window containing the target dinucleotide site as a second sample whole genome sequence;

[0009] Annotating the actual methylation status of each target dinucleotide site in the whole genome sequence of the second sample to obtain an annotated whole genome sequence of the second sample;

[0010] Combining each of the annotated second sample whole genome sequences into a second training data set;

[0011] The second prediction model is trained based on the second training data set to obtain a trained third prediction model, wherein the third prediction model is used to predict the methylation status of dinucleotide sites in the whole genome sequence to be detected.

[0012] The present application provides a prediction model training device, including:

[0013] A pre-training module, used to pre-train the initialized first prediction model based on a first training data set to obtain a second prediction model, wherein the first training data set includes a plurality of first sample whole genome sequences;

[0014] A sample acquisition module, used for extracting a target dinucleotide site from each of the first sample whole genome sequences, and using a sequence within a preconfigured window containing the target dinucleotide site as a second sample whole genome sequence;

[0015] The sample acquisition module is used to annotate the actual methylation status of each target dinucleotide site in the whole genome sequence of the second sample to obtain the annotated whole genome sequence of the second sample;

[0016] The sample acquisition module is used to combine each of the annotated second sample whole genome sequences into a second training data set;

[0017] A fine-tuning training module is used to train the second prediction model based on the second training data set to obtain a trained third prediction model, wherein the third prediction model is used to predict the methylation status of dinucleotide sites in the whole genome sequence to be detected.

[0018] An embodiment of the present application provides an electronic device, the electronic device comprising:

[0019] A memory for storing computer executable instructions or computer programs;

[0020] The processor is used to implement the training method of the prediction model provided in the embodiment of the present application when executing the computer executable instructions or computer program stored in the memory.

[0021] An embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions or a computer program, which is used to implement the training method of the prediction model provided in the embodiment of the present application when executed by a processor.

[0022] An embodiment of the present application provides a computer program product, including a computer program or computer executable instructions. When the computer program or computer executable instructions are executed by a processor, the training method of the prediction model provided in the embodiment of the present application is implemented.

[0023] The embodiments of the present application have the following beneficial effects:

[0024] Through pre-training, the prediction model can learn the relevant features in the whole genome sequence. In the training phase, the whole genome sequence within a specific range is used for targeted training to improve the accuracy of the prediction model in predicting the methylation status. By training the prediction model of the methylation status; by limiting the scope of the training data, the data complexity is reduced, the training efficiency is improved, and the computing resources required for the training process are saved; the genome sequence to be tested is tested by the trained prediction model. Compared with the methylation status detection of related technologies, there is no need to perform complex experiments, which avoids the noise and interference mixed in the experimental process, and improves the efficiency and accuracy of the methylation status detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 It is a schematic diagram of an application mode of the training method of the prediction model provided in the embodiment of the present application;

[0026] Figure 2 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0027] Figure 3A It is a first flow chart of the training method of the prediction model provided in the embodiment of the present application;

[0028] Figure 3B It is a second flow chart of the training method of the prediction model provided in the embodiment of the present application;

[0029] Figure 3C It is a third flow chart of the training method of the prediction model provided in the embodiment of the present application;

[0030] Figure 3D It is a fourth flow chart of the training method of the prediction model provided in the embodiment of the present application;

[0031] Figure 3E It is a fifth flow chart of the training method of the prediction model provided in the embodiment of the present application;

[0032] Figure 4 is a first structural diagram of the prediction model provided in an embodiment of the present application;

[0033] Figure 5 It is a sixth flow chart of the training method of the prediction model provided in the embodiment of the present application;

[0034] Fig. 6A It is a schematic diagram of the first training principle provided by an embodiment of the present application;

[0035] Figure 6B is a schematic diagram of a second training principle provided in an embodiment of the present application;

[0036] Figure 6C is a second structural diagram of the prediction model provided in the embodiment of the present application;

[0037] Fig.6D It is a schematic diagram of the data flow of the prediction model provided in the embodiment of the present application.

[0038] It should be pointed out that the above-mentioned "first" and "second" are only used to distinguish different solutions, and do not represent the degree of superiority or inferiority of the solutions or the priority in the implementation process. DETAILED DESCRIPTION

[0039] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.

[0040] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0041] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0042] In this application, the biometric feature (for example: DNA sequence, biological sample) identification technology involved, when the above embodiments of this application are applied to specific products or technologies, the relevant data collection, use and processing processes should comply with relevant laws and regulations. Before collecting biometric features, the information processing rules should be informed and the target object’s separate consent should be sought. The biometric features should be processed in strict accordance with the requirements of laws and regulations and the personal information processing rules, and technical measures should be taken to ensure the security of relevant data.

[0043] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together 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.

[0044] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0045] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.

[0046] 1) Deoxyribonucleic Acid (DNA): It is an important molecule in cells that carries the genetic information of organisms. It is referred to as DNA below. DNA consists of two long chains that are intertwined in the form of a double helix. Each long chain is composed of many small nucleotide units, and each nucleotide unit contains a phosphate group, a sugar (deoxyribose) and a nitrogenous base. There are four types of nitrogenous bases in DNA: adenine (A), thymine (T), cytosine (C) and guanine (G). At the corresponding positions of the two long chains, adenine always pairs with thymine, and cytosine always pairs with guanine. These base pairs are connected to each other through hydrogen bonds to form the double helix structure of DNA.

[0047] 2) Cytosine: Its scientific name is 4-amino-2-carbonylpyrimidine. It is an organic substance with the molecular formula C4H5N3O. It is one of the main base components in nucleic acids (DNA and RNA).

[0048] 3) CpG dinucleotide sites: a special DNA sequence, also known as CpG site, or CG site for short, in which the base sequence is cytosine (C) and guanine (G), which are connected by a phosphodiester bond.

[0049] 4) Methyl group: A chemical group with the chemical formula -CH3 ("-" represents a single electron), abbreviated as -Me, composed of carbon and hydrogen elements, and the electrically neutral monovalent group left after removing a hydrogen atom from the methane molecule. Methyl, as a chemical group, often appears in various organic compounds and is the most common group. It can bind to certain specific sites on DNA. The process of methyl binding to DNA is called methylation, and conversely, the process of detaching from the compound is called demethylation.

[0050] 5) Methylation: refers to the process of catalytically transferring methyl groups from active methyl compounds to other compounds. The methylation process can form various methyl compounds, or chemically modify certain proteins or nucleic acids to form methylated products. In biological systems, methylation is catalyzed by enzymes. This methylation involves heavy metal modification, regulation of gene expression, regulation of protein function, and RNA processing. DNA methylation is a form of DNA chemical modification that can change genetic expression without changing the DNA sequence. The so-called DNA methylation refers to the covalent bond of a methyl group to the carbon position 5 of cytosine in the genomic dinucleotide (CpG) under the action of DNA methyltransferase. The methylation state includes many types: 1. Unmethylated: Cytosine (C) does not have a methyl group (-CH3) added to the fifth carbon atom, that is, the original CG site. 2. Partially methylated: Cytosine (C) partially adds a methyl group (-CH3) to the fifth carbon atom, that is, part of the CG site is converted to 5-methylcytosine (mC). 3. Completely methylated: Cytosine (C) completely adds a methyl group (-CH3) to the fifth carbon atom, that is, the CG site is completely converted to 5-methylcytosine (mC). 4. Hypermethylation: Cytosine (C) adds too many methyl groups (-CH3) to the fifth carbon atom, resulting in a methylation level at the CG site that exceeds the normal level. 5. Demethylation: Cytosine (C) reduces or completely removes the methyl group (-CH3) on the fifth carbon atom, resulting in a methylation level at the CG site that is lower than the normal level.

[0051] 6) Whole Genome Sequencing (WGS): It is a high-throughput sequencing technology used to obtain and study the entire genetic information of an organism, hereinafter referred to as WGS. Through WGS, the base sequences of all genes, non-coding sequences and mitochondrial DNA of an organism can be determined.

[0052] 7) Whole-genome bisulfite methylation sequencing (WGBS): A sequencing technology used to detect the methylation status of DNA across the entire genome. Bisulfite treatment is used to convert unmethylated cytosine (C) to uracil (U), while methylated cytosine (G) remains unchanged. The treated DNA is amplified and sequenced by polymerase chain reaction (PCR). By performing bioinformatics analysis on the original sequencing data, the methylation status of individual C bases across the entire genome can be reconstructed.

[0053] 8) Transformer model: The model is a deep neural network model based on the self-attention mechanism, which is widely used in various tasks in the field of natural language processing, such as text classification, machine translation, and question-answering systems. The model can convert input sequences into output sequences while retaining important information in the input sequence. Since the transformer model performs well in processing long texts, it has been widely used in the field of Chinese natural language processing. Compared with traditional recurrent neural networks (RNNs) and convolutional neural networks (CNNs), the transformer model can be calculated in parallel to speed up training. It is widely used in tasks such as natural language processing, speech recognition, and image generation.

[0054] In the related technology, methylation is an epigenetic modification phenomenon, which mainly involves adding a methyl group (-CH3) to the DNA molecule, usually occurring at the 5th position of the carbon atom of cytosine. Abnormal methylation status is closely related to a variety of diseases, such as cancer, neurological diseases, etc. The related technology determines the methylation status through the whole-genome bisulfite methylation sequencing method, but the data processing is complex when the experiment is running. Due to the existence of noise and technical deviations, the whole-genome bisulfite methylation sequencing method may have a higher error rate when processing complex biological samples.

[0055] The embodiments of the present application provide a prediction model training method, a prediction model training device, an electronic device, a computer-readable storage medium, and a computer program product, which can improve the accuracy of predicting the methylation status of gene sites.

[0056] The following describes an exemplary application of the electronic device provided in the embodiments of the present application. The electronic device provided in the embodiments of the present application can be implemented as a terminal device, such as a laptop computer, a tablet computer, a desktop computer, a set-top box, a smart TV, a vehicle terminal, a virtual reality (VR) device, an augmented reality (AR) device, and other types of terminals, and can also be implemented as a server. The following describes an exemplary application when the electronic device is implemented as a terminal device or a server.

[0057] refer to Figure 1 , Figure 1 Schematic diagram of the application mode of the training method of the prediction model provided in the embodiment of the present application; for example, Figure 1 The invention involves a server 200, a network 300, a terminal device 400, and a database 500. The terminal device 400 is connected to the server 200 via the network 300, and the network 300 can be a wide area network or a local area network, or a combination of the two.

[0058] For example, the user may be a technician, the terminal device 400 may be a computer used by the technician, the server 200 may be a server of a data processing platform, and the database 500 may store a large amount of genomic data.

[0059] For example, the user sends a training request to the server 200 through the terminal device 400, and the server 200 extracts the genome data corresponding to the training request from the database 500 according to the training request. The server 200 calls the training method of the prediction model provided in the embodiment of the present application to train the prediction model to obtain a trained prediction model, and the trained prediction model is stored in the server 200. When the user sends the genome data to be detected through the terminal device 400, or the terminal device 400 sends a detection request to the server 200, the server 200 extracts the genome data to be detected in the database 500 based on the data identifier carried by the detection request, and the server 200 performs prediction processing on the genome data to be detected through the trained prediction model, obtains the methylation status of the dinucleotide site in the genome data to be detected, and sends the data related to the methylation status to the terminal device 400. The technician can perform relevant analysis according to the methylation status of the genome data to be detected.

[0060] In some embodiments, the prediction model training method of the embodiment of the present application can also be applied in the following application scenarios:

[0061] 1. Diagnosis of diseases, predicting the methylation status of gene sites related to diseases can help scientists understand the pathogenesis of diseases, find biomarkers of diseases, and develop new treatments. The prediction model is trained by the training method of the prediction model provided in the embodiment of the present application. The prediction model is used to predict the DNA sequence in the patient's blood sample to obtain the methylation status of the dinucleotide sites in the DNA sequence. Researchers can diagnose whether the patient has a related disease based on the position of the dinucleotide sites in the DNA sequence and the methylation status of the dinucleotide sites.

[0062] 2. Drug development: In the process of drug development, predicting the methylation status of drug targets can help optimize drug design and improve drug efficacy. The prediction model is trained by the prediction model training method provided in the embodiment of the present application, and the prediction model is used to predict and process the data of biological macromolecules to obtain the methylation status of the target specifically acted by drugs, therapeutic proteins or other intervention measures on the biological macromolecules. Then, researchers can design drug molecules that are easy to bind to the target according to the methylation status of the target.

[0063] In some embodiments, the server 200 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. For example, the server 200 may be a server cluster or distributed system composed of a training server and a data prediction server. The training server is used to train the prediction model. When the trained prediction model is obtained, the training server sends the trained prediction model to the data prediction server. The data prediction server is used to perform prediction processing on the gene sequence to be detected based on the stored prediction model to obtain the methylation status of the dinucleotide site in the gene sequence.

[0064] In some embodiments, the server 200 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. The terminal and the server may be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiments of the present application.

[0065] The embodiments of the present application can be implemented through database technology. In short, a database can be regarded as an electronic file cabinet where electronic files are stored. Users can add, query, update, delete, etc. data in the files. The so-called "database" is a collection of data that is stored together in a certain way, can be shared with multiple users, has as little redundancy as possible, and is independent of the application program.

[0066] A database management system (DBMS) is a computer software system designed for managing databases. It generally has basic functions such as storage, retrieval, security, and backup. Database management systems can be classified according to the database model they support, such as relational, XML (Extensible Markup Language); or according to the type of computer they support, such as server clusters, mobile phones; or according to the query language used, such as Structured Query Language (SQL), XQuery; or according to performance focus, such as maximum scale, maximum operating speed; or other classification methods. Regardless of the classification method used, some DBMS can cross categories, for example, supporting multiple query languages ​​at the same time.

[0067] See also Figure 2 , Figure 2 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device may be Figure 1 Server 200, Figure 2 The server 200 shown includes: at least one processor 410, a memory 450, and at least one network interface 420. The various components in the server 200 are coupled together via a bus system 440. It is understood that the bus system 440 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 440 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, the bus system 440 is not described in detail. Figure 2 Various buses are labeled as bus system 440 .

[0068] Processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.

[0069] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, etc. The memory 450 may optionally include one or more storage devices that are physically remote from the processor 410.

[0070] The memory 450 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 450 described in the embodiments of the present application is intended to include any suitable type of memory.

[0071] In some embodiments, memory 450 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.

[0072] Operating system 451, including system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;

[0073] A network communication module 452, used to reach other electronic devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 include: Bluetooth, Wireless Compatibility Certification (WiFi), and Universal Serial Bus (USB), etc.;

[0074] In some embodiments, the device provided in the embodiments of the present application can be implemented in software. Figure 2 A training device 455 of a prediction model stored in a memory 450 is shown, which may be software in the form of a program and a plug-in, etc., and includes the following software modules: a pre-training module 4551, a sample acquisition module 4552, and a fine-tuning training module 4553. These modules are logical, and therefore may be arbitrarily combined or further split according to the functions implemented. The functions of each module will be described below.

[0075] In some embodiments, the terminal device or server can implement the training method of the prediction model provided by the embodiment of the present application by running a computer program. For example, a computer executable instruction can be a command, a machine instruction or a software instruction at a microprogram level. A computer program can be a native program or a software module in an operating system; it can be a local (Native) application (APPlication, APP), that is, a program that needs to be installed in the operating system to run, such as an instant messaging APP; it can also be a small program that can be embedded in any APP, that is, a program that can be run only by downloading it to a browser environment. In short, the above-mentioned computer executable instructions can be instructions in any form, and the above-mentioned computer program can be an application, module or plug-in in any form.

[0076] The training method of the prediction model provided in the embodiment of the present application will be explained in combination with the exemplary application and implementation of the server or terminal device provided in the embodiment of the present application.

[0077] The following describes the training method of the prediction model provided in the embodiment of the present application. As mentioned above, the electronic device that implements the training method of the prediction model in the embodiment of the present application can be a terminal device or a server, or a combination of the two. Therefore, the execution subject of each step will not be repeatedly described below.

[0078] It should be noted that in the example of methylation status prediction processing below, the data of the whole gene sequence is used as an example. Based on the understanding of the following text, those skilled in the art can apply the training method of the prediction model provided in the embodiment of the present application to the processing of other types of gene data, such as: RNA sequencing data (RNA-seq), chromatin immunoprecipitation sequencing data (ChIP-seq).

[0079] See also Figure 3A , Figure 3A is a flow chart of the training method of the prediction model provided in the embodiment of the present application, which will be combined with Figure 3A The steps shown are explained. Figure 3A The execution entity of the step is Figure 1 Server 200 in.

[0080] For ease of understanding, the application scenario of the training method of the prediction model of the present application embodiment is explained.Methyl is a chemical group that can be combined with certain specific sites on DNA. Methylation refers to the process of catalytic transfer of methyl to other compounds from active methyl compounds, and methylation states include unmethylated, partially methylated, completely methylated, overmethylated and demethylated.Dinucleotide sites (CG sites) include cytosine (C) and guanine (G), which are components of deoxyribonucleic acid (DNA). DNA methylation refers to covalent bonding of a methyl group at the carbon position 5 of cytosine of a genomic dinucleotide (CpG) under the action of DNA methyltransferase.In the present application embodiment, the methylation state of the dinucleotide site is divided into unmethylated and in a methylated state, wherein, being in a methylated state includes partially methylated, completely methylated, overmethylated and demethylated.Based on the above-mentioned scenario, the training method of the prediction model provided by the present application embodiment is explained below.

[0081] In step 301, an initialized first prediction model is pre-trained based on a first training data set to obtain a second prediction model.

[0082] Here, the first training data set includes a plurality of first sample whole genome sequences.

[0083] For example, the first prediction model includes an embedding layer, a converter block, and a prediction head. The first prediction model, the second prediction model, and the third prediction model below have the same structure. "First, second, and third" are names used to distinguish different stages of the same model. The whole genome sequence is the entire genetic information of an organism obtained by whole genome sequencing (WGS) of DNA. The source of DNA can be a biological sample, such as a blood sample or a hair sample.

[0084] For example, the pre-training process is used to train the first prediction model to extract features from the whole genome sequence of the first sample to obtain the second prediction model, and the pre-training process can be performed in the form of self-supervised training. Self-supervised training is a machine learning training method that does not rely on external labeled data for learning. In self-supervised training, the model acquires knowledge by learning the intrinsic structure and pattern of the input data and automatically generates a supervision signal.

[0085] In some embodiments, before step 301, a real whole genome sequence and a reference whole genome sequence are obtained to construct a first training data set. The first training data set can be obtained in the following manner: performing whole genome sequencing on a biological sample to obtain multiple real whole genome sequences; using a preconfigured reference whole genome sequence and multiple real whole genome sequences as a first sample whole genome sequence; and combining multiple first sample whole genome sequences into a first training data set.

[0086] For example, biological samples are blood samples collected in cancer screening. In actual application scenarios, biological samples are collected with the consent of the subjects from whom the biological samples are collected and the source is legal. The reference whole genome sequence can be an artificially edited whole genome sequence or a sequenced whole genome sequence. The number of reference whole genome sequences is at least one.

[0087] For ease of understanding, the following is an example of a whole genome sequence, "......AACAACGGTAGATCAGGATTAGA......", because DNA is composed of two long chains, which are intertwined in the form of a double helix. There are four types of nitrogenous bases in DNA: adenine (A), thymine (T), cytosine (C), and guanine (G). At the corresponding positions of the two long chains, adenine always pairs with thymine, and cytosine always pairs with guanine. Therefore, it is only necessary to determine the base arrangement of one long chain of DNA to determine the base arrangement in the other long chain of DNA.

[0088] Whole genome sequencing can be achieved by: using a specific method to fragment the extracted DNA and prepare it into text data for sequencing, using a high-throughput sequencing platform (such as Illumina or SOLiD) to sequence the constructed text data to obtain a large number of short fragment sequencing reads, processing, aligning, variant detection and annotation of the raw data obtained by sequencing, obtaining the bases and base arrangement order in the genome sequence to reconstruct the entire genome sequence. The above process usually involves complex bioinformatics analysis processes, including: quality control, mapping, assembly, variant detection and functional annotation.

[0089] In some embodiments, a self-supervised training method is used, referring to Figure 3B , Figure 3B is a second flow chart of the prediction model training method provided in the embodiment of the present application. Step 301 can be performed by Figure 3B Steps 3011 to 3013 in are implemented as described in detail below.

[0090] In step 3011, a first prediction model is called to perform feature extraction processing based on the first training data set to obtain a first feature vector of the whole genome sequence of each first sample.

[0091] For example, the first prediction model includes an embedding layer, which is used to map each first sample whole genome sequence into a feature vector in the form of a word unit embedding vector. For example: the data corresponding to the base of each site in the first sample whole genome sequence is mapped into a word unit representation, and the word unit representation corresponding to each site is sequentially combined to obtain a first feature vector.

[0092] In step 3012, a first loss function of the first prediction model is determined based on the plurality of first feature vectors.

[0093] For example, in self-supervised training, the first loss function is a function used to measure the similarity between feature vectors of samples with the same content and the similarity between feature vectors of samples with different contents. During the self-supervised training process, the goal is to increase the similarity between samples with the same content and reduce the similarity between samples with different contents.

[0094] In some embodiments, step 3012 can be implemented in the following manner: for each first sample whole genome sequence, perform the following processing: determine the first similarity and the second similarity corresponding to the first sample whole genome sequence respectively, wherein the first similarity is the similarity between the first feature vectors of two first sample whole genome sequences with the same base sequence, and the second similarity is the similarity between the first feature vectors of two first sample whole genome sequences with different base sequences; use the first ratio between the first similarity and the first sum as the first sub-loss function corresponding to the first sample whole genome sequence, wherein the first sum is the sum of the first similarity and the second similarity; use the mean of each first sub-loss function as the first loss function of the first prediction model.

[0095] For example, assuming that the first sample whole genome sequence i is any one of all the first sample whole genome sequences, obtain the first sample whole genome sequence j with the same base sequence as the first sample whole genome sequence i, and the first sample whole genome sequence 1 with a base sequence different from the first sample whole genome sequence i. Obtain the first similarity and the second similarity respectively, and the first similarity and the second similarity can be the cosine similarity between the feature vectors. The first ratio can be represented by the following formula: first similarity / (first similarity+second similarity).

[0096] For example, the loss function used in self-supervised training can be contrastive loss or information regularization loss. Contrastive Loss is a loss function used for self-supervised learning, which aims to learn a model that can distinguish positive sample pairs (i.e. related samples) from each other, while bringing negative sample pairs (i.e. unrelated samples) closer to each other. The application of contrastive loss in NLP is usually to learn embedded representations of text, which can be used for subsequent tasks such as text classification, information retrieval, etc.

[0097] Information Regularization Loss is a loss function widely used in self-supervised learning, especially in the setting of contrastive learning. The purpose of information regularization loss is to let the model learn to distinguish between positive sample pairs (similar samples) and negative sample pairs (dissimilar samples), while punishing the model for judging the high similarity of positive sample pairs to avoid overfitting.

[0098] In step 3013, the first prediction model is iteratively parameter updated based on the first loss function to obtain a second prediction model.

[0099] For example, the second prediction model is used to extract the feature vector of the whole genome sequence to be detected. The number of iterations and the learning rate used in the parameter update can be set according to the actual application scenario. The parameter update processing method is back propagation processing.

[0100] In the embodiment of the present application, the pre-training process is realized by self-supervised training, and the pre-training process can be completed without manual or machine additional labeling of sample data. Since the data used in self-supervised training is not labeled, the model needs to learn to automatically extract useful feature representations from the data, which helps to reduce the risk of overfitting. Allowing the prediction model to learn richer feature representations helps to improve the generalization ability of the prediction model.

[0101] In some embodiments, the first sample whole genome sequence includes a plurality of dinucleotide sites; Figure 3D , Figure 3D is a fourth flow chart of the prediction model training method provided in the embodiment of the present application. Before step 302, Figure 3D Steps 3061 to 3062 determine the actual methylation status of each dinucleotide site, as described in detail below.

[0102] In step 3061, each first sample whole genome sequence is subjected to bisulfite treatment to obtain a processed first sample whole genome sequence.

[0103] Here, the processed whole genome sequence of the first sample includes multiple processed dinucleotide sites.

[0104] For example, whole genome bisulfite methylation sequencing is a method for determining the methylation status of DNA, the principle of which is to convert unmethylated cytosine (C) into uracil (U) through bisulfite treatment. After bisulfite treatment, the methylated dinucleotide sites in the original DNA will appear as GpG, while the unmethylated dinucleotide sites will appear as CpG or UpG.

[0105] In step 3062, the actual methylation state of each dinucleotide site is determined based on the dinucleotide sites before processing and the corresponding dinucleotide sites after processing.

[0106] For example, based on the principle of bisulfite treatment, the dinucleotide sites before and after the treatment can be compared to determine whether the original dinucleotide sites have a methylation status.

[0107] In some embodiments, step 3062 can be implemented in the following manner: for each first sample whole genome sequence, the dinucleotide site before processing is compared with the (corresponding) dinucleotide site after processing to obtain a comparison result corresponding to each dinucleotide site; when the comparison result is that the cytosine at the dinucleotide site is converted to uracil, or is not converted, the methylation state of the dinucleotide site is determined to be unmethylated; when the comparison result is that the cytosine at the dinucleotide site is converted to guanine, the methylation state of the dinucleotide site is determined to be methylated; for each dinucleotide site, based on the second ratio between the number of methylation of the dinucleotide site and the total number of occurrences, the actual methylation state of the dinucleotide site is characterized, wherein the second ratio is the probability of methylation of the dinucleotide site.

[0108] For example, since individual data is not generalizable, the results of multiple bisulfite treatments of the same dinucleotide site are counted, and the number of methylated sites and the number of unmethylated sites are counted based on the comparison results. The total number of occurrences of the dinucleotide site at the same position is the sum of the number of methylated sites and the number of unmethylated sites. The formula for calculating the second ratio is represented by the following form: Among them, M count is the methylation number, NM count is the number of non-methylated residues.

[0109] In the embodiment of the present application, the actual methylation state is determined by experiment, which provides more accurate annotation data for subsequent training to improve the accuracy of training. The methylation state is determined by multiple data and characterized by probability, which avoids the singleness of the data and improves the reliability of the training data.

[0110] Continue to refer Figure 3A In step 302, the target dinucleotide site is extracted from each first sample whole genome sequence, and the sequence within the preconfigured window range containing the target dinucleotide site is used as the second sample whole genome sequence.

[0111] For example, the whole genome sequence of the second sample is a whole genome sequence cut from the complete whole genome sequence of the first sample based on the target dinucleotide site as the reference site. The range of the cut is the preconfigured window range, and the preconfigured window range can be determined according to the actual scenario.

[0112] In some implementations, the first sample whole genome sequence includes a plurality of dinucleotide sites; Figure 3C , Figure 3C is a third flow chart of the prediction model training method provided in the embodiment of the present application. Step 302 can be performed by Figure 3C Steps 3021 to 3022 in are implemented as described in detail below.

[0113] In step 3021, for each first sample whole genome sequence, the following processing is performed: extracting target dinucleotide sites from multiple dinucleotide sites in the first sample whole genome sequence.

[0114] For example, the dinucleotide sites are obtained by whole genome sequencing, which has been described above and will not be repeated here. The target dinucleotide site can be at least one of the multiple dinucleotide sites, or all of them.

[0115] In step 3022, the target dinucleotide site is used as a reference site, and a sequence within a preconfigured window range is intercepted from the first sample whole genome sequence to serve as the second sample whole genome sequence.

[0116] Here, the reference site is located at any of the following positions in the preconfigured window range: a boundary in the preconfigured window range, or an interior of the preconfigured window range.

[0117] For example, the target dinucleotide site is at a certain position in the whole genome sequence of the first sample. A sequence with a window width W is intercepted from the whole genome sequence of the first sample with the position as the center as the second sample whole genome sequence.

[0118] In the embodiment of the present application, by limiting the length of the training sample, it is possible to save the computing resources consumed in the training process, and to enhance the pertinence of the prediction processing of the prediction model. By limiting the window width, the amount of data that the prediction model needs to process can be reduced, thereby speeding up the training process and improving efficiency. Suitable window width can help the prediction model find a balance between remembering the pattern in the genome sequence and generalizing to new data.

[0119] Continue to refer Figure 3A In step 303, the actual methylation status of each target dinucleotide site in the whole genome sequence of the second sample is annotated to obtain the annotated whole genome sequence of the second sample.

[0120] For example, the method for obtaining the actual methylation state has been described in step 3061 to step 3062 above, and will not be repeated here. For each second sample whole genome sequence, the position of the target dinucleotide site in the second sample whole genome sequence is marked, and the actual methylation state of the target dinucleotide site is marked. The actual methylation state is represented by a numerical value, and the value range is 0 to 1. The closer to 1, the more likely the target dinucleotide site is in a methylated state.

[0121] In step 304, each annotated second sample whole genome sequence is combined into a second training data set.

[0122] For example, for the actual methylation state annotated for each target dinucleotide site, the actual methylation state and the whole genome sequence of the second sample are combined into a second training data set.

[0123] In some embodiments, the second training data set is a training set (TrainingSet) of the second prediction model, and a validation set (ValidationSet) and a test set (Test Set) of the second prediction model can also be made based on the real data corresponding to the first training data set. Among them, the validation set is a data set used to adjust the model hyperparameters and evaluate the model performance. The test set is a data set used to evaluate the performance of the trained model. After the model training is completed, the test set is used to verify the generalization ability of the model to unknown data. The performance of the model on the test set can help evaluate the accuracy and performance of the model.

[0124] In step 305, the second prediction model is trained based on the second training data set to obtain a trained third prediction model.

[0125] Here, the third prediction model is used to predict the methylation status of dinucleotide sites in the whole genome sequence to be tested.

[0126] For example, the training process is used to train the second prediction model for the methylation state function of the dinucleotide sites in the whole genome sequence to be detected. The training process can be performed iteratively, and the loss function used can be a cross entropy loss or a binary classification loss.

[0127] In some implementations, reference Figure 3E , Figure 3E is a fifth flow chart of the prediction model training method provided in the embodiment of the present application. Step 305 can be performed by Figure 3E Steps 3051 to 3054 in are implemented as described in detail below.

[0128] In step 3051, the second prediction model is called based on the second training data set to perform the following processing: feature extraction processing is performed on each second sample whole genome sequence of the second training data set to obtain a second feature vector for each second sample whole genome sequence.

[0129] For example, the feature extraction process can refer to step 301 above, which will not be described in detail here.

[0130] In step 3052, based on the second feature vector, a first predicted probability that the target dinucleotide site included in the whole genome sequence of the second sample is in a methylated state is determined.

[0131] In some implementations, step 3052 can be implemented in the following manner: performing multiple levels of feature conversion processing on the second feature vector to obtain a converted second feature vector, wherein the feature conversion processing includes feature extraction based on the converter block and column pooling processing; calling the attention mechanism to perform aggregation processing based on the converted second feature vector to obtain global features; performing activation processing based on the global features of the whole genome sequence of the second sample to obtain a first predicted probability that the target dinucleotide site is in a methylated state.

[0132] In some embodiments, the second prediction model includes an embedding layer, a plurality of converter blocks, and a prediction head, wherein the embedding layer is used to perform feature extraction processing on the whole genome sequence, the plurality of converter blocks are used to perform feature conversion processing at multiple levels, and the prediction module is applied to perform aggregation processing and activation processing. The second prediction model, the first prediction model, and the third prediction model are the names of different stages of the same model, and the first prediction model and the third prediction model have the same structure as the second prediction model.

[0133] Example, reference Figure 4 , Figure 4 4 is a first structural diagram of a prediction model provided in an embodiment of the present application. The prediction model 401 includes an embedding layer 402, a converter block 403, and a prediction head 404. The prediction head further integrates global information through a global attention mechanism. The global attention mechanism enhances the semantic understanding ability of the model by calculating the correlation between all positions. The prediction head contains multiple linear layers and activation functions, such as SiLU and Linear, to generate the final result.

[0134] In step 3053, a second loss function of the second prediction model is determined based on the probability corresponding to the actual methylation state of each target dinucleotide site and the first predicted probability.

[0135] For example, the second loss function is the mean of the sub-losses corresponding to each target dinucleotide site, and the sub-losses may be cross entropy loss or binary classification loss. In the embodiment of the present application, binary classification loss is used as an example for explanation.

[0136] In some embodiments, step 3053 can be implemented in the following manner: for each target dinucleotide site, determine the binary classification loss between the probability corresponding to the actual methylation state and the first predicted probability; and use the mean of each binary classification loss as the second loss function of the second prediction model.

[0137] For example, the binary classification loss can be expressed as the following formula (1):

[0138] L = -[ylogy`+(1-y)log(1-y`)]

[0139] Among them, L is the binary classification loss, y is the probability corresponding to the actual methylation state, and y` is the first predicted probability.

[0140] In step 3054, the second prediction model is iteratively parameter updated based on the second loss function to obtain a third prediction model.

[0141] For example, the third prediction model is used to determine the methylation status of dinucleotide sites in the whole genome sequence. The number of iterations and the learning rate used in the parameter update can be set according to the actual application scenario. The parameter update processing method is back propagation processing.

[0142] In the embodiment of the present application, by limiting the scope of training data, data complexity is reduced, training efficiency is improved, and computing resources required for the training process are saved; dividing the training into two stages of pre-training and fine-tuning training can improve the generalization and accuracy of the trained model.

[0143] In some embodiments, after step 305, the following processing is performed: a third training data set is obtained, wherein the third training data set includes: a plurality of third whole genome sequences and sample label probabilities of sample dinucleotide sites corresponding to the third whole genome sequences respectively; a third prediction model is called based on the plurality of third whole genome sequences to perform prediction processing to obtain a second prediction probability of the sample dinucleotide site in each third whole genome sequence being in a methylated state; a first difference between the sample label probability and the second prediction probability (corresponding to the sample dinucleotide site) is determined, and a first number of first differences that are less than a preconfigured difference is determined; in response to the accuracy of the third prediction model being less than the preconfigured accuracy, the third prediction model is used as the second prediction model, and the process proceeds to step 305.

[0144] For example, the accuracy is the ratio between the first number and the total number of dinucleotide sites in the sample. The first difference is less than the preconfigured difference, indicating that the second prediction probability predicted by the third prediction model is close to the sample label probability, and then, the first number of the first difference can be used to characterize the accuracy of the third prediction model. The accuracy is detected by the validation set, and the prediction model is retrained if the accuracy is low. The third training data set and the first training data set are extracted from the same data set at a specific ratio. The specific ratio can be set according to the actual application scenario. The first training data set is used as the training set, and the third training data set is used as the validation set during the training process.

[0145] In some embodiments, after step 305, the following processing is performed: based on the whole genome sequence to be detected, the third prediction model is called to perform the following processing: feature extraction processing is performed on the whole genome sequence to be detected to obtain a fourth feature vector of the whole genome sequence to be detected; based on the fourth feature vector, a third prediction probability is determined that the dinucleotide site to be detected included in the whole genome sequence of the second sample is in a methylated state; in response to the third prediction probability being greater than the preconfigured probability, it is determined that the dinucleotide site to be detected is in a methylated state.

[0146] For example, the preconfigured probability can be set according to the actual application scenario, and the value range of the preconfigured probability is a positive number less than 1. When the third predicted probability is greater than the preconfigured probability, it indicates that the dinucleotide site to be detected is in a methylated state.

[0147] In the embodiments of the present application, the trained model can be used to detect the methylation status of the whole genome sequence. Compared with the scheme of determining the methylation status of the whole genome sequence by experimental means in the related art, there is no need to perform complex experiments, thereby improving the efficiency and accuracy of methylation status detection.

[0148] In some embodiments, the training data used in the training method of the prediction model provided in the embodiments of the present application include but are not limited to RNA sequencing data (RNA-seq), chromatin immunoprecipitation sequencing data (ChIP-seq) and other biological data. By integrating multiple biological data, the prediction model can capture methylation information in the genome from different levels, thereby improving the accuracy and coverage of the prediction.

[0149] In the embodiments of the present application, through pre-training, the prediction model can learn the relevant features in the whole genome sequence. In the training phase, the whole genome sequence within a specific range is used to perform targeted training to improve the accuracy of the prediction model in predicting the methylation state, and the prediction model of the methylation state is trained; by limiting the range of training data, the data complexity is reduced, the training efficiency is improved, and the computing resources required for the training process are saved; the genome sequence to be detected is detected by the trained prediction model. Compared with the methylation state detection of the related technology, there is no need to perform complex experiments, which avoids the noise and interference mixed in the experimental process, and improves the efficiency and accuracy of the methylation state detection.

[0150] The following is an explanation of an exemplary application of the training method of the prediction model of the embodiment of the present application in an actual application scenario.

[0151] Methylation is an epigenetic modification phenomenon that mainly involves the addition of a methyl group (-CH3) to a DNA molecule, usually at the 5th position of the carbon atom of cytosine. Methylation is an important epigenetic regulatory mechanism that has a significant impact on biological processes such as gene expression, gene silencing, genome stability, chromatin structure and development. Abnormal methylation status is closely related to a variety of diseases, such as cancer and neurological diseases. The existing whole-genome bisulfite methylation sequencing method (WGBS) can obtain methylation information across the entire genome. The whole-genome bisulfite methylation sequencing method has high resolution and comprehensive coverage, but the experimental cost is high and the data processing is complex.

[0152] The related technical solutions can be divided into two categories: (1) prediction methods based on the sequence base pair arrangement pattern; (2) prediction methods based on methylation site sequence sequencing.

[0153] For solution (1), prediction methods based on sequence base pair arrangement patterns: This type of method predicts the methylation status by analyzing the base arrangement pattern of the DNA sequence. By analyzing plasma samples from healthy individuals and cancer patients, the fragmentation pattern of cell-free DNA (cfDNA) was analyzed using whole genome sequencing (WGS) and whole genome bisulfite sequencing (WGBS). Studies have found that methylated dinucleotide sites (CpG dinucleotide sites), that is, CG sites, have a higher probability of cleavage at the CGN end and a lower probability of cleavage at the NCG end. Therefore, at highly methylated dinucleotide sites, the CGN / NCG ratio is higher, while at low methylated dinucleotide sites, the CGN / NCG ratio is lower. By analyzing these ratios, the methylation level of the target sequence can be predicted. CGN-end break refers to a break point occurring at a dinucleotide site, that is, the break occurs at the end of cytosine or guanine. This break may affect the methylation status of the dinucleotide site, especially the methylation changes occurring near the break point. NCG end break (non-CpG-end break) refers to the break point occurring at a non-dinucleotide sequence next to the dinucleotide site. This break may not directly affect the methylation status of the dinucleotide site, but it may affect the overall structure and stability of the genomic region where the dinucleotide site is located.

[0154] For solution (2), prediction methods based on methylation site sequence sequencing: This type of method predicts the methylation status by directly sequencing the sequence of methylation sites in DNA samples. By collecting plasma samples from healthy individuals and patients with various types of cancer, whole genome bisulfite sequencing (WGBS) and whole genome sequencing (WGS) were performed on cell-free DNA, and the FinaleMe model was created to predict the methylation status in the cell-free DNA fragment pattern using a non-homogeneous hidden Markov model (NHMM) and a Gaussian mixture model (GMM). The FinaleMe model can accurately predict the methylation status and has verified its predictive ability in multiple cancer types, demonstrating its potential in non-invasive diagnosis of cancer.

[0155] However, the related technologies have the following problems: (1) High experimental complexity and high cost: Related technologies, such as prediction methods based on sequence base pair arrangement patterns and prediction methods based on methylation site sequence sequencing, usually require complex experimental processes and high sequencing costs. In particular, whole genome bisulfite methylation sequencing (WGBS) requires bisulfite treatment of DNA and high-throughput sequencing, which increases experimental complexity and cost. (2) Complex data processing: The sequencing data processing of related technologies requires complex bioinformatics analysis, including data preprocessing, feature extraction, and model training. These steps require not only high-performance computing resources, but also professional bioinformatics knowledge and skills, which limits the popularization and promotion of these technologies in practical applications. (3) Limited prediction accuracy: Related technologies rely on sequence features or specific methylation sites and may not be able to fully capture the changes in methylation status across the genome, resulting in limited prediction accuracy and coverage. In addition, due to the existence of noise and technical bias, existing methods may have a high error rate when processing complex biological samples.

[0156] The embodiment of the present application proposes a method for training a prediction model, which predicts the methylation state of a gene locus by pre-training with whole genome sequencing data (WGS) and fine-tuning with paired whole genome sequencing data and the methylation state of CG sites (dinucleotide sites), and can solve the following problems of related technologies: (1) Reducing experimental complexity and cost: No methylation-specific experiments are required, and only whole genome sequencing data is required to predict the methylation state, which significantly reduces experimental complexity and cost. (2) Simplifying the data processing flow: By utilizing a large genomics model, the data processing flow is simplified, the accuracy and efficiency of the prediction are improved, and the dependence on high-performance computing resources and professional skills is reduced. (3) Improving prediction accuracy and coverage: It can comprehensively capture the changes in methylation states within the genome. By integrating whole genome sequencing data and advanced machine learning techniques, the accuracy and coverage of methylation state prediction are significantly improved, effectively dealing with noise and technical deviations in complex biological samples.

[0157] The following is an explanation of the training method of the prediction model provided in the embodiment of the present application in conjunction with the accompanying drawings. Figure 5 , Figure 5 It is a sixth flow chart of the training method of the prediction model provided in the embodiment of the present application; Figure 5 The executive body is Figure 1 Server 200 in.

[0158] In step 501, a data set of whole genome sequencing data is constructed.

[0159] Example, reference Fig. 6A , Fig. 6A This is a schematic diagram of the first training principle provided in an embodiment of the present application; blood samples are collected from multiple cancer screenings and whole genome sequencing (WGS) is performed to obtain whole genome sequence data of the samples, and the reference sequence (simulated data) is combined with the WGS sequence (real data) of the samples to construct a training data set.

[0160] Fig. 6AThe whole genome sequencing data shown in includes reference data and sample data. The reference data is used as an example for explanation. The content of the reference data is "......AACAACGGTAGATCAGGATTAGA......" DNA is composed of two long chains, which are intertwined in the form of a double helix. There are four types of nitrogenous bases in DNA: adenine (A), thymine (T), cytosine (C) and guanine (G). At the corresponding positions of the two long chains, adenine always pairs with thymine, and cytosine always pairs with guanine. Therefore, only one long chain of DNA needs to be determined to determine the base arrangement in the other long chain of DNA. The reference data and the sample data are both represented in the form of one long chain, and the base arrangement of the other long chain can be determined based on the one long chain shown.

[0161] In some embodiments, bioinformatics methods are used to extract biological features from whole genome sequencing data, such as CG site (dinucleotide site) content, repeat sequences, genomic domains, etc. These features are used as input to train a machine learning model (such as a support vector machine or a random forest model) for methylation state prediction. Existing biological knowledge can be used to improve the interpretability of the prediction.

[0162] In the present application, whole genome sequencing data (WGS) is used to predict the methylation status of gene loci to improve the accuracy of prediction. At the same time, the whole genome sequencing data is tested by the model, and there is no need to perform methylation-specific experiments. Only whole genome sequencing data is needed to predict the methylation status, thereby reducing the complexity and cost of the experiment.

[0163] In step 502, a prediction model is pre-trained based on a data set of whole genome sequencing data to obtain a pre-trained prediction model.

[0164] For example, the training method of the prediction model provided in the embodiment of the present application includes two stages: pretraining and fine-tuning. In the pretraining stage, a large amount of whole genome sequencing (WGS) data (characterized in sequence form) is used to perform preliminary training of the deep learning model to extract potential features and patterns in the genome sequence. In the fine-tuning stage, the model is further trained using specific methylation site data to optimize and improve the accuracy and reliability of methylation state prediction. It aims to reduce experimental complexity and cost while providing an efficient and accurate DNA methylation state prediction solution.

[0165] Continue to refer Fig. 6A, prediction model 601A is a deep learning architecture, and prediction model 601A includes layers such as feed forward, column attention, row attention, and layer normalization. The pre-training method can be self-supervised learning training so that the model can generate a feature vector describing the input genome sequence. During the model training process, the model implicitly learns the depth (Coverage) information of the WGS sequence, the CGN / NCG ratio information of the CG site, the length information of each sequenced fragment, and the sequence information at both ends of the sequenced fragment.

[0166] In some embodiments, the prediction model 601A can be a combination of multiple different types of models, such as a deep learning model, a traditional machine learning model, and a statistical model, to jointly predict the methylation state. Ensemble learning can make full use of the advantages of different models, reduce prediction errors, and improve the stability and accuracy of predictions.

[0167] In step 503, a data set for fine-tuning training is constructed.

[0168] For example, the human reference genome is traversed to obtain the chromosome and location information of all CG sites for subsequent dataset construction. For example, blood samples are collected from multiple cancer screenings and subjected to whole genome sequencing (WGS) and whole genome bisulfite methylation sequencing (WGBS) to identify CG sites in the reference genome. Whole genome sequencing is a technology that can determine the entire DNA sequence of an individual's entire genome, aligning the sequencing reads with the reference genome to determine the nucleotide sequence of each site. Whole genome bisulfite methylation sequencing is a method for determining the methylation state of DNA. Its principle is to convert unmethylated cytosine (C) to uracil (U) through bisulfite treatment and then sequence it. Methylated dinucleotide sites in the original DNA will appear as GpG, while unmethylated dinucleotide sites will appear as CpG or UpG. Afterwards, the methylation state of the dinucleotide site can be determined by sequencing and alignment analysis. By aligning the sequence read from the sequencing with the reference genome, the methylation state of the dinucleotide site is determined based on U (representing that the C on the original dinucleotide site has been converted to U) and G (representing the original GpG site).

[0169] refer to Figure 6B , Figure 6BThis is a schematic diagram of the second training principle provided in the embodiment of the present application. Since the CG sites in each sequence may be characterized by different methylation states, and the individual data are not generalizable, the methylation state of each CG site can be calculated based on multiple detection results, and the reference genome sequence of the CG site within the defined window size W is combined with the whole genome sequencing data to obtain a training sample, and a training data set is constructed, and the training label of the training sample is the methylation state of the CG site in the whole genome bisulfite methylation sequencing result.

[0170] The training dataset can be constructed using the whole genome sequencing results of the CG sites by selecting the hyperparameter window width W (the window width defines the range of the genomic region to be analyzed, and a specific sequence length can be set as the window width according to the actual application scenario) to obtain the whole genome sequencing information around the CG site, and record the corresponding chromosome, position, methylation status and other information. For each CG site, the methylation number and unmethylation number of the CG site in the genome bisulfite methylation sequencing report are used to calculate the methylation status of the site. status The specific calculation method is represented as Among them, M count is the methylation number, NM count is the number of non-methylated residues.

[0171] In some embodiments, the data sets of all samples are merged and divided according to the division criteria to construct a training set (Training Set), a validation set (Validation Set) and a test set (Test Set), where the training set is the first training data set and the second training data set mentioned above, and the validation set is the third training data set mentioned above.

[0172] A training set is a dataset used to train a machine learning model. During training, the model uses the examples in the training set to learn features and patterns in order to make predictions or classifications.

[0173] The validation set is a dataset used to adjust model hyperparameters and evaluate model performance. It is a set of samples set aside during model training. It can be used to adjust model hyperparameters and to make a preliminary assessment of model capabilities. It is usually used to verify the generalization ability (accuracy, recall, etc.) of the current model during iterative model training to decide whether to stop training. In neural networks, validation datasets are used to find the optimal network depth (number of hidden layers), or to determine the stopping point of the backpropagation algorithm or to select the number of hidden layer neurons in the neural network; cross validation (Cross Validation) commonly used in ordinary machine learning is to subdivide the training dataset itself into different validation datasets to train the model.

[0174] The test set is a dataset used to evaluate the performance of a trained model. After the model is trained, the test set is used to verify the model's generalization ability to unknown data. The performance of the model on the test set can help evaluate the accuracy and performance of the model.

[0175] In step 504, the pre-trained prediction model is trained based on the fine-tuning training data set to obtain a trained prediction model.

[0176] For example, the model is fine-tuned using paired whole genome sequencing data and the methylation status of CG sites, focusing on learning and detecting the influence of the position of CG sites in the whole genome sequencing sequence, the sequencing depth of the whole genome sequencing sequence, the break pattern of the whole genome sequencing sequence and other features on the methylation status. The loss function used in the training process can be a cross entropy loss or a binary classification loss. During the model training process, the model implicitly learns the depth (Coverage) information of the whole genome sequencing sequence, the CGN / NCG ratio information of the CG site, the length information of each sequenced fragment, the sequence information at both ends of the sequencing fragment, etc., and uses this information to predict the methylation status of the site.

[0177] For example, the sequencing depth of a whole genome sequencing sequence refers to the average number of times (frequency) each base is detected in the sequencing during the whole genome sequencing process. The calculation of the depth information is usually based on the alignment of the reads generated by the sequencing and the corresponding positions on the reference genome. The total coverage of each site or region can be calculated by adding the number of all reads at the site or region and then dividing it by the number of base pairs at the site or region. For example, there are 100 base pairs on a gene, and a total of 1000 reads cover this region, then the coverage depth of the gene is 10 (1000reads / 100bases). The break pattern of the whole genome sequencing sequence is used to describe structural variations such as large deletions, insertions, inversions or duplications in the genome.

[0178] For ease of understanding, the following explanation is combined with the structure of the prediction model. Figure 6C , Figure 6C It is a second structural schematic diagram of the prediction model provided in the embodiment of the present application. The input of the prediction model is a multiple sequence alignment (MSA) sequence, and the output is the predicted methylation state information, and the complete model structure is divided into 5 parts. The multiple sequence alignment sequence can be provided by a unified sequence model 601C (Unified Sequence Model, USM). The prediction model includes a token embedding module (Token Embedding) 610C, multiple converter blocks (for example: the first converter block 620C and the Nth converter block, N is a positive integer), and a prediction head 630C. The input raw sequence data (MSA / sequence) is processed by the token embedding of the token embedding module 610C, and each token in each sequence is mapped to a high-dimensional vector space, and the converted input data passes through N converter blocks.

[0179] The structure of the converter block is explained by taking the first converter block 620C as an example. According to the data flow direction, the first converter block 620C includes: a root mean square normalization layer 621C, a column pooling layer 622C, a column pooling layer 623C, a root mean square normalization layer 624C, a multi-head attention mechanism 625C, a root mean square normalization layer 626C, and a SwiGLU activation function 627C.

[0180] The root mean square normalization layer 621C is used to perform root mean square normalization (RMS Norm) on the input data, calculate the average of the squared gradient of each feature, and then use this average as a normalized scale factor. When using residual connections, root mean square normalization can better handle differences between different dimensions because it does not depend on a specific network architecture. The root mean square normalization process includes: 1. Calculate the squared gradient of each feature, 2. Calculate the average of the squared gradients of all features 3. Normalization, normalization is a common data preprocessing technique used to convert data to a uniform scale range to eliminate dimensional differences between different variables. Through normalization, data can be mapped to a specific range, such as [0, 1] or [-1, 1].

[0181] In the column pooling layer, the column pooling layer 622C is taken as an example for description, and the column pooling layer 622C includes: a transposer 6221, a multi-head attention mechanism 6222, and a transposer 6223. The column pooling layer is used to reduce the dimension of the data by summarizing the information of each column while retaining important information.

[0182] Multi-head Attention: Calculates the correlation between different parts of the input data. The multi-head attention mechanism includes linear transformation (Linear), attention mechanism, rotational position encoding (Rotary Position Embedding, RoPE), normalization function softmax, and linear transformation. Figure 6C , a multi-head attention mechanism 625C is used to perform processing such as linear transformation 6251, rotational position encoding 6252, rotational position encoding 6253, normalization function 6254, and linear transformation 6255. Among them, rotational position encoding (RoPE) is a method of encoding position information. Absolute position encoding assigns a unique vector to each position, which is simple but does not scale well and cannot effectively capture relative positions; relative position encoding focuses on the distance between tags, enhances the model's understanding of tag relationships, but complicates the model architecture. Rotational position encoding combines the advantages of both. Encode position information in a way that allows the model to understand the absolute position of the tag and its relative distance. This is achieved through a rotation mechanism, where each position in the sequence is represented by a rotation in the embedding space. The benefits of rotational position encoding are its simplicity and efficiency, which enables the model to better grasp the nuances of language syntax and semantics.

[0183] The SwiGLU activation function 627C in the first converter block 620C is used to perform the following processing: linear conversion 6271, linear conversion 6272, activation function 6273, linear conversion 6274. The Sigmoid Gated Linear Unit (SwiGLU) activation function can replace the traditional linear rectification function (ReLU) to increase the expression ability of the model.

[0184] In some embodiments, the converter block also includes: a residual connection module: adds the input data to the transformed data to prevent the gradient from vanishing (the gradient becomes very small) or exploding (the gradient becomes very large). The basic idea of ​​the residual connection is to introduce an additional connection between each layer of the network so that the output of the network can be directly added to the input without going through a nonlinear transformation. In this way, even if the nonlinear transformation causes the gradient to be distorted during the propagation process, the input data itself can be directly passed to the next layer, thereby retaining the gradient information to a certain extent.

[0185] In some embodiments, the transformer block further includes: Layer Normalization (Layer Norm) layer: normalizes the transformed data. Layer Normalization calculates the mean and variance of each feature in each sample, and then normalizes the feature value of each sample to a distribution with a mean of 0 and a standard deviation of 1. Layer Normalization helps stabilize training, especially in deep networks using residual connections, where it can reduce internal covariate shift. Layer Normalization is typically applied to all features of each sample, so it takes into account both rescaling and re-centering invariance.

[0186] The prediction head 630C is used to further integrate global information through the global attention mechanism. The global attention mechanism enhances the semantic understanding ability of the model by calculating the correlation between all positions. The prediction head 630C is also used to perform the final classification or regression task. The prediction head contains multiple linear layers and activation functions, such as SiLU and Linear, to generate the final result. The entire training process optimizes the model parameters through the back propagation algorithm, so that the performance of the model on the training data is gradually improved.

[0187] refer to Fig.6D , Fig.6D This is a schematic diagram of the data flow of the prediction model provided in the embodiment of the present application. The information density of the multiple sequence alignment sequence in the column direction is low, and the column attention mechanism, column pooling operation, and multi-head attention mechanism are sequentially performed on it to obtain the methylation status.

[0188] In some embodiments, when training a prediction model, multiple tasks related to methylation status can be considered simultaneously, such as predicting sequence length, sequence breakpoint characteristics, sequencing depth, etc. By sharing part of the model structure and parameters, multi-task learning can improve the generalization ability of the model on various tasks, thereby improving the accuracy of methylation status prediction.

[0189] Continue to refer Figure 5 In step 505, the gene data to be detected is predicted based on the trained prediction model to obtain the predicted methylation state.

[0190] For example, the trained model can take WGS sequencing data containing CG sites as input and output the predicted value of the methylation status of the site. The predicted value of methylation status is usually a probability value, indicating the probability that a given site is methylated (methylated state) or unmethylated (unmethylated state). For example, a prediction model may output a probability value between 0 and 1, where 0 indicates complete unmethylation and 1 indicates complete methylation.

[0191] For example, in practical applications, the data input into the trained model can also be RNA sequencing data (RNA-seq) and chromatin immunoprecipitation sequencing data (ChIP-seq). Chromatin immunoprecipitation sequencing data (ChIP-seq) is biological data obtained by combining chromatin immunoprecipitation (ChIP) technology with high-throughput sequencing. This technology is mainly used to study the interaction between proteins (transcription factors, histone modification enzymes, etc.) and DNA. By integrating multimodal data, the prediction model can capture methylation information in the genome from different levels, thereby improving the accuracy and coverage of the prediction.

[0192] The embodiments of the present application can be applied in the following application scenarios:

[0193] 1. The prediction of the methylation state of specific gene sites is an important research content of epigenetics and molecular biology. Accurately realizing the prediction of methylation state is conducive to the technical personnel to have a deep understanding of the gene expression regulation mechanism, explore the epigenetic etiology of the disease, and develop corresponding diagnosis and treatment strategies. Predicting the methylation state of disease-related gene sites can help scientists understand the pathogenesis of the disease, find biomarkers of the disease, and develop new treatment methods. In addition, the embodiments of the present application can also be extended to the prediction of other epigenetic markers, such as histone modification state, etc. Histone methylation is one of the key mechanisms for regulating gene expression. Predicting the methylation state of specific gene sites can help scientists understand how genes are activated or silenced, and how these changes affect cell function.

[0194] 2. Drug development: During the drug development process, predicting the methylation status of drug targets can help optimize drug design and improve drug efficacy.

[0195] 3. Tumor research: The prediction of methylation status is of great significance in the research and clinical application of various diseases such as cancer and nervous system diseases. It can not only be used for early screening and diagnosis of diseases, to achieve early intervention and improve cure rates, but also help identify epigenetic markers of specific diseases, and provide a scientific basis for precision medicine and personalized treatment plans. In tumor research, predicting the methylation status of tumor-related genes can help identify potential driver genes and prognostic markers of tumors, and provide guidance for the diagnosis and treatment of tumors.

[0196] The present application embodiment, by using whole genome sequencing data (WGS) for pre-training and using paired whole genome sequencing data and the methylation state of CG sites for fine-tuning, predicts the methylation state of gene sites, with significant beneficial effects. First, there is no need to carry out methylation-specific experiments, only whole genome sequencing data can predict methylation states, significantly reducing experimental complexity and cost. By using the genomics big model to simplify the data processing process, the accuracy and efficiency of prediction are improved. In addition, the methylation state changes within the genome can be fully captured, the accuracy and coverage of prediction are improved, and it is suitable for complex biological samples. It is of great significance in the research and clinical application of various diseases such as cancer and nervous system diseases, and promotes the early screening of diseases and the development of precision medicine. At the same time, it has a wide range of scalability, is not limited to the prediction of methylation states, can also be applied to the prediction of other epigenetic markers, and has broad application prospects.

[0197] The following further describes the exemplary structure of the prediction model training device 455 provided in the embodiment of the present application implemented as a software module. In some embodiments, Figure 2 As shown, the software modules in the prediction model training device 455 stored in the memory 450 may include: a pre-training module 4551, which is used to pre-train the initialized first prediction model based on the first training data set to obtain a second prediction model, wherein the first training data set includes multiple first sample whole genome sequences; a sample acquisition module 4552, which is used to extract target dinucleotide sites from each of the first sample whole genome sequences, and use the sequence within the preconfigured window range containing the target dinucleotide sites as the second sample whole genome sequence; the sample acquisition module 4552, which is used to annotate the actual methylation state of the target dinucleotide sites in each of the second sample whole genome sequences to obtain the annotated second sample whole genome sequence; the sample acquisition module 4552, which is used to combine each of the annotated second sample whole genome sequences into a second training data set; a fine-tuning training module 4553, which is used to train the second prediction model based on the second training data set to obtain a trained third prediction model, wherein the third prediction model is used to predict the methylation state of the dinucleotide sites in the whole genome sequence to be detected.

[0198] In some embodiments, the pre-training module 4551 is used to call the first prediction model to perform feature extraction processing based on the first training data set to obtain a first feature vector of the whole genome sequence of each of the first samples; based on multiple first feature vectors, determine the first loss function of the first prediction model; based on the first loss function, iteratively update the parameters of the first prediction model to obtain the second prediction model, wherein the second prediction model is used to extract the feature vector of the whole genome sequence to be detected.

[0199] In some embodiments, the pre-training module 4551 is used to perform the following processing for each of the first sample whole genome sequences: determine the first similarity and the second similarity corresponding to the first sample whole genome sequence respectively, wherein the first similarity is the similarity between the first feature vectors of two first sample whole genome sequences with the same base sequence, and the second similarity is the similarity between the first feature vectors of two first sample whole genome sequences with different base sequences; use the first ratio between the first similarity and the first sum as the first sub-loss function corresponding to the first sample whole genome sequence, wherein the first sum is the sum of the first similarity and the second similarity; use the mean of each of the first sub-loss functions as the first loss function of the first prediction model.

[0200] In some embodiments, the first sample whole genome sequence includes multiple dinucleotide sites; the sample acquisition module 4552 is used to perform the following processing for each of the first sample whole genome sequences: extract a target dinucleotide site from the multiple dinucleotide sites of the first sample whole genome sequence; use the target dinucleotide site as a reference site, and intercept a sequence within a preconfigured window range from the first sample whole genome sequence as the second sample whole genome sequence, wherein the reference site is located at any one of the following positions in the preconfigured window range: the boundary of the preconfigured window range, or the interior of the preconfigured window range.

[0201] In some embodiments, the fine-tuning training module 4553 is used to call the second prediction model based on the second training data set to perform the following processing: perform feature extraction processing on each second sample whole genome sequence of the second training data set to obtain a second feature vector for each second sample whole genome sequence; based on the second feature vector, determine the first predicted probability that the target dinucleotide site included in the second sample whole genome sequence is in a methylated state; based on the probability corresponding to the actual methylation state of each target dinucleotide site and the first predicted probability, determine the second loss function of the second prediction model; based on the second loss function, iteratively update the parameters of the second prediction model to obtain the third prediction model, wherein the third prediction model is used to determine the methylation state of the dinucleotide site in the whole genome sequence.

[0202] In some embodiments, the fine-tuning training module 4553 is used to perform multiple levels of feature conversion processing on the second feature vector to obtain a converted second feature vector; based on the converted second feature vector, the attention mechanism is called to perform aggregation processing to obtain a global feature; based on the global feature of the whole genome sequence of the second sample, activation processing is performed to obtain a first predicted probability that the target dinucleotide site is in a methylated state.

[0203] In some embodiments, the fine-tuning training module 4553 is used to determine, for each of the target dinucleotide sites, a binary classification loss between the probability corresponding to the actual methylation state and the first predicted probability; and the mean of each of the binary classification losses is used as the second loss function of the second prediction model.

[0204] In some embodiments, the sample acquisition module 4552 is used to perform whole genome sequencing on the biological sample to obtain multiple real whole genome sequences before pre-training the initialized first prediction model based on the first training data set to obtain the second prediction model; use the preconfigured reference whole genome sequence and the multiple real whole genome sequences as the first sample whole genome sequence; and combine the multiple first sample whole genome sequences into the first training data set.

[0205] In some embodiments, the first sample whole genome sequence includes multiple dinucleotide sites; the sample acquisition module 4552 is used to perform bisulfite treatment on each first sample whole genome sequence before extracting the target dinucleotide site from each first sample whole genome sequence and using the sequence within the preconfigured window range containing the target dinucleotide site as the second sample whole genome sequence to obtain a processed first sample whole genome sequence, wherein the processed first sample whole genome sequence includes multiple processed dinucleotide sites; based on the dinucleotide sites before processing and the corresponding processed dinucleotide sites, determine the actual methylation state of each dinucleotide site.

[0206] In some embodiments, the sample acquisition module 4552 is used to compare the dinucleotide sites before processing with the dinucleotide sites after processing for each of the first sample whole genome sequences, to obtain a comparison result corresponding to each of the dinucleotide sites; when the comparison result is that the cytosine at the dinucleotide site is converted into uracil, or is not converted, the methylation state of the dinucleotide site is determined to be unmethylated; when the comparison result is that the cytosine at the dinucleotide site is converted into guanine, the methylation state of the dinucleotide site is determined to be methylated; for each of the dinucleotide sites, based on a second ratio between the number of methylation of the dinucleotide site and the total number of occurrences, the actual methylation state of the dinucleotide site is characterized, wherein the second ratio is the probability of methylation of the dinucleotide site.

[0207] In some embodiments, the fine-tuning training module 4553 is used to obtain a third training data set after training the second prediction model based on the second training data set to obtain a trained third prediction model, wherein the third training data set includes: multiple third whole genome sequences and sample label probabilities of sample dinucleotide sites corresponding to the third whole genome sequences respectively; calling the third prediction model based on the multiple third whole genome sequences to perform prediction processing to obtain a second prediction probability of the sample dinucleotide site in each of the third whole genome sequences being in a methylated state; determining a first difference between the sample label probability and the second prediction probability, and determining a first number of the first difference that is less than a preconfigured difference; in response to the accuracy of the third prediction model being less than the preconfigured accuracy, using the third prediction model as the second prediction model, and entering the step of training the second prediction model based on the second training data set to obtain a trained third prediction model, wherein the accuracy is the ratio between the first number and the total number of the sample dinucleotide sites.

[0208] In some embodiments, the fine-tuning training module 4553 is used to call the third prediction model based on the whole genome sequence to perform the following processing after training the second prediction model based on the second training data set to obtain the trained third prediction model: perform feature extraction processing on the whole genome sequence to be detected to obtain a fourth feature vector of the whole genome sequence to be detected; based on the fourth feature vector, determine the third prediction probability that the dinucleotide site to be detected included in the whole genome sequence of the second sample is in a methylated state; in response to the third prediction probability being greater than the pre-configured probability, determine that the dinucleotide site to be detected is in a methylated state.

[0209] The embodiment of the present application provides a computer program product, which includes a computer program or a computer executable instruction, and the computer program or the computer executable instruction is stored in a computer-readable storage medium. The processor of the electronic device reads the computer program or the computer executable instruction from the computer-readable storage medium, and the processor executes the computer program or the computer executable instruction, so that the electronic device executes the training method of the prediction model described in the embodiment of the present application.

[0210] The present application embodiment provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions or computer programs are stored. When the computer-executable instructions or computer programs are executed by a processor, the processor will be caused to execute the prediction model training method provided by the present application embodiment, for example, Figure 3A The training method of the prediction model is shown.

[0211] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface storage, optical disk, or CD-ROM; or it may be various devices including one or any combination of the above memories.

[0212] In some embodiments, computer executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.

[0213] As an example, computer-executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file storing other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).

[0214] As an example, computer executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located at one site, or on multiple electronic devices distributed at multiple sites and interconnected by a communication network.

[0215] In summary, through pre-training in the embodiments of the present application, the prediction model can learn the relevant features in the whole genome sequence. The whole genome sequence within a specific range is used in the training phase, and targeted training is performed to improve the accuracy of the prediction model in predicting the methylation state, by training the prediction model of the methylation state; by limiting the range of training data, the data complexity is reduced, the training efficiency is improved, and the computing resources required for the training process are saved; the genome sequence to be detected is detected by the trained prediction model, and compared with the methylation state detection of the related technology, there is no need to perform complex experiments, which avoids the noise and interference mixed in the experimental process, and improves the efficiency and accuracy of the methylation state detection.

[0216] The above is only an embodiment of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.

Claims

1. A training method for a prediction model, It is characterized in that The method comprises: Pre-training the initialized first prediction model based on a first training data set to obtain a second prediction model, wherein the first training data set includes a plurality of first sample whole genome sequences; Extracting a target dinucleotide site from each of the first sample whole genome sequences, and using a sequence within a preconfigured window containing the target dinucleotide site as a second sample whole genome sequence; Annotating the actual methylation status of each target dinucleotide site in the whole genome sequence of the second sample to obtain an annotated whole genome sequence of the second sample; Combining each of the annotated second sample whole genome sequences into a second training data set; The second prediction model is trained based on the second training data set to obtain a trained third prediction model, wherein the third prediction model is used to predict the methylation status of dinucleotide sites in the whole genome sequence to be detected.

2. The method according to claim 1, It is characterized in that The pre-training of the initialized first prediction model based on the first training data set to obtain the second prediction model includes: Based on the first training data set, the first prediction model is called to perform feature extraction processing to obtain a first feature vector of the whole genome sequence of each of the first samples; Determining a first loss function of the first prediction model based on the plurality of first feature vectors; The first prediction model is iteratively parameter updated based on the first loss function to obtain the second prediction model, wherein the second prediction model is used to extract the feature vector of the whole genome sequence to be detected.

3. The method according to claim 2, It is characterized in that The determining, based on the plurality of first feature vectors, a first loss function of the first prediction model comprises: For each of the first sample whole genome sequences, the following processing is performed: Determine a first similarity and a second similarity respectively corresponding to the first sample whole genome sequence, wherein the first similarity is the similarity between the first feature vectors of two first sample whole genome sequences with the same base sequence, and the second similarity is the similarity between the first feature vectors of two first sample whole genome sequences with different base sequences; Using a first ratio between the first similarity and a first sum as a first sub-loss function corresponding to the first sample whole genome sequence, wherein the first sum is the sum of the first similarity and the second similarity; The mean of each of the first sub-loss functions is used as the first loss function of the first prediction model.

4. The method according to claim 1, It is characterized in that The first sample whole genome sequence includes a plurality of dinucleotide sites; The step of extracting a target dinucleotide site from each of the first sample whole genome sequences and using a sequence within a preconfigured window containing the target dinucleotide site as a second sample whole genome sequence comprises: For each of the first sample whole genome sequences, the following processing is performed: Extracting target dinucleotide sites from multiple dinucleotide sites in the whole genome sequence of the first sample; Taking the target dinucleotide site as a reference site, a sequence within a preconfigured window range is intercepted from the first sample whole genome sequence as the second sample whole genome sequence, wherein the reference site is located at any one of the following positions in the preconfigured window range: the boundary of the preconfigured window range, or the interior of the preconfigured window range.

5. The method according to claim 1, It is characterized in that The training process of the second prediction model based on the second training data set to obtain a trained third prediction model includes: Based on the second training data set, the second prediction model is called to perform the following processing: Performing feature extraction processing on each second sample whole genome sequence of the second training data set to obtain a second feature vector for each second sample whole genome sequence; Based on the second feature vector, determining a first predicted probability that the target dinucleotide site included in the second sample whole genome sequence is in a methylated state; Determining a second loss function of the second prediction model based on the probability corresponding to the actual methylation state of each of the target dinucleotide sites and the first predicted probability; The second prediction model is iteratively parameter updated based on the second loss function to obtain the third prediction model, wherein the third prediction model is used to determine the methylation status of the dinucleotide sites in the whole genome sequence.

6. The method according to claim 5, It is characterized in that Determining, based on the second feature vector, a first predicted probability that the target dinucleotide site included in the second sample whole genome sequence is in a methylated state comprises: Performing multiple levels of feature conversion processing on the second feature vector to obtain a converted second feature vector; Based on the converted second feature vector, an attention mechanism is called to perform aggregation processing to obtain a global feature; Activation processing is performed based on the global features of the whole genome sequence of the second sample to obtain a first predicted probability that the target dinucleotide site is in a methylated state.

7. The method according to claim 5, It is characterized in that The determining, based on the probability corresponding to the actual methylation state of each of the target dinucleotide sites and the first predicted probability, a second loss function of the second prediction model comprises: For each of the target dinucleotide sites, determining a binary classification loss between the probability corresponding to the actual methylation state and the first predicted probability; The mean of each of the two-class loss is used as the second loss function of the second prediction model.

8. The method according to any one of claims 1 to 7, It is characterized in that Before pre-training the initialized first prediction model based on the first training data set to obtain the second prediction model, the method further includes: Perform whole genome sequencing on biological samples to obtain multiple true whole genome sequences; Using the preconfigured reference whole genome sequence and the multiple real whole genome sequences as the first sample whole genome sequence; Combine multiple whole genome sequences of the first samples into the first training data set.

9. The method according to any one of claims 1 to 7, It is characterized in that The first sample whole genome sequence includes a plurality of dinucleotide sites; Before extracting the target dinucleotide site from each of the first sample whole genome sequences and using the sequence within the preconfigured window containing the target dinucleotide site as the second sample whole genome sequence, the method further comprises: Performing bisulfite treatment on each of the first sample whole genome sequences to obtain a treated first sample whole genome sequence, wherein the treated first sample whole genome sequence includes a plurality of treated dinucleotide sites; Based on the dinucleotide sites before processing and the corresponding dinucleotide sites after processing, the actual methylation status of each dinucleotide site is determined.

10. The method according to claim 9, It is characterized in that The determining the actual methylation state of each dinucleotide site based on the dinucleotide site before processing and the corresponding dinucleotide site after processing comprises: For each of the first sample whole genome sequences, aligning the dinucleotide sites before processing with the dinucleotide sites after processing to obtain an alignment result corresponding to each of the dinucleotide sites; When the comparison result is that the cytosine at the dinucleotide site is converted into uracil, or is not converted, the methylation state of the dinucleotide site is determined to be unmethylated; When the comparison result is that the cytosine at the dinucleotide site is converted into guanine, determining that the methylation state of the dinucleotide site is methylated; For each of the dinucleotide sites, the actual methylation state of the dinucleotide site is characterized based on a second ratio between the methylation number and the total number of occurrences of the dinucleotide site, wherein the second ratio is the probability of methylation of the dinucleotide site.

11. The method according to any one of claims 1 to 7, It is characterized in that After training the second prediction model based on the second training data set to obtain a trained third prediction model, the method further includes: Acquire a third training data set, wherein the third training data set includes: a plurality of third whole genome sequences and sample label probabilities of sample dinucleotide sites respectively corresponding to the third whole genome sequences; Based on the plurality of third whole genome sequences, the third prediction model is called to perform prediction processing to obtain a second prediction probability of a sample dinucleotide site in each of the third whole genome sequences being in a methylation state; Determining a first difference between the sample label probability and the second predicted probability, and determining a first number of the first difference values ​​that are less than a preconfigured difference value; In response to the accuracy of the third prediction model being less than the preconfigured accuracy, the third prediction model is used as the second prediction model, and the step of training the second prediction model based on the second training data set is entered to obtain the trained third prediction model, wherein the accuracy is the ratio of the first number to the total number of dinucleotide sites in the sample.

12. The method according to any one of claims 1 to 7, It is characterized in that After training the second prediction model based on the second training data set to obtain a trained third prediction model, the method further includes: Based on the whole genome sequence to be detected, the third prediction model is called to perform the following processing: Performing feature extraction processing on the whole genome sequence to be detected to obtain a fourth feature vector of the whole genome sequence to be detected; Based on the fourth eigenvector, determining a third predicted probability that the dinucleotide site to be detected included in the whole genome sequence of the second sample is in a methylated state; In response to the third predicted probability being greater than the preconfigured probability, it is determined that the dinucleotide site to be detected is in a methylated state.

13. A training device for a prediction model, It is characterized in that The device comprises: A pre-training module, used to pre-train the initialized first prediction model based on a first training data set to obtain a second prediction model, wherein the first training data set includes a plurality of first sample whole genome sequences; A sample acquisition module, used for extracting a target dinucleotide site from each of the first sample whole genome sequences, and using a sequence within a preconfigured window containing the target dinucleotide site as a second sample whole genome sequence; The sample acquisition module is used to annotate the actual methylation status of each target dinucleotide site in the whole genome sequence of the second sample to obtain the annotated whole genome sequence of the second sample; The sample acquisition module is used to combine each of the annotated second sample whole genome sequences into a second training data set; A fine-tuning training module is used to train the second prediction model based on the second training data set to obtain a trained third prediction model, wherein the third prediction model is used to predict the methylation status of dinucleotide sites in the whole genome sequence to be detected.

14. An electronic device, It is characterized in that The electronic device comprises: A memory for storing computer executable instructions or computer programs; A processor, used to implement the training method of the prediction model described in any one of claims 1 to 12 when executing the computer executable instructions or computer program stored in the memory.

15. A computer-readable storage medium storing computer-executable instructions or a computer program, It is characterized in that When the computer executable instructions or computer program are executed by a processor, the training method of the prediction model described in any one of claims 1 to 12 is implemented.

16. A computer program product comprising computer executable instructions or a computer program, It is characterized in that When the computer executable instructions or computer program are executed by a processor, the training method of the prediction model described in any one of claims 1 to 12 is implemented.

Citation Information

Cited By

  • Corn gene function evaluation method, system and equipment and storage medium

    CN121281648A

  • Method and apparatus for training prediction model, and electronic device, computer-readable storage medium and computer program product

    WO2026040686A1