Space transcriptome gene expression prediction method, system and terminal

By constructing a gene expression prediction model for multimodal feature extraction and prediction, the problem of failure to make full use of gene expression data in the prior art is solved, and higher precision gene expression prediction is achieved.

CN119943145AActive Publication Date: 2025-05-06HARBIN INSTITUTE OF TECHNOLOGY (SHENZHEN) (INSTITUTE OF SCIENCE AND TECHNOLOGY INNOVATION HARBIN INSTITUTE OF TECHNOLOGY SHENZHEN)

Patent Information

Application Number
CN202411787192.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-05-06
Estimated Expiration
2044-12-06

AI Technical Summary

Technical Problem

When predicting spatial transcriptome gene expression, the prior art only relies on feature extraction from histological images, and fails to make full use of gene expression data, resulting in inaccurate prediction results.

Method used

A gene expression prediction model is constructed that includes image feature extraction module, gene feature extraction module, projection module and prediction module. By extracting and learning characteristics of histological images and gene expression data, the gene expression results are predicted.

Benefits of technology

By fully leveraging the potential association between images and gene expression data, the accuracy of gene expression prediction is significantly improved and more reliable prediction results are provided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119943145A_ABST
    Figure CN119943145A_ABST
Patent Text Reader

Abstract

The invention discloses a space transcriptome gene expression prediction method, system and terminal, and the method comprises the steps: training a gene expression prediction model to obtain a target gene expression prediction model; obtaining a to-be-predicted target histological image, preprocessing the target histological image to obtain a preprocessed image, segmenting the preprocessed image into a plurality of sub-image blocks according to the coordinates of the capture sites, and respectively inputting the plurality of sub-image blocks into the target gene expression prediction model for feature extraction, and obtaining a target image feature corresponding to each sub-image block, and performing gene expression prediction according to a plurality of target image features to obtain a target gene expression result. According to the method, a prediction task is regarded as mutual learning among different modal data: a model is established to learn potential association between two features, and finally, a prediction module is used to predict features of another modal through one feature, so that a gene expression prediction task can be completed with high precision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing, and in particular to a spatial transcriptome gene expression prediction method, system, terminal and computer-readable storage medium. Background Art

[0002] All RNA transcribed from DNA in cells is called transcriptome. Through transcriptome sequencing technology, the transcriptome sequences in cells can be obtained. These sequences represent gene expression at the cellular level, allowing researchers to conduct detailed analysis of the gene expression pattern of each cell, track changes in gene expression during cell development and differentiation, and gain in-depth understanding of cell fate and differentiation pathways. It can also help researchers understand the key cell types and key genes in pathophysiological processes and enhance their understanding of cells and tissues.

[0003] The development of transcriptome sequencing technology has gone through three stages: the first stage is the transcriptome sequencing of a large number of mixed cells. The second stage is the transcriptome sequencing of single cells. This method advances the understanding of cell gene expression to the single cell level. In the third stage, transcriptome research began to enter the spatial transcriptome stage. This technology can simultaneously obtain the spatial location information of cells, gene expression data and slice image information of measured tissues.

[0004] With the development of various neural network technologies, models for predicting spatial transcriptome gene expression have been proposed. Bioinformatics researchers have proposed some methods to predict spatial transcriptome data. These methods can help further understand the structure and function of cells and tissues. However, these current prediction models all extract features from histological images and use the obtained features to predict gene expression data. They fail to make full use of gene expression data, resulting in inaccurate prediction results for gene expression.

[0005] Therefore, the prior art still needs to be improved and developed. Summary of the invention

[0006] The main purpose of the present invention is to provide a spatial transcriptome gene expression prediction method, system, terminal and computer-readable storage medium, aiming to solve the problem that in the prior art, when predicting gene expression, only image features are used to predict gene expression data, and gene expression data is not fully utilized, resulting in inaccurate prediction results for gene expression.

[0007] To achieve the above object, the present invention provides a method for predicting gene expression in a spatial transcriptome, the method comprising the following steps:

[0008] Constructing a gene expression prediction model, and training the gene expression prediction model to obtain a target gene expression prediction model;

[0009] Acquire a target histological image to be predicted, preprocess the target histological image to obtain a preprocessed image, and divide the preprocessed image into a plurality of sub-image blocks according to the coordinates of the capture sites, wherein each sub-image block contains a capture site;

[0010] The plurality of sub-image blocks are respectively input into the target gene expression prediction model for feature extraction to obtain target image features corresponding to each of the sub-image blocks, and gene expression prediction is performed based on the plurality of target image features to obtain target gene expression results.

[0011] Optionally, in the spatial transcriptome gene expression prediction method, the gene expression prediction model includes: an image feature extraction module, a gene feature extraction module, a projection module and a prediction module.

[0012] Optionally, the spatial transcriptome gene expression prediction method, wherein the training of the gene expression prediction model further comprises:

[0013] Acquiring historical data, wherein the historical data includes historical histological images and real gene expression information corresponding to the historical histological images;

[0014] The historical histological images are used as training samples, and the real gene expression information corresponding to the historical histological images are used as labels to construct a data set;

[0015] The data set is divided into a training set, a test set and a validation set according to a preset ratio, the training set is used to train the gene expression prediction model, the test set is used to evaluate the gene expression prediction model in each round of training, and the validation set is used to evaluate the gene expression prediction model after training.

[0016] Optionally, in the spatial transcriptome gene expression prediction method, the feature extraction module is a ViT model, the gene feature extraction module is a self-attention model, and the prediction module is a multi-layer perceptron model including two fully connected layers.

[0017] Optionally, the spatial transcriptome gene expression prediction method, wherein the gene expression prediction model is trained to obtain a target gene expression prediction model, specifically comprising:

[0018] Segmenting the training samples in the training set according to the coordinates of the capture sites in the spatial transcriptome data to obtain a plurality of pixel blocks;

[0019] Inputting the plurality of pixel blocks and the corresponding real gene expression information into the image feature extraction module and the gene feature extraction module respectively for feature extraction to obtain image features and gene features;

[0020] Projecting the image features to the prediction module through the projection module for calculation to obtain predicted gene expression results;

[0021] Calculating a total loss function according to the image features, the gene features, the predicted gene expression results and the actual gene expression information;

[0022] Setting a back propagation gradient according to the total loss function, adjusting the network hyperparameters of the gene expression prediction model based on the back propagation gradient and the back propagation algorithm, and evaluating the model based on the test set;

[0023] Continuing to train the gene expression prediction model based on the adjusted network parameters until the total loss function reaches a preset convergence condition, thereby obtaining a trained gene expression prediction model;

[0024] The prediction result of the trained gene expression prediction model is judged using the validation set. If the error between the prediction result and the label in the validation set is lower than a preset threshold, the target gene expression prediction model is obtained.

[0025] Optionally, the spatial transcriptome gene expression prediction method, wherein the total loss function is calculated based on the image features, the gene features, the predicted gene expression results and the real gene expression information, specifically includes:

[0026] The contrast loss and MSE loss are calculated according to the image features, the gene features, the predicted gene expression results and the true gene expression information:

[0027]

[0028] Among them, L con represents the contrast loss, z ci represents the image features of the i-th pixel block, z gi represents the gene feature corresponding to the i-th pixel block, X i Represents the true gene expression information X of the capture site corresponding to the i-th pixel block i ,h ci represents the predicted gene expression result of the capture site corresponding to the i-th pixel block; L MSE represents the MSE loss, i represents the index of the capture site corresponding to the pixel block or prime block, and q represents the total number of genes;

[0029] The total loss function L is calculated based on the contrast loss and the MSE loss:

[0030] L=L con +L MSE.

[0031] Optionally, the spatial transcriptome gene expression prediction method, wherein the plurality of sub-image blocks are respectively input into the target gene expression prediction model for feature extraction to obtain target image features corresponding to each of the sub-image blocks, and gene expression prediction is performed according to the plurality of target image features to obtain target gene expression results, specifically includes:

[0032] Inputting the plurality of sub-image blocks into the image feature extraction module for feature extraction respectively, and obtaining the target image feature corresponding to each of the sub-image blocks;

[0033] The plurality of target image features are projected to the prediction module through the projection module to perform gene expression prediction, so as to obtain the target gene expression result of the target histological image.

[0034] In addition, to achieve the above object, the present invention also provides a spatial transcriptome gene expression prediction system, wherein the spatial transcriptome gene expression prediction system comprises:

[0035] A target model training module is used to construct a gene expression prediction model, train the gene expression prediction model, and obtain a target gene expression prediction model;

[0036] An image data acquisition module, used for acquiring a target histological image to be predicted, preprocessing the target histological image to obtain a preprocessed image, and dividing the preprocessed image into a plurality of sub-image blocks according to the coordinates of the capture sites, wherein each sub-image block contains a capture site;

[0037] The gene expression prediction module is used to input the multiple sub-image blocks into the target gene expression prediction model for feature extraction, obtain the target image features corresponding to each of the sub-image blocks, perform gene expression prediction based on the multiple target image features, and obtain the target gene expression result.

[0038] In addition, to achieve the above-mentioned purpose, the present invention also provides a terminal, wherein the terminal includes: a memory, a processor, and a spatial transcriptome gene expression prediction program stored in the memory and executable on the processor, and when the spatial transcriptome gene expression prediction program is executed by the processor, the steps of the spatial transcriptome gene expression prediction method as described above are implemented.

[0039] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a spatial transcriptome gene expression prediction program, and when the spatial transcriptome gene expression prediction program is executed by a processor, the steps of the spatial transcriptome gene expression prediction method as described above are implemented.

[0040] In the present invention, a gene expression prediction model is constructed, and the gene expression prediction model is trained to obtain a target gene expression prediction model; a target histological image to be predicted is obtained, and the target histological image is preprocessed to obtain a preprocessed image, and the preprocessed image is divided into a plurality of sub-image blocks according to the coordinates of the capture site, wherein each sub-image block contains a capture site; the plurality of sub-image blocks are respectively input into the target gene expression prediction model for feature extraction to obtain the target image features corresponding to each sub-image block, and gene expression prediction is performed based on the plurality of target image features to obtain the target gene expression result. The present invention regards the prediction task as mutual learning between different modal data: a model is established to learn the potential correlation between two features, and finally a prediction module is used to predict the features of another modality through one feature, so as to complete the gene expression prediction task with high accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 It is a flow chart of a preferred embodiment of the spatial transcriptome gene expression prediction method of the present invention;

[0042] Figure 2 It is the overall framework diagram of the gene expression prediction model in the spatial transcriptome gene expression prediction method of the present invention;

[0043] Figure 3 It is a flowchart of training the gene expression prediction model in the spatial transcriptome gene expression prediction method of the present invention;

[0044] Figure 4 It is a pseudo code diagram of training the gene expression prediction model in the spatial transcriptome gene expression prediction method of the present invention to obtain the target gene expression prediction model;

[0045] Figure 5 It is a structural diagram of a preferred embodiment of the spatial transcriptome gene expression prediction system of the present invention;

[0046] Figure 6 Schematic diagram of the operating environment of a preferred embodiment of the terminal of the present invention. DETAILED DESCRIPTION

[0047] The present application provides a spatial transcriptome gene expression prediction method, system and terminal. In order to make the purpose, technical solution and effect of the present application clearer and more specific, the present application is further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0048] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as those generally understood by those skilled in the art to which this application belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with those in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as here.

[0049] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present invention, the descriptions of "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or suggesting their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

[0050] The spatial transcriptome gene expression prediction method described in the preferred embodiment of the present invention is as follows: Figure 1 As shown, the spatial transcriptome gene expression prediction method comprises the following steps:

[0051] Step S10: construct a gene expression prediction model, train the gene expression prediction model, and obtain a target gene expression prediction model.

[0052] Specifically, Figure 2 As shown, the gene expression prediction model includes: an image feature extraction module, a gene feature extraction module, a projection module and a prediction module. It can be understood that the purpose of the gene expression prediction model of the present invention is to learn the potential relationship between the histological image corresponding to each capture site and the corresponding gene expression data, so as to predict the corresponding gene expression information by extracting the histological image features of the capture site.

[0053] The training of the gene expression prediction model also includes:

[0054] Acquiring historical data, wherein the historical data includes historical histological images and real gene expression information corresponding to the historical histological images;

[0055] The historical histological images are used as training samples, and the real gene expression information corresponding to the historical histological images are used as labels to construct a data set;

[0056] The data set is divided into a training set, a test set and a validation set according to a preset ratio, the training set is used to train the gene expression prediction model, the test set is used to evaluate the gene expression prediction model in each round of training, and the validation set is used to evaluate the gene expression prediction model after training.

[0057] In this embodiment, historical histological images and real gene expression information corresponding to the historical histological images are obtained as data for model training, the historical histological images are used as training samples, and the real gene expression information corresponding to the historical histological images are used as corresponding real labels to construct a data set.

[0058] The preprocessed data is divided into a training set, a test set and a validation set according to a preset ratio (for example, the data ratio of the training set, the test set and the validation set is 6:2:2). The training set is used to train the gene expression prediction model and optimize the parameters of the model, while the test set is used to detect the accuracy of the prediction results of the trained gene expression prediction model, thereby evaluating the performance of the model.

[0059] Furthermore, in the gene expression prediction model, the feature extraction module is a ViT model (Vision Transformer, a model that applies the Transformer architecture to computer vision tasks), the gene feature extraction module is a self-attention model, and the prediction module is a multi-layer perceptron model including two fully connected layers. It should be noted that the algorithm for extracting image features and gene features proposed in the present invention can be replaced by other algorithms, and the prediction module can also be replaced by models such as Transformer or GNN, which is only used as an example and is not limited here.

[0060] like Figure 3 As shown, further, the gene expression prediction model is trained to obtain a target gene expression prediction model, specifically including:

[0061] S101 . Segment the training samples in the training set according to the coordinates of the capture sites in the spatial transcriptome data to obtain a plurality of pixel blocks.

[0062] It can be understood that the capture sites in the spatial transcriptome data refer to the location points used to capture RNA molecules in specific areas of tissue sections when performing spatial transcriptome sequencing; these sites not only record the position information of RNA molecules, but also associate this position information with gene expression data through sequencing technology, thereby achieving spatial positioning of gene expression in tissue sections.

[0063] The historical histological images in the training set are segmented according to the coordinates of the capture sites in the spatial transcriptome data. For example, the histological image C can be cut into small image blocks of 112*112 pixels according to the coordinates of the capture sites, wherein each small image block contains one capture site.

[0064] S102, inputting the plurality of pixel blocks and the corresponding real gene expression information into the image feature extraction module and the gene feature extraction module respectively for feature extraction to obtain image features and gene features.

[0065] First, for histological images, the present invention uses the ViT model to extract image features, inputs multiple pixel blocks into the ViT model, and obtains the image block C i The image feature z ci , the formula is: ci =f img (C i ), where f img Represents the ViT model used to extract image features.

[0066] Furthermore, for the real gene expression information (capture site-gene matrix) X, the rows of the -gene matrix represent the gene expression information of each capture site, and the columns represent the expression of each gene in different capture sites, denoted as X p*q , which contains p capture sites and q genes. The self-attention model is used to extract features from gene expression data. For the gene expression X of the i-th capture site i For example, we can get the gene feature z xi , the formula is: xi =f gene (X i ), where f gene Represents the self-attention model for extracting gene features.

[0067] S103, projecting the image features to the prediction module through the projection module for calculation to obtain predicted gene expression results.

[0068] The prediction module predicts the corresponding gene expression results through image features. The prediction module is a multi-layer perceptron model, which contains two fully connected layers. The predicted gene expression results h are obtained through the prediction module. ci , the formula is: h ci =f pro (z ci ), where f pro Represents the prediction module.

[0069] S104, calculating a total loss function according to the image features, the gene features, the predicted gene expression results and the actual gene expression information.

[0070] Specifically, the contrast loss and MSE loss are calculated according to the image features, the gene features, the predicted gene expression results and the true gene expression information:

[0071]

[0072] Among them, L con represents the contrast loss, z ci represents the image features of the i-th pixel block, z gi represents the gene feature corresponding to the i-th pixel block, X i Represents the true gene expression information X of the capture site corresponding to the i-th pixel block i ,h ci represents the predicted gene expression result of the capture site corresponding to the i-th pixel block; L MSE represents the MSE loss, i represents the index of the capture site corresponding to the pixel block or prime block, and q represents the total number of genes;

[0073] Furthermore, the total loss function L is calculated based on the contrast loss and the MSE loss: L = L con +L MSE .

[0074] It can be understood that in the present invention, the loss function of the gene expression prediction model includes two parts. The first part is the contrast loss between image features and gene features. The contrast loss is set to calculate the cosine similarity of the two features to narrow the distance between the two, so that the model learns the potential correlation between gene features and image features. The second part is the MSE (mean-square error) loss between the prediction results and the actual gene expression data.

[0075] S105. Setting a back propagation gradient according to the total loss function, adjusting the network hyperparameters of the gene expression prediction model according to the back propagation gradient and based on a back propagation algorithm, and evaluating the model based on the test set.

[0076] In this embodiment, the network parameters of the ViT model, the self-attention model and the multi-layer perceptron model in the gene expression prediction model are adjusted by the back propagation algorithm, and the total loss function of mean square error + contrast loss is adopted to ensure that the error between the predicted value and the true value is minimized, and the back propagation gradient is set according to the loss function. According to the back propagation gradient, the network parameters are adjusted based on the back propagation algorithm, and finally the model after one round of update is evaluated using the test set.

[0077] S106. Continue to train the gene expression prediction model based on the adjusted network parameters until the total loss function reaches a preset convergence condition, thereby obtaining a trained gene expression prediction model.

[0078] The loss function is a function that measures the difference between the model's predicted value and the true value. The smaller the value, the more accurate the model's prediction. During the training process, the loss function is minimized by continuously adjusting the model's parameters until the preset convergence condition is reached. The convergence condition is usually judged by observing the value of the loss function. When the loss value changes very little or no longer changes, the model can be considered to have converged.

[0079] S107, using the validation set to judge the prediction result of the trained gene expression prediction model, if the error between the prediction result and the label in the validation set is lower than a preset threshold, the target gene expression prediction model is obtained.

[0080] After the model is fitted on the training set, the validation set is used to predict the model and the validation error of the model is quantitatively calculated. If the error between the prediction result and the label in the validation set is lower than a preset threshold, the target gene expression prediction model is obtained. This step helps to judge the performance of the model on unseen data, thereby performing model selection and parameter tuning.

[0081] Furthermore, if Figure 4 As shown, the present invention provides the code (pseudocode) implementation process of training the gene expression prediction model to obtain the target gene expression prediction model.

[0082] Step S20, obtaining a target histological image to be predicted, preprocessing the target histological image to obtain a preprocessed image, and dividing the preprocessed image into a plurality of sub-image blocks according to the coordinates of the capture site, wherein each sub-image block contains a capture site.

[0083] Specifically, for the target histological image whose gene expression needs to be predicted, the image data is preprocessed to improve the data quality and improve the accuracy of the model prediction. First, the target histological image is subjected to denoising. Data denoising refers to preprocessing the data to eliminate or reduce the noise in the data, thereby improving the quality, accuracy and credibility of the data. Common denoising methods include mean filtering, singular value decomposition and wavelet transform. Next, the denoised data is standardized. The standardized processing may include steps such as data cleaning, data conversion and data normalization to ensure the consistency, accuracy and comparability of the data. These data preprocessing steps provide high-quality input for the subsequent learning of the model, ensure the accuracy and consistency of the data, and improve the prediction accuracy of the model.

[0084] Furthermore, after obtaining the preprocessed image, the preprocessed image is divided into multiple sub-image blocks according to the coordinates of the capture sites, the position points of RNA molecules in specific areas of the preprocessed image are captured using the coordinates of the capture sites, and these position information are associated with the gene expression data to achieve spatial positioning of gene expression in tissue sections, wherein each of the sub-image blocks contains a capture site.

[0085] Step S30, respectively input the plurality of sub-image blocks into the target gene expression prediction model for feature extraction to obtain target image features corresponding to each of the sub-image blocks, perform gene expression prediction based on the plurality of target image features to obtain target gene expression results.

[0086] Specifically, the plurality of sub-image blocks are respectively input into the image feature extraction module for feature extraction to obtain target image features corresponding to each of the sub-image blocks;

[0087] The plurality of target image features are projected to the prediction module through the projection module to perform gene expression prediction, so as to obtain the target gene expression result of the target histological image.

[0088] It can be seen that the present invention proposes a spatial transcriptome data prediction algorithm, which predicts the corresponding gene expression data given a histological image. Gene expression data and histological image data are regarded as different representations corresponding to different modalities of the same capture site, and the gene expression prediction task becomes a task of predicting gene modality data given the capture site in the image modality data. In the field of spatial transcriptome gene expression prediction, the present invention regards the prediction task as mutual learning between different modality data: by regarding image features and gene expression features as different expressions of different modality features of the capture site, a model is established to learn the potential correlation between the two features, and finally a prediction module is used to predict the features of another modality through one feature to complete the gene expression prediction task.

[0089] Furthermore, if Figure 5 As shown, based on the above-mentioned spatial transcriptome gene expression prediction method, the present invention also provides a spatial transcriptome gene expression prediction system, wherein the spatial transcriptome gene expression prediction system includes:

[0090] A target model training module 51 is used to construct a gene expression prediction model and train the gene expression prediction model to obtain a target gene expression prediction model;

[0091] An image data acquisition module 52 is used to acquire a target histological image to be predicted, preprocess the target histological image to obtain a preprocessed image, and divide the preprocessed image into a plurality of sub-image blocks according to the coordinates of the capture sites, wherein each sub-image block contains a capture site;

[0092] The gene expression prediction module 53 is used to input the multiple sub-image blocks into the target gene expression prediction model for feature extraction, obtain the target image features corresponding to each of the sub-image blocks, perform gene expression prediction based on the multiple target image features, and obtain the target gene expression result.

[0093] Furthermore, if Figure 6 As shown, based on the above-mentioned spatial transcriptome gene expression prediction method and system, the present invention also provides a terminal accordingly, and the terminal includes a processor 10, a memory 20 and a display 30. Figure 6 Only some components of the terminal are shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.

[0094] The memory 20 may be an internal storage unit of the terminal in some embodiments, such as a hard disk or memory of the terminal. The memory 20 may also be an external storage device of the terminal in other embodiments, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the terminal. Further, the memory 20 may also include both an internal storage unit of the terminal and an external storage device. The memory 20 is used to store application software and various types of data installed in the terminal, such as the program code of the installation terminal, etc. The memory 20 may also be used to temporarily store data that has been output or is to be output. In one embodiment, a spatial transcriptome gene expression prediction program 40 is stored on the memory 20, and the spatial transcriptome gene expression prediction program 40 may be executed by the processor 10, thereby realizing the spatial transcriptome gene expression prediction method in the present application.

[0095] In some embodiments, the processor 10 may be a central processing unit (CPU), a microprocessor or other data processing chip, used to run the program code or process data stored in the memory 20, such as executing the spatial transcriptome gene expression prediction method.

[0096] In some embodiments, the display 30 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, etc. The display 30 is used to display information on the terminal and to display a visual user interface. The components of the terminal communicate with each other via a system bus.

[0097] In one embodiment, when the processor 10 executes the spatial transcriptome gene expression prediction program 40 in the memory 20, the following steps are implemented:

[0098] Constructing a gene expression prediction model, and training the gene expression prediction model to obtain a target gene expression prediction model;

[0099] Acquire a target histological image to be predicted, preprocess the target histological image to obtain a preprocessed image, and divide the preprocessed image into a plurality of sub-image blocks according to the coordinates of the capture sites, wherein each sub-image block contains a capture site;

[0100] The plurality of sub-image blocks are respectively input into the target gene expression prediction model for feature extraction to obtain target image features corresponding to each of the sub-image blocks, and gene expression prediction is performed based on the plurality of target image features to obtain target gene expression results.

[0101] The gene expression prediction model includes: an image feature extraction module, a gene feature extraction module, a projection module and a prediction module.

[0102] Wherein, the training of the gene expression prediction model further includes:

[0103] Acquiring historical data, wherein the historical data includes historical histological images and real gene expression information corresponding to the historical histological images;

[0104] The historical histological images are used as training samples, and the real gene expression information corresponding to the historical histological images are used as labels to construct a data set;

[0105] The data set is divided into a training set, a test set and a validation set according to a preset ratio, the training set is used to train the gene expression prediction model, the test set is used to evaluate the gene expression prediction model in each round of training, and the validation set is used to evaluate the gene expression prediction model after training.

[0106] Among them, the feature extraction module is a ViT model, the gene feature extraction module is a self-attention model, and the prediction module is a multi-layer perceptron model including two fully connected layers.

[0107] The step of training the gene expression prediction model to obtain a target gene expression prediction model specifically includes:

[0108] Segmenting the training samples in the training set according to the coordinates of the capture sites in the spatial transcriptome data to obtain a plurality of pixel blocks;

[0109] Inputting the plurality of pixel blocks and the corresponding real gene expression information into the image feature extraction module and the gene feature extraction module respectively for feature extraction to obtain image features and gene features;

[0110] Projecting the image features to the prediction module through the projection module for calculation to obtain predicted gene expression results;

[0111] Calculating a total loss function according to the image features, the gene features, the predicted gene expression results and the actual gene expression information;

[0112] Setting a back propagation gradient according to the total loss function, adjusting the network hyperparameters of the gene expression prediction model based on the back propagation gradient and the back propagation algorithm, and evaluating the model based on the test set;

[0113] Continuing to train the gene expression prediction model based on the adjusted network parameters until the total loss function reaches a preset convergence condition, thereby obtaining a trained gene expression prediction model;

[0114] The prediction result of the trained gene expression prediction model is judged using the validation set. If the error between the prediction result and the label in the validation set is lower than a preset threshold, the target gene expression prediction model is obtained.

[0115] The calculating of the total loss function according to the image features, the gene features, the predicted gene expression results and the real gene expression information specifically includes:

[0116] The contrast loss and MSE loss are calculated according to the image features, the gene features, the predicted gene expression results and the true gene expression information:

[0117]

[0118] Among them, L con represents the contrast loss, z ci represents the image features of the i-th pixel block, z gi represents the gene feature corresponding to the i-th pixel block, X i Represents the true gene expression information X of the capture site corresponding to the i-th pixel block i ,h cirepresents the predicted gene expression result of the capture site corresponding to the i-th pixel block; L MSE represents the MSE loss, i represents the index of the capture site corresponding to the pixel block or prime block, and q represents the total number of genes;

[0119] The total loss function L is calculated based on the contrast loss and the MSE loss:

[0120] L=L con +L MSE .

[0121] The step of inputting the plurality of sub-image blocks into the target gene expression prediction model for feature extraction to obtain target image features corresponding to each of the sub-image blocks, and performing gene expression prediction based on the plurality of target image features to obtain target gene expression results specifically includes:

[0122] Inputting the plurality of sub-image blocks into the image feature extraction module for feature extraction respectively, and obtaining the target image feature corresponding to each of the sub-image blocks;

[0123] The plurality of target image features are projected to the prediction module through the projection module to perform gene expression prediction, so as to obtain the target gene expression result of the target histological image.

[0124] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a spatial transcriptome gene expression prediction program, and when the spatial transcriptome gene expression prediction program is executed by a processor, the steps of the spatial transcriptome gene expression prediction method as described above are implemented.

[0125] In summary, the present invention proposes a spatial transcriptome gene expression prediction method, system and terminal, the method comprising: constructing a gene expression prediction model, training the gene expression prediction model, and obtaining a target gene expression prediction model; obtaining a target histological image to be predicted, preprocessing the target histological image, obtaining a preprocessed image, and dividing the preprocessed image into a plurality of sub-image blocks according to the coordinates of the capture site, wherein each sub-image block contains a capture site; inputting the plurality of sub-image blocks into the target gene expression prediction model for feature extraction, obtaining the target image features corresponding to each sub-image block, and performing gene expression prediction based on the plurality of target image features to obtain the target gene expression result. The present invention regards the prediction task as mutual learning between different modal data: establishing a model to learn the potential correlation between two features, and finally using a prediction module to predict the features of another modality through one feature, so as to complete the gene expression prediction task with high precision.

[0126] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or terminal including the element.

[0127] Of course, those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0128] It should be understood that the application of the present invention is not limited to the above examples. For ordinary technicians in this field, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.

Claims

1. A spatial transcriptome gene expression prediction method, characterized in that: The spatial transcriptome gene expression prediction method comprises: Constructing a gene expression prediction model, and training the gene expression prediction model to obtain a target gene expression prediction model; Acquire a target histological image to be predicted, preprocess the target histological image to obtain a preprocessed image, and divide the preprocessed image into a plurality of sub-image blocks according to the coordinates of the capture sites, wherein each sub-image block contains a capture site; The plurality of sub-image blocks are respectively input into the target gene expression prediction model for feature extraction to obtain target image features corresponding to each of the sub-image blocks, and gene expression prediction is performed based on the plurality of target image features to obtain target gene expression results.

2. The spatial transcriptome gene expression prediction method according to claim 1, characterized in that: The gene expression prediction model includes: an image feature extraction module, a gene feature extraction module, a projection module and a prediction module.

3. The spatial transcriptome gene expression prediction method according to claim 2, characterized in that: The training of the gene expression prediction model also includes: Acquiring historical data, wherein the historical data includes historical histological images and real gene expression information corresponding to the historical histological images; The historical histological images are used as training samples, and the real gene expression information corresponding to the historical histological images are used as labels to construct a data set; The data set is divided into a training set, a test set and a validation set according to a preset ratio, the training set is used to train the gene expression prediction model, the test set is used to evaluate the gene expression prediction model in each round of training, and the validation set is used to evaluate the gene expression prediction model after training.

4. The spatial transcriptome gene expression prediction method according to claim 3, characterized in that: The feature extraction module is a ViT model, the gene feature extraction module is a self-attention model, and the prediction module is a multi-layer perceptron model including two fully connected layers.

5. The spatial transcriptome gene expression prediction method according to claim 4, characterized in that: The training of the gene expression prediction model to obtain a target gene expression prediction model specifically includes: Segmenting the training samples in the training set according to the coordinates of the capture sites in the spatial transcriptome data to obtain a plurality of pixel blocks; Inputting the plurality of pixel blocks and the corresponding real gene expression information into the image feature extraction module and the gene feature extraction module respectively for feature extraction to obtain image features and gene features; Projecting the image features to the prediction module through the projection module for calculation to obtain predicted gene expression results; Calculating a total loss function according to the image features, the gene features, the predicted gene expression results and the actual gene expression information; Setting a back propagation gradient according to the total loss function, adjusting the network hyperparameters of the gene expression prediction model based on the back propagation gradient and the back propagation algorithm, and evaluating the model based on the test set; Continuing to train the gene expression prediction model based on the adjusted network parameters until the total loss function reaches a preset convergence condition, thereby obtaining a trained gene expression prediction model; The prediction result of the trained gene expression prediction model is judged using the validation set. If the error between the prediction result and the label in the validation set is lower than a preset threshold, the target gene expression prediction model is obtained.

6. The method for predicting spatial transcriptome gene expression according to claim 5, characterized in that: The calculating of the total loss function according to the image features, the gene features, the predicted gene expression results and the real gene expression information specifically includes: The contrast loss and MSE loss are calculated according to the image features, the gene features, the predicted gene expression results and the true gene expression information: Among them, L con represents the contrast loss, z ci represents the image features of the i-th pixel block, z gi represents the gene feature corresponding to the i-th pixel block, X i Represents the true gene expression information X of the capture site corresponding to the i-th pixel block i ,h ci represents the predicted gene expression result of the capture site corresponding to the i-th pixel block; L MSE represents the MSE loss, i represents the index of the capture site corresponding to the pixel block or prime block, and q represents the total number of genes; The total loss function L is calculated based on the contrast loss and the MSE loss: L=L con +L MSE .

7. The spatial transcriptome gene expression prediction method according to claim 2, characterized in that: The step of inputting the plurality of sub-image blocks into the target gene expression prediction model to extract features, obtaining target image features corresponding to each of the sub-image blocks, and performing gene expression prediction according to the plurality of target image features to obtain target gene expression results specifically includes: Inputting the plurality of sub-image blocks into the image feature extraction module for feature extraction respectively, and obtaining the target image feature corresponding to each of the sub-image blocks; The plurality of target image features are projected to the prediction module through the projection module to perform gene expression prediction, so as to obtain the target gene expression result of the target histological image.

8. A spatial transcriptome gene expression prediction system, characterized in that: The spatial transcriptome gene expression prediction system comprises: A target model training module is used to construct a gene expression prediction model, train the gene expression prediction model, and obtain a target gene expression prediction model; An image data acquisition module, used for acquiring a target histological image to be predicted, preprocessing the target histological image to obtain a preprocessed image, and dividing the preprocessed image into a plurality of sub-image blocks according to the coordinates of the capture sites, wherein each sub-image block contains a capture site; The gene expression prediction module is used to input the multiple sub-image blocks into the target gene expression prediction model for feature extraction, obtain the target image features corresponding to each of the sub-image blocks, perform gene expression prediction based on the multiple target image features, and obtain the target gene expression result.

9. A terminal, characterized in that: The terminal includes: a memory, a processor, and a spatial transcriptome gene expression prediction program stored in the memory and executable on the processor. When the spatial transcriptome gene expression prediction program is executed by the processor, the steps of the spatial transcriptome gene expression prediction method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a spatial transcriptome gene expression prediction program, and when the spatial transcriptome gene expression prediction program is executed by a processor, the steps of the spatial transcriptome gene expression prediction method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Histological image-based space gene expression level prediction method, device and equipment

    CN118629498A

  • Apparatus and method for predicting cell type enrichment from tissue images using spatially resolved gene expression data

    WO2022220385A1

  • Method and system for predicting transcription factor-target gene relationship, device and medium

    WO2024183096A1

Cited By

  • Space transcriptome gene expression prediction method and system, terminal and storage medium

    CN121354663A